/aocg/ - Advent of Code 2018 General #41

First good nights sleep in a month edition

Previous Thread adventofcode.com/
>Advent of Code is a series of small programming puzzles for a variety of skill levels. They are self-contained and are just as appropriate for an expert who wants to stay sharp as they are for a beginner who is just learning to code. Each puzzle calls upon different skills and has two parts that build on a theme.
You need to register with an account but you can appear as anonymous.

While no longer necessary, here's the private leaderboard info:
Private leaderboard join code:
368748-e33dcae3


People who are inactive for 5 days will be kicked, but other leaderboards can be made if desired.

Alternative leaderboard for those waiting for inactives to be kicked from the first:
208834-4a1a9383

Attached: advent of code 2018 calendar.png (8000x8000, 3.77M)

Other urls found in this thread:

maurits.vdschee.nl/scatterplot/
twitter.com/NSFWRedditGif

First for congrats to /ourguy/
You make all of us proud

Larger calendar, split due to filesize:

this input results in 1 constellation, maybe it'll help
-2,0,0,0
4,0,0,0
1,0,0,0
7,0,0,0
13,0,0,0
10,0,0,0
1,1,1,1
1,3,0,3
1,0,3,3
1,0,0,6
1,0,0,3

Merry Christmas everybody. See you all next year! Congratulations to #193354!

"w-which makes it m-more a-amazing" edition

Attached: 1545720963486.png (880x673, 49K)

I was basically filtered twice but I banged my head until I got all fifty stars.

I have become much stronger.

Attached: cirno true form.jpg (850x790, 131K)

>my stringsplits made it on to day 24
Yes! I have accomplished something truly great!

Attached: 11120.jpg (459x500, 42K)

I really hope next year is brainlet/low IQ friendly. I got BTFO'd in day 4 desu. Fuck my life.

Attached: IMG_20181225_105931_703.jpg (1280x961, 127K)

wwwwww

i almost feel bad for the faggots that browse that shithole

Attached: Capture.png (920x242, 29K)

kek

Sweet calendar senpai
I like how my day 25 podium design from last year was improved upon

Call me a newfag but how do you guys even know that the guy browses Jow Forums and not just a random person who wants to use user

Salty AF

He's posted here numerous times.

Nice thanks for the confirmation, my first year actually following / doing AoC so i don't know much of the history

Private leaderboard and last year he'd frequently post his solutions right after the problems appeared (only someone high in the global leaderboards could do that)

Why so mad?

It isn't in that cap, but the user also posted a link to last year's calendar. Probably pushed the wrong buttons.

Ah, that would do it. topkek

To be honest anyone who would get offended by the advent calendar deserves to choke on a dick anyway.

Just checked their post history looking for that, and it turns out he also called the mod a faggot.

Attached: Capture.png (787x155, 15K)

Can you believe there's places on the internet people go and they can't even call the mod a faggot?

I mean he called the mod a faggot after the post was removed - rightfully so.

>people are downvoting the moderator
kek, well deserved

So I just went through the calendar image and refuse to believe that people ruined their SSDs over this.

u wot

oh no no no no!

Attached: file.png (292x33, 2K)

It was a big boi input on a problem where a typical implementation sufficient to solve the normal version of that puzzle would end up consuming like 30GB of memory, iirc after the user tried running it and it hit swap, he tried checking the SMART attributes or something on his drive and that program did bad things to it. Anecdotally, a few months ago I almost killed a RAID array by doing the same thing when whatever shitty program I was using at the time caused my entire system to hang, and upon rebooting my controller was convinced that all drives in the array were dead for a while.

What is job market looking like for software developers? Are we going to see a massive fall in wages as the tech bubble bursts? Should I switch to something more stable like EE (from CS)?

so where's the final big-boy. someone make it.
something crazy like 2gb of bigboi

Attached: 1252656[1].jpg (400x317, 23K)

>tfw 1/3 of contestants couldn't figure out to press the [Trigger the underflow] link

Attached: 1539220746799.png (1070x130, 34K)

that goes without saying. i mean this is reddit we're talking about.

Probably mostly people who haven't gotten all stars yet.

Made me upset when I implemented my, not so original, box search idea and people were posting
import solution
answers for day 23 part 2.

Merry Christmas, see you all next year.

That's what I get for not even reading the part 2. I had just assumed it was more of the puzzle, but then I clicked it and I was done.

What was your favourite puzzle this year?

I enjoyed both the assembly puzzles.

Merry Christmas niggas.
Didn’t make it this year, but I’ll do better next year.

The particles aligning to form the answer was pretty neat

>EVEN THE MODERATORS ARE UPSET THAT A CHANNER WON THE ADVENT OF CODE

This isn't Reddit. Take that shit elsewhere.

Yea, that was a good one. There were some great solutions for it.

Ok, everything is released... Let's do it.

I'm still refusing to accept the fact that day 23 part 2 filtered me.

Attached: can't think 3d.png (528x521, 14K)

Just use z3

So when do we get the hard problems?

So were you guys actually getting all of these done in a day or was that for the wizards only? I don't consider myself too retarded but a lot of them I certainly couldn't casually do in a day unless I dedicated all my time to it.

A few minutes for the easy ones
20min to 1 hour for the hard ones
Even more time when you don't find a solution

Congratulations Anonymous user #193354
I'll probably do a last ditch effort later to finish all my stars but I think this is as far as I can get
pretty impressive, considering it's the first time I actually got to try all the problems in the competition
Merry Christmas everyone

well fuck, maybe I am a retard then. I've only done day 1 and 15. 1 was obviously really easy but 15 I've found to be quite time consuming. Is that a particularly hard one or am I just slow?

Day 15 is probably the most time-consuming puzzle this year.

I consider myself fairly bad at programming, and they usually take me 15-50 minutes.
The hardest ones can take me 2+ hours, and the one that took me the longest was the reverse engineering at 5 hours (I wasn't rushing to get it done though, could've gotten it down to 3-4 hours like last year).
I didn't time day 15, I did it later in 2 sessions. Still think it took less time than the reverse engineering.

>tfw will never complete this shit
I-I just d-don't have t-t-time...

Attached: Screenshot_2018-12-25_12-11-39.png (654x631, 28K)

You can check how much time the top 100 did each day on the website

Yea I know, but I'm just more trying to gauge where my own skill level is at though, I already know it's not gonna be comparable to any of them.

I think it lets you judge the difficulty of each day's problem

My worst time is almost 3 hours for day 23.

oh right yea that makes sense

Omedetou Gozaimasu (anonymous user #193354)

The reddit salt is our sugar on top.

Attached: 1315708935514.jpg (304x185, 47K)

Hey guys I'm in the global leaderboard too

Attached: colt-grice-130127.jpg (300x420, 149K)

Based. /our guy/ pulled it off again. Solving these problems with immense speed and great style without ever revealing his identity...He's the Internet Chad

Attached: 1544079716078.gif (288x430, 1.92M)

holy shit you are
Congratulations Anonymous #230831

Attached: 1442275330227.jpg (500x699, 110K)

*#230381
sorry, I shouldn't be typing numbers

Attached: 1433113810152.jpg (492x395, 49K)

I consider myself an average coder, but problems usually take me long because of focussing issues. I keep doing other shit like exploring other languages, tools, games, TV, etc. Easy ones don't take me long. Maybe 20 minutes, if I don't have to optimize the code for speed. The hard ones have taken me longer than a day, pretty much always because I missed a tiny detail in the directions, or took a bad approach and stuck too long at trying to make it work, instead of just throwing it out and do it different.
I'm happy to see there are so many people doing shit like this so fast though. At my work I'm constantly frustrated at how bad my colleagues are, so this gives me the hope there have to be places with good programmers from whom I could learn shit.

>Chad
What if it's a girl?

Right, I'm in a similar position then. I struggle so much to figure out if I'm an absolute retard with programming or if I'm not actually that bad and just keep comparing myself to really skilled people.

I want to ____ 193354-chan!

>tfw no Jow Forums browsing super skilled programmer trap gf

KEK

what a clusterfuck

Dumb question but which language does
{:year 2018}
represent?

Clojure

cheers m9

To my shame I am featured on the final pic on two different days quite prominently.

Attached: 1292637483408.png (1000x1000, 44K)

>I made it into 7 days, some multiple times
Not sure I should be proud or ashamed. At least it's not all me fucking up

went camping, what did i miss

Next year we should form a group.

Attached: dance - Baka team.gif (320x166, 167K)

The picture should be correct. As in: it visualizes the largest collection of bots with a collective overlap. But even the tool messes up when I try to have it render the intersection.
Not that it would help that much, besides giving some visual support, and hopefully some numbers to aim at. I still need to code the solution, which I hopefully still will.

My solution to that still seems like the biggest bullshit ever. I wonder if some weighted average of the points where you gave greater weight to smaller radiuses would give a close enough point you could just bruteforce from there

Day 15 is the 2nd most time-consuming AOC problem ever
maurits.vdschee.nl/scatterplot/
(I don't count the 2015 leaderboard times because it probably had low sample size)

I was thinking in the line of grabbing the 6 outlying points (top, bottom, east, west, north, south) of each bot's radius, and focus on the furthest away lying inner point, guessing that it has to be a defining point of the intersection.
I have no idea if that line of thought has any merit, but it's all I can think of right now.

I got my graph on day 6 and I'm the guy with the italian task manager pic in day 14
I think the day 11 background is also from me but I'm not too sure

does Eric put out a complete solution set after the event is over?
I'm curious what the official solution is for 23 part 2

day23 pseudocode

MAIN_LOOP:

QUEUE = [(region=MAX_REGION, score=MAX_BOTS(MAX_REGION))]

while QUEUE is nonempty:
REGION, SCORE = pop highest score entry from QUEUE
if REGION's size is 1x1x1:
/*
For 1x1x1 regions, MAX_BOTS returns the actual number of
BOTS_IN_RANGE for REGION. Because we always pop the highest-score
region, we know that all regions we haven't checked have MAX_BOTS

>Instead of checking every point in REGION to see if it's IN_RANGE, we need
>to check only the point in REGION that's closest to BOT. If that point
> isn't in range, then no points are in range.
This is nuts and overly complicated for no good reason. If your region is just another nanobot then checking if there's a point in range is as simple as checking that the distance between the centers is within the sum of the radii.

Subdividing bot ranges is harder than subdividing AABBs

The best solution is to first find the largest complete subgraph of the graph where nodes are nanobots and edges are overlapping range
After that the problem becomes pretty trivial. I already explained it here

Do you think blogging about my AdventOfCode solutions will help me get a job?

I don't think it will hurt. Even better put on a wig and livestream it next year: Eric is going to retweet you and you'll get a job for sure.

just make a github repo for your solutions

Can this solution handle that pairwise overlap between a set of bots does not guarantee that there is a point where all of them overlap?

No, it's not. I posted details a few threads ago.

I'm pretty sure that for octahedrons like this every complete subgraph will have a nontrivial intersection.
That's just my intuition, I haven't proved it

I just think it would be interesting to find out if the divide by million solution was the intended one or something else
since this problem had so many different solutions

Your solution is really good. I originally wanted to solve it this way. No idea why it was ignored in the previous thread.

big congrats to anonymous user #193354!

Attached: 1521350470380.gif (283x282, 539K)

>tfw still haven't finished Day 15

being a brainlet is suffering.

Attached: 1516397503042.gif (480x480, 3.07M)

>lost motivation after day 19
Still can't decide if I should just power through for the extra raffle ticket for 200+ euros

Can't win if ya don't play

Attached: 57b.png (577x387, 62K)