Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.
:siren: And now, for the grand finale... Day 25! :siren: [ goto ]

Think you know code? Want internet points on a leaderboard? Check out Advent of Code!

quote:

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.

My buddy who created this crazy thing is equal parts genius and madman, and now he's sharing his insanity with you. Whether you're looking for an excuse to learn a new language or brush up on a rarely-used language (or stick to your tried-and-true), the Advent of Code will give you a run for your money.

So, let's get this Advent party started. Every midnight I'll (try to remember to) post the daily challenge summary. It's up to you to make 'em go!

--- Day 1: Not Quite Lisp ---

quote:

Santa was hoping for a white Christmas, but his weather machine's "snow" function is powered by stars, and he's fresh out! To save Christmas, he needs you to collect fifty stars by December 25th.

Collect stars by helping Santa solve puzzles. Two puzzles will be made available on each day in the advent calendar; the second puzzle is unlocked when you complete the first. Each puzzle grants one star. Good luck!

daggerdragon fucked around with this message at 06:03 on Dec 25, 2015

Adbot
ADBOT LOVES YOU

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.
--- Day 2: I Was Told There Would Be No Math ---

quote:

The elves are running low on wrapping paper, and so they need to submit an order for more. They have a list of the dimensions (length l, width w, and height h) of each present, and only want to order exactly as much as they need.

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.
--- Day 3: Perfectly Spherical Houses in a Vacuum ---

quote:

Santa is delivering presents to an infinite two-dimensional grid of houses. [...] However, the elf back at the north pole has had a little too much eggnog, and so his directions are a little off, and Santa ends up visiting some houses more than once. How many houses receive at least one present?

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.
Oh good, the forums are finally back up. Here's day 4's belated post.

--- Day 4: The Ideal Stocking Stuffer ---

quote:

Santa needs help mining some AdventCoins (very similar to bitcoins) to use as gifts for all the economically forward-thinking little girls and boys.

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.
--- Day 5: Doesn't He Have Intern-Elves For This? ---

quote:

Santa needs help figuring out which strings in his text file are naughty or nice.

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.

Ephphatha posted:

I didn't feel that dirty doing it that way, my slow rear end perl script took less than a second to do part 1 and about 3 seconds to do part 2. Only crashed my terminal once when I called the script with no input and triggered a warning on every iteration... This string parsing challenge was pretty simple to do with perls regex engine as well.

Is there any way to change what link is associated with your name to something other than the default for the login service you used? I used Google as my id provider but I'd rather link my github profile than my g+ profile if I end up making it onto the leaderboard.

My buddy is not willing to screw with the logins while the Advent is running since we're trying to make sure that the server (and code) stay stable for the entire duration of the Advent.

However, you can create another account using your Github profile, re-use your existing code (you did save it, right?) to solve up to today's puzzle, and only use that one to solve future puzzles from now on if you want to try to make it on the leaderboard.

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.
--- Day 6: Probably a Fire Hazard ---

quote:

Because your neighbors keep defeating you in the holiday house decorating contest year after year, you've decided to deploy one million lights in a 1000x1000 grid.

Furthermore, because you've been especially nice this year, Santa has mailed you instructions on how to display the ideal lighting configuration.

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.
--- Day 7: Some Assembly Required ---

quote:

This year, Santa brought little Bobby Tables a set of wires and bitwise logic gates! Unfortunately, little Bobby is a little under the recommended age range, and he needs help assembling the circuit.

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.
--- Day 8: Matchsticks ---

quote:

Space on the sleigh is limited this year, and so Santa will be bringing his list as a digital copy. He needs to know how much space it will take up when stored.

Santa needs to get a goddamn Kindle or something for that list of his...

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.

LOOK I AM A TURTLE posted:

I found Day 8 to be simpler in comparison.

We've noticed that Day 8 was polarizing in that players either immediately understood and knew how to solve it (like you) or had absolutely no clue where to even start. It's fascinating.

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.
--- Day 9: All in a Single Night ---

quote:

Every year, Santa manages to deliver all of his presents in a single night.

This year, however, he has some new locations to visit; his elves have provided him the distances between every pair of locations. He can start and end at any two (different) locations he wants, but he must visit each location exactly once. What is the shortest distance he can travel to achieve this?

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.
--- Day 10: Elves Look, Elves Say ---

quote:

Today, the Elves are playing a game called look-and-say. They take turns making sequences by reading aloud the previous sequence and using that reading as the next sequence.

daggerdragon fucked around with this message at 05:59 on Dec 11, 2015

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.
--- Day 11: Corporate Policy ---

quote:

Santa's previous password expired, and he needs help choosing a new one.

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.
--- Day 12: JSAbacusFramework.io ---

quote:

Santa's Accounting-Elves need help balancing the books after a recent order. Unfortunately, their accounting software uses a peculiar storage format. That's where you come in.

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.
--- Day 13: Knights of the Dinner Table ---

quote:

In years past, the holiday feast with your family hasn't gone so well. Not everyone gets along! This year, you resolve, will be different. You're going to find the optimal seating arrangement and avoid all those awkward conversations.

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.
--- Day 14: Reindeer Olympics ---

quote:

This year is the Reindeer Olympics! Reindeer can fly at high speeds, but must rest occasionally to recover their energy. Santa would like to know which of his reindeer is fastest, and so he has them race.

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.

Xarn posted:

Why is the site down just as I decided to procrastinate and code? :v:

Ah, sorry about that, I should have put a notice up this morning when the datacenter lost power >_< We were only out for like, 45 minutes. I'm just glad it happened at 10am and not near midnight :/

"Your server is offline" = worst alarm clock ever.

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.
--- Day 15: Science for Hungry People ---

quote:

Today, you set out on the task of perfecting your milk-dunking cookie recipe. All you have to do is find the right balance of ingredients.

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.
--- Day 16: Aunt Sue ---

quote:

Your Aunt Sue has given you a wonderful gift, and you'd like to send her a thank you card. However, there's a small problem: she signed it "From, Aunt Sue".

You have 500 Aunts named "Sue".

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.
--- Day 17: No Such Thing as Too Much ---

quote:

The elves bought too much eggnog again - 150 liters this time. To fit it all into your refrigerator, you'll need to move it into smaller containers. You take an inventory of the capacities of the available containers.

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.
--- Day 18: Like a GIF For Your Yard ---

quote:

After the million lights incident, the fire code has gotten stricter: now, at most ten thousand lights are allowed. You arrange them in a 100x100 grid.

Never one to let you down, Santa again mails you instructions on the ideal lighting configuration. With so few lights, he says, you'll have to resort to animation.

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.

Volguus posted:

What I hope is that in January we would get the really nice and elegant solutions to all these problems which would put my brute-forced crap to shame.

There aren't that many clean and elegant solutions, if the solution megathreads in the subreddit are any indication. Most people are just coding as fast and as sloppily as they can in order to hit the leaderboard, and half as many are taking the easy way out with libraries like itertools. Ah well.

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.
--- Day 19: Medicine for Rudolph ---

quote:

Rudolph the Red-Nosed Reindeer is sick! His nose isn't shining very brightly, and he needs medicine.

Red-Nosed Reindeer biology isn't similar to regular reindeer biology; Rudolph is going to need custom-made medicine. Unfortunately, Red-Nosed Reindeer chemistry isn't similar to regular reindeer chemistry, either.

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.
--- Day 20: Infinite Elves and Infinite Houses ---

quote:

To keep the Elves busy, Santa has them deliver some presents by hand, door-to-door.

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.
--- Day 21: RPG Simulator 20XX ---

quote:

Little Henry Case got a new video game for Christmas. It's an RPG, and he's stuck on a boss. He needs to know what equipment to buy at the shop. He hands you the controller.

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.
--- Day 22: Wizard Simulator 20XX ---

quote:

Little Henry Case decides that defeating bosses with swords and stuff is boring. Now he's playing the game with a wizard. Of course, he gets stuck on another boss and needs your help again.

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.
--- Day 23: Opening the Turing Lock ---

quote:

Little Jane Marie just got her very first computer for Christmas from some unknown benefactor. It comes with instructions and an example program, but the computer itself seems to be malfunctioning. She's curious what the program does, and would like you to help her run it.

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.

Spraynard Kruger posted:

Man, it really feels like the difficulty in these has ramped up lately, and yet, the top 100 on the leaderboard seem to always be half hour or less solves. I'm still stuck on finding algorithms for days 19 and 20 that can run in a reasonable amount of time. :(

Oh no, sir. Day 19 took drat near 4 hours just to cap the leaderboard at 100 gold. I had to go to work at 9am. :/ Good luck! :D

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.
--- Day 24: It Hangs in the Balance ---

quote:

It's Christmas Eve, and Santa is loading up the sleigh for this year's deliveries. However, there's one small problem: he can't get the sleigh to balance. If it isn't balanced, he can't defy physics, and nobody gets presents this year.

No pressure.

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.
And now for the grand finale...

--- Day 25: Let It Snow ---

quote:

Merry Christmas! Santa is booting up his weather machine; looks like you might get a white Christmas after all.

The weather machine beeps! On the console of the machine is a copy protection message asking you to enter a code from the instruction manual. Apparently, it refuses to run unless you give it that code. No problem; you'll just look up the code in the--

"Ho ho ho", Santa ponders aloud. "I can't seem to find the manual."

Merry Christmas, everyone!

Adbot
ADBOT LOVES YOU

daggerdragon
Jan 22, 2006

My titan engine can kick your titan engine's ass.

Jabor posted:

Urgh, I finished 16 and 21-25 by hand (being away from my normal dev machine), but now I guess I need to find somewhere to actually code up solutions to 17-20.

How long is this going to be up?

My friend has no plans to take it down. As long as the server can handle the traffic, it'll stay up. :)

  • Locked thread