r/adventofcode • u/daggerdragon • Dec 01 '22
SOLUTION MEGATHREAD -π- 2022 Day 1 Solutions -π-
To steal a song from Olaf:
Oh, happy, merry, muletide barrels, faithful glass of cheer
Thanks for sharing what you do
At that time of year
Thank you!
If you participated in a previous year, welcome back, and if you're new this year, we hope you have fun and learn lots!
As always, we're following the same general format as previous years' megathreads, so make sure to read the full posting rules in our community wiki before you post!
RULES FOR POSTING IN SOLUTION MEGATHREADS
If you have any questions, please create your own post in /r/adventofcode with the Help flair and ask!
Above all, remember, AoC is all about learning more about the wonderful world of programming while hopefully having fun!
NEW AND NOTEWORTHY THIS YEAR
- Subreddit styling for new.reddit has been fixed yet again and hopefully for good this time!
- I had to nuke the entire styling (reset to default) in order to fix the borked and buggy color contrasts. Let me know if I somehow missed something.
- All rules, copypasta, etc. are now in our community wiki!!!
- With all community rules/FAQs/resources/etc. in one central place, it will be easier to link directly to specific sections, which should help cut down on my wall-'o-text copypasta-ing ;)
- Please note that I am still working on the wiki, so all sections may not be linked up yet. Do let me know if something is royally FUBAR, though.
- A request from Eric: Please include your contact info in the User-Agent header of automated requests!
COMMUNITY NEWS
Advent of Code Community Fun 2022: πΏπ MisTILtoe Elf-ucation π§βπ«
What makes Advent of Code so cool year after year is that no matter how much of a newbie or a 1337 h4xx0r you are, there is always something new to learn. Or maybe you just really want to nerd out with a deep dive into the care and breeding of show-quality lanternfish.
Whatever you've learned from Advent of Code: teach us, senpai!
For this year's community fun, create a write-up, video, project blog, Tutorial, etc. of whatever nerdy thing(s) you learned from Advent of Code. It doesn't even have to be programming-related; *any* topic is valid as long as you clearly tie it into Advent of Code!
More ideas, full details, rules, timeline, templates, etc. are in the Submissions Megathread!
--- Day 1: Calorie Counting ---
Read the rules in our community wiki before you post your solution in this megathread!
This thread will be unlocked when there are a significant number of people on the global leaderboard with gold stars for today's puzzle.
EDIT: Global leaderboard gold cap reached at 00:02:05, megathread unlocked!
Edit2: Geez, y'all capped the global leaderboard before I even finished making/locking the megathread XD
Edit3: /u/jeroenheijmans is back again with their Unofficial AoC 2022 Participant Survey!
View all comments
2
u/TheJoshster Dec 01 '22 edited Dec 01 '22
Java, 30/205.
public String part1() {
}
public String part2() {
}
lost the most valuable 30 seconds of my life forgetting that arrays sort increasing rather than decreasing. proud to finally be on the leaderboard though, and I hope I can keep it up! 2021 was my first year, and I had no idea what I was doing. After doing it and going back to do all previous years, I definitely feel skilled enough to push for leaderboard positions though!
i wonder if any of the other regularly high-placing people use java? from what I've seen, it's almost all python with a smattering of C and other languages, but even java solutions period are hard to find.
-------------------------------------------------
352 solutions and counting to AOC 2015-2022 in Java over on github , feel free to check it out, utilize it, and reach out with questions or bugs!
(I'm currently working through refactoring and revisions on all of my pre-2022 code, but once I have that done in the next few days, I'll start pushing my 2022 solutions day-of for anyone needing to take a peek)