From c681727fb35f5740cefdeda641831622b2fef475 Mon Sep 17 00:00:00 2001 From: Keenan Tims Date: Sat, 21 Dec 2024 21:15:59 -0800 Subject: [PATCH] day22: part 1 solution --- .aoc_tiles/tiles/2024/20.png | Bin 7925 -> 9455 bytes .aoc_tiles/tiles/2024/22.png | Bin 3307 -> 8228 bytes README.md | 5 ++- src/day22.rs | 64 +++++++++++++++++++++++++++++++++++ src/lib.rs | 1 + 5 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 src/day22.rs diff --git a/.aoc_tiles/tiles/2024/20.png b/.aoc_tiles/tiles/2024/20.png index 852cf09c6fbef1cf7dfcec6b87f0f5e82e43c5a8..5d13312f54475862d3b11400c352bdb0cea751f7 100644 GIT binary patch literal 9455 zcmY+KWl&pP7pPB>7cUftV#VDZio07NxYOcLptwVDFAk;9Vu2u~NNIrL#f!UJf#Q;) zx%uwgKX+y)nK}7!&g`}KTF-j+Nzl_#CBUV|1pt6RT}{aV_4^C;all4HeQWLfu>b(( z7Ih_gqky90P*bm$ss&DSkqV_=(E#>ZrCI_hM?$9GdZy!%i|Nh6>igE2Yn0nvC~ zCb$a#M9H5dNuWY69Pu*c5ohNJ`O?0o?j@=V(XQJhsjmAso4SUI=8FTl%&iR^1=<7E zpW<#LKBE`=3a3ATvrDVq_WMw)5&#S{p^M?$dD8WaqnSbDyxghVd89F)fT(|Xc|%rB z`>@W5FlE(fAqP;*chCqwG)kXLgHq19*!leKtb^<6<)B0kCa}>D%9~XAFz2dqL?_9Y zwrDtE8cS9}nJ0cL6TzUZ4s###ClYxE$jvC-?&V@Ve|it8y|w3^yC7xw^}CIDmfG@- z%zprBeK?M>D;@1=Ep(qo@zq9KTa)M3#pc%(J{_5U{SW^2x{@trwXa#RHTkjY!LzvA=z2Ju;-gs5*}U%p7ErZ-@G)}T;cK4=Cx3aU!B*na zTy!S+LM!D^izrzuH0wgeeYb4E3-NgyGi}mJQQN1#Wj;vu4&kuC*ITFw2GW_Sy26`$ zd+~^bZ*i-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)<+I9a?kV_pa62kw1&V|$JE`y#M##W>{jZWW`al2vPbT60cSS|3cVC*b&T zqO`TR(q>TuH!OzvYi-J7->Cl!z)ZL9WoBme#CcM%&qL3Cjq4JoGhSY+4$Cp&HJo*j4ceR;4dC7-U@k24NW0NT|-791=UQTVYPHE|34V&W~6nUJ__(G zaZYY6ie8d{j#v1#ci`ykE)cp@kkdafAZ=ppO}}XTbcSz3JIaNeaNbhWG8IO9b^Fm3 z4VZPh+8p>YQ)!%;nTbFagccguTG$3skOy-70u--_WQt_946Yc}qt-iZ)1Z($3Z8PV zM^_Z6mtp`pbZa{|q_VQ|Ejzo4vhwLi{cCLw$>&;g9&yte zn?Ge$ZT_nrVaQ5*aWRWT?h{hPQsYJqr3Eead*#-hq4h(F$Z;LZLWp|bkItAdcgF>- zBb!ZS<>f|gfw#y8PeFcut%0+=yu7Zit}3)|at^)m$>0`cGjgxZFPD8EE%RE;%>olO zH*H>2p8l_RNWW@wnof?-$-CoQS(CVyrNs+`2v;_wyH3j=_% Myt-Vaj9K{q07qAFd;kCd diff --git a/.aoc_tiles/tiles/2024/22.png b/.aoc_tiles/tiles/2024/22.png index 3b27ddce2972c9aff648b152d45b0ac025bb476c..56fdee5eed79bfb438dcedd535316e53cef665eb 100644 GIT binary patch literal 8228 zcmY*;1yEFP)c#5c5-PDEARtIL(j|g)3ohL$-MJu23KB}g(y$;bEFrOUE=WsDcP`z% z-~PUD=0EeFd2h_zd(WAB-uFG{d7cxcrJ+bnKurJu0Em^9-3lzaMm*8C(RfN0Qk`>0RnK5L}091yOht(`#+S;q=rpOE+`4vqv&DHr_~y?A{3`fVo4p$04jsF}Oj=;lePsMUoYVU)UAt z%`z=Q|LENgTu-a^V#QtWqcpD@Cr);}*yAjzUe0Vk|4pt7>ezD019t!bJ~<IX7e(;5)=>6 zdurz0^72xYPc{}cgdaT=l-O@;;;rgccDUkh5pDqFa?%Ho%OmOL*_Q4ZLk91{C-eln zrJmOI>7KUux{bXecW?$yYPPPRnv#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w z^;KnOxfZbgzAi_hzFU9VzXfxy(nr+Zqyj_WnSdw$yzo?WU1zPBGK0p%26NE1VA55P zmLPKZxwOyXi1T0mobMY*u5oBgX-M}%us}mb&!*Vuu6{HEku})y1P^{

- 2024 - 40 ⭐ - Rust + 2024 - 43 ⭐ - Rust

@@ -65,4 +65,7 @@ + + + diff --git a/src/day22.rs b/src/day22.rs new file mode 100644 index 0000000..b6ff2e8 --- /dev/null +++ b/src/day22.rs @@ -0,0 +1,64 @@ +use aoc_runner_derive::{aoc, aoc_generator}; + +fn evolve_secret(mut n: i64) -> i64 { + n = ((n * 64) ^ n) % 16777216; + n = ((n / 32) ^ n) % 16777216; + n = ((n * 2048) ^ n) % 16777216; + n +} + +fn rounds(mut secret: i64, n: i64) -> i64 { + for _ in 0..n { + secret = evolve_secret(secret) + } + secret +} + +fn parse(input: &str) -> Vec { + input.lines().map(|l| l.parse().unwrap()).collect() +} + +#[aoc(day22, part1)] +fn part1(input: &str) -> i64 { + let secrets = parse(input); + + secrets.iter().map(|s| rounds(*s, 2000)).sum::() +} + +#[aoc(day22, part2)] +fn part2(input: &str) -> i64 { + todo!() +} + + +#[cfg(test)] +mod tests { + use super::*; + const EXAMPLE: &str = "1 +10 +100 +2024"; + + #[test] + fn evolution() { + assert_eq!(evolve_secret(123), 15887950); + assert_eq!(evolve_secret(15887950), 16495136); + assert_eq!(evolve_secret(16495136), 527345); + } + + #[test] + fn test_rounds() { + assert_eq!(rounds(1, 2000), 8685429); + assert_eq!(rounds(10, 2000), 4700978); + } + + #[test] + fn part1_example() { + assert_eq!(part1(EXAMPLE),37327623); + } + + #[test] + fn part2_example() { + assert_eq!(part2(EXAMPLE), 0); + } +} \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index 0a534d1..320bb98 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,6 +12,7 @@ pub mod day19; pub mod day2; pub mod day20; pub mod day21; +pub mod day22; pub mod day3; pub mod day4; pub mod day5;