234 lines
8.6 KiB
HTML
234 lines
8.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en-us">
|
|
<head>
|
|
<meta charset="utf-8"/>
|
|
<title>Day 7 - Advent of Code 2025</title>
|
|
<link rel="stylesheet" type="text/css" href="/static/style.css?32"/>
|
|
<link rel="stylesheet alternate" type="text/css" href="/static/highcontrast.css?2" 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 takes all of my free time for months every year. 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 @was.tl on Bluesky and @ericwastl@hachyderm.io
|
|
on Mastodon.
|
|
|
|
- Eric Wastl
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-->
|
|
<body>
|
|
<header><div><h1 class="title-global"><a href="/">Advent of Code</a></h1><nav><ul><li><a href="/2025/about">[About]</a></li><li><a href="/2025/events">[Events]</a></li><li><a href="/2025/shop">[Shop]</a></li><li><a href="/2025/settings">[Settings]</a></li><li><a href="/2025/auth/logout">[Log Out]</a></li></ul></nav><div class="user">buhman</div></div><div><h1 class="title-event"> <span class="title-event-wrap"><y></span><a href="/2025">2025</a><span class="title-event-wrap"></y></span></h1><nav><ul><li><a href="/2025">[Calendar]</a></li><li><a href="/2025/support">[AoC++]</a></li><li><a href="/2025/sponsors">[Sponsors]</a></li><li><a href="/2025/leaderboard/private">[Leaderboards]</a></li><li><a href="/2025/stats">[Stats]</a></li></ul></nav></div></header>
|
|
|
|
<div id="sidebar">
|
|
<div id="sponsor"><div class="quiet">Our <a href="/2025/sponsors">sponsors</a> help make Advent of Code possible:</div><div class="sponsor"><a href="/2025/sponsors/redirect?url=https%3A%2F%2Fwww%2Eboot%2Edev%3Fpromo%3DADVENTOFCODE" target="_blank" onclick="if(ga)ga('send','event','sponsor','sidebar',this.href);" rel="noopener">Boot.dev</a> - Become more than a vibe-coder! Master backend development from start to finish on Boot.dev: the most addicting way to learn to code.</div></div>
|
|
</div><!--/sidebar-->
|
|
|
|
<main>
|
|
<article class="day-desc"><h2>--- Day 7: Laboratories ---</h2><p>You thank the cephalopods for the help and exit the trash compactor, finding yourself in the <a href="/2024/day/6">familiar</a> <a href="/2018/day/4">halls</a> of a North Pole research wing.</p>
|
|
<p>Based on the large sign that says "teleporter hub", they seem to be researching <em>teleportation</em>; you can't help but try it for yourself and step onto the large yellow teleporter pad.</p>
|
|
<p>Suddenly, you find yourself in an unfamiliar room! The room has no doors; the only way out is the teleporter. Unfortunately, the teleporter seems to be leaking <a href="https://en.wikipedia.org/wiki/Magic_smoke" target="_blank">magic smoke</a>.</p>
|
|
<p>Since this is a teleporter lab, there are lots of spare parts, manuals, and diagnostic equipment lying around. After connecting one of the diagnostic tools, it helpfully displays error code <code>0H-N0</code>, which apparently means that there's an issue with one of the <em>tachyon manifolds</em>.</p>
|
|
<p>You quickly locate a diagram of the tachyon manifold (your puzzle input). A tachyon beam enters the manifold at the location marked <code>S</code>; tachyon beams always move <em>downward</em>. Tachyon beams pass freely through empty space (<code>.</code>). However, if a tachyon beam encounters a splitter (<code>^</code>), the beam is stopped; instead, a new tachyon beam continues from the immediate left and from the immediate right of the splitter.</p>
|
|
<p>For example:</p>
|
|
<pre><code>.......S.......
|
|
...............
|
|
.......^.......
|
|
...............
|
|
......^.^......
|
|
...............
|
|
.....^.^.^.....
|
|
...............
|
|
....^.^...^....
|
|
...............
|
|
...^.^...^.^...
|
|
...............
|
|
..^...^.....^..
|
|
...............
|
|
.^.^.^.^.^...^.
|
|
...............
|
|
</code></pre>
|
|
<p>In this example, the incoming tachyon beam (<code>|</code>) extends downward from <code>S</code> until it reaches the first splitter:</p>
|
|
<pre><code>.......S.......
|
|
.......|.......
|
|
.......^.......
|
|
...............
|
|
......^.^......
|
|
...............
|
|
.....^.^.^.....
|
|
...............
|
|
....^.^...^....
|
|
...............
|
|
...^.^...^.^...
|
|
...............
|
|
..^...^.....^..
|
|
...............
|
|
.^.^.^.^.^...^.
|
|
...............
|
|
</code></pre>
|
|
<p>At that point, the original beam stops, and two new beams are emitted from the splitter:</p>
|
|
<pre><code>.......S.......
|
|
.......|.......
|
|
......|^|......
|
|
...............
|
|
......^.^......
|
|
...............
|
|
.....^.^.^.....
|
|
...............
|
|
....^.^...^....
|
|
...............
|
|
...^.^...^.^...
|
|
...............
|
|
..^...^.....^..
|
|
...............
|
|
.^.^.^.^.^...^.
|
|
...............
|
|
</code></pre>
|
|
<p>Those beams continue downward until they reach more splitters:</p>
|
|
<pre><code>.......S.......
|
|
.......|.......
|
|
......|^|......
|
|
......|.|......
|
|
......^.^......
|
|
...............
|
|
.....^.^.^.....
|
|
...............
|
|
....^.^...^....
|
|
...............
|
|
...^.^...^.^...
|
|
...............
|
|
..^...^.....^..
|
|
...............
|
|
.^.^.^.^.^...^.
|
|
...............
|
|
</code></pre>
|
|
<p>At this point, the two splitters create a total of only <em>three</em> tachyon beams, since they are both dumping tachyons into the same place between them:</p>
|
|
<pre><code>.......S.......
|
|
.......|.......
|
|
......|^|......
|
|
......|.|......
|
|
.....|^|^|.....
|
|
...............
|
|
.....^.^.^.....
|
|
...............
|
|
....^.^...^....
|
|
...............
|
|
...^.^...^.^...
|
|
...............
|
|
..^...^.....^..
|
|
...............
|
|
.^.^.^.^.^...^.
|
|
...............
|
|
</code></pre>
|
|
<p>This process continues until all of the tachyon beams reach a splitter or exit the manifold:</p>
|
|
<pre><code>.......S.......
|
|
.......|.......
|
|
......|^|......
|
|
......|.|......
|
|
.....|^|^|.....
|
|
.....|.|.|.....
|
|
....|^|^|^|....
|
|
....|.|.|.|....
|
|
...|^|^|||^|...
|
|
...|.|.|||.|...
|
|
..|^|^|||^|^|..
|
|
..|.|.|||.|.|..
|
|
.|^|||^||.||^|.
|
|
.|.|||.||.||.|.
|
|
|^|^|^|^|^|||^|
|
|
|.|.|.|.|.|||.|
|
|
</code></pre>
|
|
<p>To repair the teleporter, you first need to understand the beam-splitting properties of the tachyon manifold. In this example, a tachyon beam is split a total of <em><code>21</code></em> times.</p>
|
|
<p>Analyze your manifold diagram. <em>How many times will the beam be split?</em></p>
|
|
</article>
|
|
<p>To begin, <a href="7/input" target="_blank">get your puzzle input</a>.</p>
|
|
<form method="post" action="7/answer"><input type="hidden" name="level" value="1"/><p>Answer: <input type="text" name="answer" autocomplete="off"/> <input type="submit" value="[Submit]"/></p></form>
|
|
<p>You can also <span class="share">[Share<span class="share-content">on
|
|
<a href="https://bsky.app/intent/compose?text=%22Laboratories%22+%2D+Day+7+%2D+Advent+of+Code+2025+%23AdventOfCode+https%3A%2F%2Fadventofcode%2Ecom%2F2025%2Fday%2F7" target="_blank">Bluesky</a>
|
|
<a href="https://twitter.com/intent/tweet?text=%22Laboratories%22+%2D+Day+7+%2D+Advent+of+Code+2025&url=https%3A%2F%2Fadventofcode%2Ecom%2F2025%2Fday%2F7&related=ericwastl&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=%22Laboratories%22+%2D+Day+7+%2D+Advent+of+Code+2025+%23AdventOfCode+https%3A%2F%2Fadventofcode%2Ecom%2F2025%2Fday%2F7';try{localStorage.setItem('mastodon.server',ms);}finally{}}else{return false;}" target="_blank">Mastodon</a
|
|
></span>]</span> this puzzle.</p>
|
|
</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> |