aoc

My solutions for the Advent of Code
git clone https://git.tronto.net/aoc
Download | Log | Files | Refs | README

commit 8c1e54a9534d4cb16c471c92ba3eacdd33913b1b
parent 3a2ff63a3e86bf7c782b701b48dfe837692852e9
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Fri,  4 Jul 2025 15:32:49 +0200

Day 17 2022 bleah

Diffstat:
A2022/17/a.rs | 16++++++++++++++++
A2022/17/b.rs | 93+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A2022/17/common.rs | 85+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A2022/17/input | 1+
A2022/17/test | 1+
5 files changed, 196 insertions(+), 0 deletions(-)

diff --git a/2022/17/a.rs b/2022/17/a.rs @@ -0,0 +1,16 @@ +mod common; +use common::*; + +fn main() { + let mut screen = Screen::new(); + let rocks = get_rocks(); + let mut line = String::new(); + let _ = std::io::stdin().read_line(&mut line); + let line = &line[0..line.len()-1]; // remove newline + + let mut t = 0; + for i in 0..2022 { + screen.drop_rock(&rocks[i%5], &mut t, &line); + } + println!("{}", screen.top); +} diff --git a/2022/17/b.rs b/2022/17/b.rs @@ -0,0 +1,93 @@ +// Wow this is was terrible. Clearly you have to find out at which +// exact frequency the shape repeats, but I could not find a good +// way to estimate this apart from computing the first few (10^5) +// rows and then manually checking. + +mod common; +use common::*; + +fn line_to_u8(line: &[bool]) -> u8 { + let mut r = 0; + for i in 0..SCREEN_WIDTH { + if line[i] { r |= 1 << i as u8; } + } + r +} + +fn write_lines(screen: &Screen, v: &mut [u8]) { + for i in 0..SCREEN_HEIGHT { + v[i] = line_to_u8(&screen.cell[i]); + } +} + +fn isperiod(v: &[u8], l: usize) -> bool { + const PERIOD_GUESS: usize = 10; + const TIMES_MATCH: usize = 10; + + for i in 0..PERIOD_GUESS { + for j in 1..TIMES_MATCH { + if v[i] != v[i+j*l] { return false; } + } + } + true +} + +fn find_period(v: &[u8]) -> (usize, usize) { + const PREP: usize = 1000; + const PMAX: usize = 10000; + + for start in 0..PREP { + for plen in 10..PMAX { + if isperiod(&v[start..], plen) { return (start+1, plen); } + } + } + panic!("No period of length < {} found with preperiod < {}", + PMAX, PREP); +} + +fn main() { + const N: usize = 1000000000000; + + let mut screen = Screen::new(); + let rocks = get_rocks(); + let mut line = String::new(); + let _ = std::io::stdin().read_line(&mut line); + let line = &line[0..line.len()-1]; // remove newline + + let mut i = 0; + let mut t = 0; + let mut vv = [0 as u8; SCREEN_HEIGHT]; + let mut ii = [0 as usize; SCREEN_HEIGHT]; + while screen.top < SCREEN_HEIGHT - 10 { + screen.drop_rock(&rocks[i%5], &mut t, &line); + ii[screen.top] = i; + i += 1; + } + write_lines(&screen, &mut vv); + let (prep, plen) = find_period(&vv); + + /* This part shows the period etc... + println!("prep = {prep}, plen = {plen}"); + for j in 0..10 { + for k in 0..4 { + print!(" | t={:>4} i={:>4}", j+prep+k*plen, ii[j+prep+k*plen]); + } + println!(); + } + */ + + let i0 = ii[prep]; + let i1 = ii[prep+plen]; + + let n = (N - i0) / (i1 - i0); // How many full repeats + let t = n * plen + prep; // How tall is the thing after n full repeats + // Remainder (unlike in the example case, it does not end with full repeat) + let mut rem = 0; + for j in 0..SCREEN_HEIGHT { + if ii[j] >= i0 + (N - i0) % (i1 - i0) { + rem = j-prep; + break; + } + } + println!("{}", t + rem - 1); +} diff --git a/2022/17/common.rs b/2022/17/common.rs @@ -0,0 +1,85 @@ +use std::cmp::max; + +pub const SCREEN_WIDTH: usize = 7; +pub const SCREEN_HEIGHT: usize = 100000; + +pub struct Screen { + pub cell: [[bool; SCREEN_WIDTH]; SCREEN_HEIGHT], + pub top: usize +} + +#[derive(Debug)] +pub struct Rock { + pub a: Vec<(usize, usize)>, + pub h: usize +} + +pub fn get_rocks() -> Vec<Rock> { + vec![ + Rock { a: vec![(0, 0), (0, 1), (0, 2), (0, 3)], h: 1 }, + Rock { a: vec![(0, 1), (1, 0), (1, 1), (1, 2), (2, 1)], h: 3 }, + Rock { a: vec![(0, 0), (0, 1), (0, 2), (1, 2), (2, 2)], h: 3 }, + Rock { a: vec![(0, 0), (1, 0), (2, 0), (3, 0)], h: 4 }, + Rock { a: vec![(0, 0), (0, 1), (1, 0), (1, 1)], h: 2 } + ] +} + +fn in_bounds(position: (i32, i32)) -> bool { + position.0 >= 0 && position.1 >= 0 && position.1 < SCREEN_WIDTH as i32 +} + +impl Screen { + pub fn new() -> Screen { + Screen { + cell: [[false; SCREEN_WIDTH]; SCREEN_HEIGHT], + top: 0 + } + } + + fn allowed(&self, rock: &Rock, p: (i32, i32)) -> bool { + for r in &rock.a { + let (i, j) = (r.0 as i32 + p.0, r.1 as i32 + p.1); + if !in_bounds((i, j)) || self.cell[i as usize][j as usize] { + return false; + } + } + true + } + + fn draw(&mut self, rock: &Rock, p: (usize, usize), b: bool) { + for r in &rock.a { + self.cell[r.0 + p.0][r.1 + p.1] = b; + } + } + + fn move_rock(&mut self, r: &Rock, p: (usize, usize), d: (i32, i32)) -> (usize, usize) { + let newpos = (p.0 as i32 + d.0, p.1 as i32 + d.1); + if !self.allowed(r, newpos) { return p; } + let newpos = (newpos.0 as usize, newpos.1 as usize); + newpos + } + + pub fn drop_rock(&mut self, r: &Rock, t: &mut usize, gas: &str) { + let mut p = (self.top + 3, 2); + loop { + let d = gas.chars().nth(*t % gas.len()).unwrap(); + let d = if d == '>' { (0, 1) } else { (0, -1) }; + p = self.move_rock(r, p, d); + *t += 1; + let q = self.move_rock(r, p, (-1, 0)); + if p == q { break; } else { p = q; } + } + self.draw(r, p, true); + self.top = max(self.top, p.0 + r.h); + } + + #[allow(dead_code)] + pub fn print(&self) { + for i in (0..=self.top).rev() { + for j in 0..SCREEN_WIDTH { + print!("{}", if self.cell[i][j] { '#' } else { '.' }) + } + println!(" {i}"); + } + } +} diff --git a/2022/17/input b/2022/17/input @@ -0,0 +1 @@ +><<<<><<>>><<<>>><<><<>>>><<><<>><><<<<>>>><<>>><<<>>>><<<<><<<<>>>><>>>><>>><<><>><<>><<<<>><<><<><>><<><>>><<<>><>>><<>><<>>><<<><>>><<>>><<<<>><<<<><<<><<>>><<<>>><>>><<<>>><<<<>>>><<<>>><<<>><<<<>><<<>>><<<>>><<>><<>><<<>><>><<<><<>><<<>>>><>>>><>><<>>>><<<<><<<<><<<<><<>>>><<<>>>><<<><<>>><<<><><<>><<>>><<>><>>><<>><<>>>><<<<><<<>>><<>>>><<>>>><<>><>>><<<<>>><<<>><<<<><>>><>><<<<>>><<>>><><<<>>><<<><<<>><<<<>>>><<<><<<><<>>>><<<>>><<><<>>>><<<<>><<>><<<<>>>><<<><<>>><<<<>>>><<<<>>>><<<<>><><>><<>>>><>>>><<<<>><>>><<<<>>><><<><<<>>>><><<<>><<>>><<<>>><<<>><<<><<>><<><<>>>><<>>><<<<><<<<><>>>><<>><<>>><<<>>>><<<<>>>><<<>>>><<>><>>>><><<<>>>><<<<><>>><>>><<>>>><>>><<<<><<>>><<<<><<>>><<>><<<>><<<<>>><<>>><<<>>><>>><<<<><>>><><<<<>>><>>><<<<><><<<<>>>><<>>><<<<>>><<<<>>>><>>>><<><<<<>>><<<<>><<<<>><<>><<<<>>>><<<>>>><<<<>>><>>>><<<<>><<<<>><<>>>><<<><<<>>>><<><<<<>>>><><<<<>><>><<>>>><<<<>>><<>>><<>>><<<>>>><>>><<<<>>>><>>><<>><<><<>><<><<><<<>>><>><<<>><<<><<<<><<<<>><<>><<<<>>>><<<<><<<<>>>><<><<><<<<>><<<>>><>>><<<<><><>><<>>><<><>>><<<>><<<<><<<<>>><<<>>>><<>><<><<<<>><<<<>>><<>><<>><<<<><>>>><><<>>>><>>><<<><>><<>>>><>>><<<<><<<<>>><<<>>><<<>>>><<<<><<<<>>>><<><<<<>>><<<>><<>>>><<>>><<>><<><<<<>>><<>><<><<<<>>><<<><<<<>>><<>>>><<<<>><>>>><<<<>>><<>>><<><<>><<<>>><<<<>>>><<<<>><<><<>><<<<>>>><><<<><><<<><<<><<<<>><>><<<>>><><<<><<<<><<<>><>>><<>><>>><<>><<>><><>>>><<<><>>><<>>>><<<>><<<>><<<<>>><<<<>>><<<<>>>><>><<<>><<>><<<><<>>>><>><<<><<<<>>><<><<<<>><<>>><<<<>>>><<<>>>><>>><<<>>><<<>>><<>><<<<>>>><<<<><><<<<>>>><<<>><<<<><<<<>>><<<<>>>><<>>><<<<>>>><<<<><<<><>>>><<>>>><<<<>><<<>>>><<<<>><<>>>><>><>>>><<<>><<>>>><<<>>>><<>><<<>>>><<<>><>><><<><>><>><<<>><<<>>><<>>><<<<>>><<<><<>>><<<<><>>>><<><>>>><<><<<>>>><><<<<>>><<<<>><<>>>><<<><<<>><<><>>><<>>>><<><>>>><<<<><>><<>><<<>>><>><<<>><<<<>>><<<<>><>><<><<<<><<<>>><><>>><<>>>><<><<<<>>><<>>><<<><<>>><><<<><>>><<><<<>>><<>>><<><<><<<<>>><<><<<<>><<<<>><>>>><<<<><>>>><<<<>>>><<>><<<<>>>><<<<><<<>>><<<<>>><<<<><<<><<>><>>>><>>><<<>>>><<<<>>><<<>><<<<>>>><<<>>><<<<>>><<<<>>><<<>>><<>><<<>><<<<>><<<<>>>><<>><<>><>>><<<<>>><<<<>>><<<<><<>>><><<<<>><<>>>><<><<>>><>><<<><>>><<<<><<>><<>>><><<>>><<<<><<<<><>>>><<>>><<>>>><<<>>><<>>><<<<>>><<>>>><>><><<<<>>>><>>><<<><<<<>>><<><<>>>><<<<>>>><>><>><<<>>>><>><><<>>><<<<><<<>>><<>>><><<>>>><<>>>><<<><<<>>><<<><<<>>><<<><<>>><<<<>><<<>><>>><>><<<<>>>><><<<<>>>><><<<<>>>><<<>>>><<>><<<>>><<<<>>>><<<>><<><>>>><<<>>><<<<><<<>>><<<>>><<>><<>>>><<>>><>><<<>>>><<>>>><<<><<>>><<<>><><<>>><<<<>>>><<<><<>>><>><>>>><><>>><><<<<>><<<><>>>><>><<<>><>>><<<><<><><<>><<<>>>><<<<>>>><>>>><<<><<<>><>>>><<>>>><<<>>><<><<<<><<<<>><<<>><<>>><<><><<<<>>><>>>><<<><>><<><>><>>>><><>>><<><<>><<<>>>><<>><<><<<><><<<>>>><<<<>><<<<>>><<<<>>>><>>><<<<><<>>>><><<>>><<<<>><<<>><<<>>>><><<<>><<<<><<<><<>>>><<<>>>><<<<>>><<<>>>><<<<>><<<>>><<<>>><>>>><<<<><<<<>><>>>><<>><<<<>>><<<<><<<<><<<<><<<<>>><<<>><<<>><<>>>><>><<<<><<><<>>><<>>>><<<><>><<<<><<<>>>><<<<><>><<<>>>><<<<>>>><<<>><<<><<<>>>><<>>>><<<>><><<<<>>>><<>>>><<<>>><>>>><<<<>><<<<>><>>><<<<>>><>>>><<<<>>><<>>><<<>>><<<>>><<<<>>><<<<>>>><<<<>><<<<>><>>><<<<>>><<<>>><<>><<<<><<>>><>>>><<<>>><<>>><<><<<>>>><<<>>><<>>>><<>>><><<<<>><>>>><>>><>>>><<<>><<>><<<<><<<><>><<<<>>>><<<><<>><<<<>><<>><<>><<>>><<<<>>><<<<><<<>>><>><>>>><<<>>><>>>><<<<>><<<<>><>>>><<>>><<<<>>><<>>><<<<><>>>><>><><<<<>><>>><<<<>><<<<>>>><<<>>>><<<<>><<<<><<<<>>><>>><<<<>><<<><<<><><<<>>><<>>>><<<<><<<<>>><<<<><<>>><<<>>><<<<>>>><<<>>><<<<><<><<>>>><>>>><<<<>>><<<<>>>><<>>>><<<>><<<<>><<>>>><<<>>>><<<<>>><<<<>>><<<><<><<<<>>>><<><<><>>>><<<>>><<<<>>><>><>>>><<<<>><<<>>>><<<>><>>><<>><>><<<<>>>><><<<>>>><<>>>><<<<><<<>>><<<<>><<<<>>>><<<><<<>><<>><<<>>>><<<>><>>>><<>>>><<<>><>><>>>><<<>>><<<<>>>><>><<>><><>>><<<<><<>><>><>>><<>><>><<<><<>>>><<>>>><<<>>>><<>>>><><<>>>><<<>><<<<>><<<<><<<<>>>><>>>><><>>><<<<>>>><<<>><<<>>><<<<>>><<><<<>>>><>>><>>><<<>>><<<><>>><<<><<<>>>><<>>><<<<>><<<<>><<<>><<<<>>><<<<>>>><<<<>>>><>>>><><<<<>><<<<>><<<<>>><<<<>>>><>>><<>><>>><>>>><>>><<<><>><>>><><>>><>><>>>><<<<>><<<>>>><<<>>><<<<>><<<<>>><>><><<<<>><<>><<<><<>><<<<>>><<<>><>><>><<><<<>>>><<<<>><<<<><<<<><<<>>>><<><<<<>><<<>>><<><<><>>><<>><<>>>><<<>><<>><>><<>><<<>>>><>>>><><>>>><<<<>>>><<>>>><<>>>><<<<><<>><><<<<>>><<>>>><<<<>>><>>>><<<>>>><<<>><<>>><<>>><<<>>><<<<>>><<><<<<><<<<>>><<>>><<<<>>><<<>>>><<<<>><<<<>>>><<<<>>>><<><>><<>>><<>><<<>>>><>>><>><<<<>>><>><<<<>>>><<<<>><><<<><>>>><><<>>><<<<>><<<<>>><>><>>><<<>>><><<<<>>><>>><<<<>>><>>><<<>><>>>><><<<<>>>><<<<>><<<><<<>><<<>>><<<>>><<>>><>>><<<<>><>>><>>><<<>><<>>><<><<<<>><>>>><>>>><<<>><><>>><<<><>><<<>>>><<>>><<<<>>>><<>>><<<<>><<<<>>>><<<<>>>><<>>><>>>><<<<>>>><<<>>>><<<<>>><<>><><>>><<<>>>><<>>>><>>><<<<>>><<>>><<>>><<<>><>>><>>><<><<<><<<><>><><>>>><<<>>>><<<<>>>><>>><<<>>><<<<>><<<<><<>>><<>>>><<<<>>><<<<>>>><<>><<<<>>><<<<>><<<>>><<>>>><<>>>><<<<>>><<>><>><>><>><<<>>>><<<<>>>><<<>>>><<<<>>>><<<<><<<>><<<>><<<><<>>><<<>><>><<>>><<<><<><<<>>><<<<>><><<>>><<>>>><<><<<>>>><><<<>>>><<<<>><<<>>>><<>>><<<<>>><<<<>>><<<<>>>><<>>>><<><<<<>><<><<>>>><<><<>>><<<>>>><<>>><<<<>>><<<>>><<>>>><<<>>>><<<<>>><<<<>>><<<<>>><<><<>>><<<<>><<<<>>><<<><<<>>>><<<<>>>><<><><<>>><<<<><<<>>>><<<>>>><<<<>>><>>><<>>>><>><<<<>>><<<<>>>><<>><<<<>>><<<>>>><<<>>>><<<<>><>>>><<<<>>>><<<>><>>><<<<><<<>>><<<<>>>><<<<>>><<>>>><<>>>><<<>>><<<<>><>>><<<<>><<<<>>>><>><<<>>>><<><<>>>><<<>>><<><>>>><<<>>><<<>>>><<<<><<<>><<<<><<<>>>><<<<>>>><<<>>>><<<>>><>>>><<<><>>><<<<><<<><>><>><>><<<<>>><<><<<>>><<>><<<<>>><<<<>>><<<<>>><<><<<<>>>><<>>><<<>><<<>><>><<<>>>><>>>><<<<>><<><<<>><<<<>><<>>><<<>>>><<<><><<<>>><><<<<>>><<>><<>><>><<<<>><<<<><>>>><><>>>><<<><<><<<>>><>>><<<>>><<<<><<<<><><<><<>><<>><<<<>>><>>>><<<<>><<><>><>>><>>>><<<>>><<><>><<<<><>>>><>>>><>>>><<>>>><<<>>><<>>><<<>>><>>>><<>><<>><<<<>>>><<<>>><<>><>><<<>>>><>>><<<>>><<<>>><<<<>>>><<><>><<<>>><<<>>>><>>><<><>><<<<>><<<<>>>><<<<>>>><<<>><<<<><>>>><<><><<>><>><><>>>><<<>><<<<><<<<><><><>>><>><<<<>>>><<>>>><>>>><<>><>>>><<<<>><<<<>>><><<<>><>>>><>>>><<>>>><<<<>>>><><<<<><><<<<><<<<><<<>><<<>>>><<<<>>>><>>>><<<<>><<>>>><<<<>>>><>>><<<>>>><<><>>><<<<>>>><<><<><<<>><>><<><<>><<<<>>>><>>>><<>>><<<<>>><>>>><<<>>><<<>><<<><<<><>>><>><>><<<>>>><<<<><>>>><<<<><<<<><<>>><<<>>><<<>><>>><<<>><<<>><<><<<<>><<<>>>><<<>>>><>>><<<>>>><>>>><<<><<>><>><<<<><>>>><<<<>><>>>><<<><<<<><>>><<<<>>>><<<<>>>><<<>><>><<<>>><<<><<<<>><<><>>><<>>>><>><><<<<>>>><<<<>>><<>><<><<<<><<<<>>><<<>><<><<><>>>><>><<<<><<<><<<<>><<<<>><<<>><<><<<<><<<>>>><<><<<<>><<<<>>>><>>><<<<><<<>>><>>>><>>>><<<>>>><<>>>><<>>><<>>>><<>><<<<>>><<<>>><<<<>><<><<>>>><>><<>>>><<<<><<<>>>><<<>>>><<<>>>><<<><<<>><>>><<<<>>><<>><<<><<>>>><<<><<>>>><<<<>><<<<>><>><><<<>><<>>>><<<>><<<<>>><<<><<<<><<<>>><<<><<<<>>>><<>>>><>><<<<>>><><<<>>><<>>>><<<<><<>><<>>><>><<<>>>><<<<>>>><<>>>><<<<><><<<<>><><>><>><<>>><<>>><<><<<><><<<><><<>>><<<<>>>><<<>>><<<>><<<<>><<<>>><<<<><>>>><<>>>><<<<><<<>><<<>>>><<>><<>>>><<<>><<><<<>>>><>>><<<>>>><<>><<<<>>><<>><<<<><<>>><<<<>>>><>>>><<<>>><>><>>>><>>>><<>>><>>>><>>><<>>><<>>><<<>>><<<<>><>>>><<><<>>><<<>>>><<<<>>><<<><<<>>><<<>>><<>><>>><><<<><<>>><<>><<<>><<>>>><<>>>><>>>><<<>>><<<>>>><<<<>>>><><<<<>><<<>><<><<<<>><<<<><>>><>><>>><>>>><<>>><>>><<<<><<<<><<<>><>>>><>><<>>><><<<>>>><<<>>>><>>>><<<<>>><<<<>>>><<<>>><<<><>>>><><<<>><>>>><<><<<><<<>>><<>>><>>><<<<>>>><<><<<<>>>><<>>><<<<>>>><<<><<<<><>>><<<><>>><<<<>>><<<<><><<<<>><<<>><<<<><<<>><>>><>><<>>>><<>>><<<<>>><>>><<><<<<>>><>><<<<>>><><><<>>>><<<>>>><<>>>><<<<><>>>><<<<>><<>>>><>><<<>>><<>><>>><<<><<<>><<<><<>>><>>><<><<>><<<<><<>>>><<>>>><<<>>><<<<>><<<>><<<>>><<<>><<<<>>><<<<><><<<><><<<>><><>>>><>>>><<<><<<><<<<><<<>>>><<>><>>>><<<<>>>><>><<<<>>><>>>><<<><<<>>>><<<>>><><<<>>>><<<>>><<<<>>><>>><<<<><<<>><<<><><<<>><<><>>>><<>><<>>><<>><<<><>>>><<>><<<>><<>><>>><<<><<<<>>><<>>>><<>>><<<<>>><>>>><<<<>>><<<<>>><<>>><<>>>><<<<><>><<<>>><<<>>><>><<>>><><>><<>>><<<<>><<<<><<<<>>><<<<>>><<>>>><<<<>>>><>>><<<<><<>>>><<>>><>><<<<><<<<>>><<>>><<<<>>><<<><<>><<<<>>><>>>><<<>>>><<>><>><<<><<<>>>><<>>><<<<>>>><<<<>><<<<>>>><<<>>>><<>>><<<<>>><<<>>>><<>>><><>>>><<<<>>><<<<>>><<<>>>><<<<>>>><>>>><<>>>><><<>><>>>><<<<>>><<<<><<<>><>><<>>>><<>><>>><<>><<>>><<>>><<>>>><<<<>><<<<>><<<<>>>><<<<>>>><<>><<<><<>>><<>>><<<<>>><>>>><<><>><><>>><<<>><<<<>>>><<>><<<><<<>>><<<<>>><<>>>><<>><<<>>><<>>>><<>><<>>><<<<>><<<<>><<<><<<>>>><<<>>><<<<>><>><>>><>>>><>>>><<>>>><>>><<<>>><<><>>>><<<<>>><<<>><<<<>><<><>>>><<<<><<><>>><<<<>><<<<>>><<<><<><<<>><>>>><<<<>><<<<>>>><<<>>><><<>>>><<><><<>>><<<<>><<<<>>><>>>><<<>><<<<>>>><<<>>><<<<>>>><<><<<>>><<>>><<<><><<<<><><<>><<<<>>>><<<<>><<<<><<>>>><>><>><<>>>><>>>><<<<>><><<<>><<<>>>><<><<>><<<<>><<><>>>><<<<>><<>><<<>>><>>>><<<<><<<<>><<<><<>>>><<<><<<>>>><<>>>><<<<><>>><<<>>>><<<<>>>><>><>>>><<<>><<>>>><<<>>>><>>>><<<<>>>><<<<>>><<<><<><<<<>><>>>><<<>>><<>><<<<>>><<<<>><>><>>>><>>>><<>><>>>><<<<>>><>>><<<<>><<><<<>>><<>>>><<<<>>>><><><<<>>><<<<><<<<>><<><<<<>><<<>>><<><<<<>>>><<<<>><>><>><><><<><>><<<<>>><<><<<>>><<><<>>>><<<><<<<><<<<><<>>><>>><<>>><<>>>><<><<<<>>>><><<><<>>><><<<<>><>>><><<<<>>><<<<>><<<>>>><<<<><<<>><<<>><<><><<<>><<<>>>><<<><<<><>>><<<<>>><<>><<<>>><<<>>><<<><<><<<<>>><<<><>>>><<><<<>>><>>><<<>>><<<>>>><<<>>><<<>>>><<<><<>>><<>><<<>>>><<<<>><<<<><><<<<>><<>><<<>>><<<>><<<>>><<<<>><<>><>><<<><<>>><<<>>><>>><<<>>><<<>><<<>>>><<<<>><<>><<>><><<<>><<<<>>><<<>>><<<<><>>><<<<>><<<<>>>><<<>>><<<<>><<>>><<>>><<<>>><<<>><<>>>><><<>>>><><<>>><><<<<>>>><<<<>><>><<<<>>><<<>><<<><<>>><<<<><>>><>>><<>>>><<><<<>><<<>>><<<>>><<<>><<>><<><<<<><<<<>>><<<><<<<><<<<><<<><<<><>>><<>>>><>>>><>>><<><<<<><<<>>><<<>>><<><<<<>>>><<<<>>>><<>>>><<>>>><<<<><<>><>><<<><><><>><<<>><<<<>>>><<<<>><<<<>>><<><<<<>><<><>>><<<>><<<><<<<>><><<<<><<<>>><>>><<>>><<>>>><><<>><>>>><<<<><<<<><<><<<>><<<>>>><<>><<>>>><<<<>><<<>><<<><<>><<>>><<>>><<>>><<>>>><<>>><<<<>>><<><<<<>><>><<<><<<>>><<>>>><<<>><>>><<><<<<>>>><>>>><<><>>><<<<><<<><>>>><<<<>>>><<<><>><<<<><<<>>>><<<><<<<>>><<<>><><>><>>>><<<<>>>><>><<<<>>><<>><<<<><<>>>><<<<>><>>><>><<<>>>><>><<<><><<>>>><<<>><<>><>><<><<>><>>><>>><<><><<>>>><<>>>><>>><<>>>><>>< diff --git a/2022/17/test b/2022/17/test @@ -0,0 +1 @@ +>>><<><>><<<>><>>><<<>>><<<><<<>><>><<>>