CINXE.COM

About - Advent of Code 2022

<!DOCTYPE html> <html lang="en-us"> <head> <meta charset="utf-8"/> <title>About - Advent of Code 2022</title> <link rel="stylesheet" type="text/css" href="/static/style.css?31"/> <link rel="stylesheet alternate" type="text/css" href="/static/highcontrast.css?1" title="High Contrast"/> <link rel="shortcut icon" href="/favicon.png"/> <script>window.addEventListener('click', function(e,s,r){if(e.target.nodeName==='CODE'&&e.detail===3){s=window.getSelection();s.removeAllRanges();r=document.createRange();r.selectNodeContents(e.target);s.addRange(r);}});</script> </head><!-- Oh, hello! Funny seeing you here. I appreciate your enthusiasm, but you aren't going to find much down here. There certainly aren't clues to any of the puzzles. The best surprises don't even appear in the source until you unlock them for real. Please be careful with automated requests; I'm not a massive company, and I can only take so much traffic. Please be considerate so that everyone gets to play. If you're curious about how Advent of Code works, it's running on some custom Perl code. Other than a few integrations (auth, analytics, social media), I built the whole thing myself, including the design, animations, prose, and all of the puzzles. The puzzles are most of the work; preparing a new calendar and a new set of puzzles each year takes all of my free time for 4-5 months. A lot of effort went into building this thing - I hope you're enjoying playing it as much as I enjoyed making it for you! If you'd like to hang out, I'm @ericwastl@hachyderm.io on Mastodon and @ericwastl on Twitter. - Eric Wastl --> <body> <header><div><h1 class="title-global"><a href="/">Advent of Code</a></h1><nav><ul><li><a href="/2022/about">[About]</a></li><li><a href="/2022/events">[Events]</a></li><li><a href="https://teespring.com/stores/advent-of-code" target="_blank">[Shop]</a></li><li><a href="/2022/auth/login">[Log In]</a></li></ul></nav></div><div><h1 class="title-event">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="title-event-wrap">/*</span><a href="/2022">2022</a><span class="title-event-wrap">*/</span></h1><nav><ul><li><a href="/2022">[Calendar]</a></li><li><a href="/2022/support">[AoC++]</a></li><li><a href="/2022/sponsors">[Sponsors]</a></li><li><a href="/2022/leaderboard">[Leaderboard]</a></li><li><a href="/2022/stats">[Stats]</a></li></ul></nav></div></header> <div id="sidebar"> <div id="sponsor"><div class="quiet">Our <a href="/2022/sponsors">sponsors</a> help make Advent of Code possible:</div><div class="sponsor"><a href="https://www.rewe-digital.com/en" target="_blank" onclick="if(ga)ga('send','event','sponsor','sidebar',this.href);" rel="noopener">REWE digital</a> - Same same but different? Way more than that! Discover the new REWE digital and our Home of 2,200+ Riddle Solvers. Happy Coding, folks!</div></div> </div><!--/sidebar--> <main> <article> <p>Hi! I'm <a href="http://was.tl/">Eric Wastl</a>. I make Advent of Code. I hope you like it! I also made <a href="http://vanilla-js.com/">Vanilla JS</a>, <a href="http://phpsadness.com/">PHP Sadness</a>, and <a href="http://was.tl/projects/">lots of other things</a>. You can find me on <a href="https://twitter.com/ericwastl">Twitter</a>, <a href="https://hachyderm.io/@ericwastl" target="_blank">Mastodon</a>, and <a href="https://github.com/topaz">GitHub</a>.</p> <p><em>Advent of Code</em> is an <a href="https://en.wikipedia.org/wiki/Advent_calendar">Advent calendar</a> of small programming puzzles for a variety of skill sets and skill levels that can be solved in <a href="https://github.com/search?q=advent+of+code">any</a> programming language you like. People use them as <a href="https://y3l2n.com/2018/05/09/interview-prep-advent-of-code/">interview</a> <a href="https://twitter.com/dznqbit/status/1037607793144938497">prep</a>, <a href="https://twitter.com/pgoultiaev/status/950805811583963137">company training</a>, <a href="https://gitlab.com/imhoffman/fa19b4-mat3006/wikis/home">university</a> <a href="https://gribblelab.org/teaching/scicomp2021/index.html">coursework</a>, <a href="https://twitter.com/mrdanielklein/status/936267621468483584">practice</a> <a href="https://comp215.blogs.rice.edu/">problems</a>, a <a href="/leaderboard">speed contest</a>, or to <a href="https://www.reddit.com/r/adventofcode/search?q=flair%3Aupping&restrict_sr=on">challenge each other</a>.</p> <p>You don't need a computer science background to participate - just a little programming knowledge and some <a href="https://www.reddit.com/r/adventofcode/comments/7kd8jt/what_would_you_say_are_the_minimal_skills_for/dre0uu3/">problem solving skills</a> will get you pretty far. Nor do you need a fancy computer; every problem has a solution that completes in at most 15 seconds on ten-year-old hardware.</p> <p>If you'd like to support Advent of Code, you can do so indirectly by helping to <span class="share">[Share<span class="share-content">on <a href="https://twitter.com/intent/tweet?text=Daily+programming+puzzles+at+Advent+of+Code&amp;url=https%3A%2F%2Fadventofcode%2Ecom%2F&amp;related=ericwastl&amp;hashtags=AdventOfCode" target="_blank">Twitter</a> <a href="javascript:void(0);" onclick="var ms; try{ms=localStorage.getItem('mastodon.server')}finally{} if(typeof ms!=='string')ms=''; ms=prompt('Mastodon Server?',ms); if(typeof ms==='string' && ms.length){this.href='https://'+ms+'/share?text=Daily+programming+puzzles+at+Advent+of+Code+%23AdventOfCode+https%3A%2F%2Fadventofcode%2Ecom%2F';try{localStorage.setItem('mastodon.server',ms);}finally{}}else{return false;}" target="_blank">Mastodon</a ></span>]</span> it with others or directly via <a href="support">AoC++</a>.</p> <h2>--- General Tips ---</h2> <p>If you get stuck, try your solution against the <em>examples</em> given in the puzzle; you should get the same answers. If not, re-read the description. Did you misunderstand something? Is your program doing something you don't expect? After the examples work, if your answer still isn't correct, <em>build some test cases</em> for which you can verify the answer by hand and see if those work with your program. Make sure you have the entire puzzle input. If you're still stuck, maybe <em>ask a friend</em> for help, or come back to the puzzle later. You can also ask for hints in the <a href="https://www.reddit.com/r/adventofcode/" target="_blank">subreddit</a>.</p> <h2>--- Frequently Asked Questions ---</h2> <p id="faq_codeselect"><em>Is there an easy way to select entire code blocks?</em> You should be able to triple-click code blocks to select them. You'll need JavaScript enabled.</p><pre><code>#!/usr/bin/env perl use warnings; use strict; print "You can test it out by "; print "triple-clicking this code.\n"; </code></pre> <p id="faq_auth"><em>How does authentication work?</em> Advent of Code uses <a href="https://en.wikipedia.org/wiki/OAuth" target="_blank">OAuth</a> to confirm your identity through other services. When you log in, you only ever give your credentials to that service - never to Advent of Code. Then, the service you use tells the Advent of Code servers that you're really you. In general, this reveals no information about you beyond what is already public; here are examples from <a href="https://api.reddit.com/user/reddit/about" target="_blank">Reddit</a> and <a href="https://api.github.com/users/octocat" target="_blank">GitHub</a>. Advent of Code will remember your unique ID, names, URL, and image from the service you use to authenticate.</p> <p id="faq_compete"><em>Should I compete on the global leaderboard?</em> Maybe. Solving puzzles is hard enough on its own, but competing for a spot on the global leaderboard also requires <a href="https://blog.vero.site/post/advent-leaderboard">many</a> <a href="https://kevinyap.ca/2019/12/going-fast-in-advent-of-code/">additional</a> <a href="https://gist.github.com/mcpower/87427528b9ba5cac6f0c679370789661">skills</a> and a lot of practice. Depending on the puzzle, that day's leaderboard usually fills up anywhere between two minutes and an hour. If that sounds interesting, go for it! However, you should do Advent of Code in a way that is useful to you, and so it is completely fine to choose <a href="https://www.reddit.com/r/adventofcode/comments/e2wjhf/comment/f90ksek/">an approach that meets your goals</a> and ignore the leaderboard entirely.</p> <p id="faq_difficulty"><em>Why was this puzzle so easy / hard?</em> The difficulty and subject matter varies throughout each event. Very generally, the puzzles get more difficult over time, but your specific skillset will make each puzzle significantly easier or harder for you than someone else. Making puzzles is <a href="https://www.reddit.com/r/adventofcode/comments/7idn6k/question_why_does_the_difficulty_vary_so_much/dqy08tk/">tricky</a>.</p> <p id="faq_unlocktime"><em>Why do the puzzles unlock at midnight EST/UTC-5?</em> Because that's when I can consistently be available to make sure everything is working. I also have a family, a day job, and even need sleep occasionally. If you can't participate at midnight, that's not a problem; many people use <a href="/leaderboard/private">private leaderboards</a> to compete with people in their area.</p> <p id="faq_highcontrast"><em>I find the text on the site hard to read. Is there a high contrast mode?</em> There is a high contrast alternate stylesheet. Firefox supports these by default (View -&gt; Page Style -&gt; High Contrast).</p> <p id="faq_puzzleideas"><em>I have a puzzle idea! Can I send it to you?</em> Please don't. Because of legal issues like copyright and attribution, I don't accept puzzle ideas, and I won't even read your email if it looks like one just in case I use parts of it by accident.</p> <p id="faq_puzzlebugs"><em>Did I find a bug with a puzzle?</em> Once a puzzle has been out for even an hour, many people have already solved it; after that point, bugs are very unlikely. Start by asking on the <a href="https://www.reddit.com/r/adventofcode/" target="_blank">subreddit</a>.</p> <p id="faq_streaming"><em>Can I stream my solution?</em> Please try to avoid giving away the solution while people are competing. If a puzzle's global daily leaderboard isn't full yet and you're likely to get points, please wait to stream/post your solution until after that leaderboard is full. If you are unlikely to get points or the daily leaderboard is already full for the puzzle you're working on, streaming is fine.</p> <p id="faq_ai_leaderboard"><em>Can I use AI to get on the global leaderboard?</em> Please don't use AI / <a href="https://en.wikipedia.org/wiki/Large_language_model" target="_blank">LLMs</a> (like GPT) to automatically solve a day's puzzles until that day's global leaderboards are full. By "automatically", I mean using AI to do most or all of the puzzle solving, like handing the puzzle text directly to an LLM. The leaderboards are for human competitors; if you want to compare the speed of your AI solver with others, please do so elsewhere. (If you want to use AI to <em>help</em> you solve puzzles, I can't really stop you, but I feel like it's harder to get better at programming if you ask an AI to do the programming for you.)</p> <p id="faq_copying"><em>Can I copy/redistribute part of Advent of Code?</em> Please don't. Advent of Code is free to <em>use</em>, not free to copy. If you're posting a code repository somewhere, please don't include parts of Advent of Code like the puzzle text or your inputs. If you're making a website, please don't make it look like Advent of Code or name it something similar.</p> <h2>--- Credits ---</h2> <p>Puzzles, Code, &amp; Design: <a href="http://was.tl">Eric Wastl</a></p> <p>Beta Testing:</p> <ul> <li><a href="https://twitter.com/Sr_Giannetti">Tim Giannetti</a></li> <li>Ben Lucek</li> <li><a href="http://thespaceabove.us/">JP Burke</a></li> <li><a href="https://twitter.com/Aneurysm9">Aneurysm9</a></li> <li>Andrew Skalski</li> </ul> <p>Community Managers: <a href="https://reddit.com/message/compose/?to=/r/adventofcode">Danielle Lucek</a> and <a href="https://twitter.com/Aneurysm9">Aneurysm9</a></p> <p>Playing: You!</p> <section id="legal"> <h2>--- Legal ---</h2> <p>Advent of Code is a registered trademark in the United States. The design elements, language, styles, and concept of Advent of Code are all the sole property of Advent of Code and may not be replicated or used by any other person or entity without express written consent of Advent of Code. Copyright 2015-2024 Advent of Code. All rights reserved.</p> <p>You may link to or reference puzzles from Advent of Code in discussions, classes, source code, printed material, etc., even in commercial contexts. Advent of Code does not claim ownership or copyright over your solution implementation.</p> </section> </article> <script> (function(){ var fragment = location.hash.substr(1); if (!fragment.length) return; var focus = document.getElementById(fragment); if (!focus) return; focus.style.backgroundColor = "rgba(255,255,255,.3)"; requestAnimationFrame(function(){ focus.style.transition = "background-color 3s ease-out"; focus.style.backgroundColor = "rgba(255,255,255,0)"; }); })(); </script> </main> <!-- ga --> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-69522494-1', 'auto'); ga('set', 'anonymizeIp', true); ga('send', 'pageview'); </script> <!-- /ga --> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10