2021 day 11

This commit is contained in:
Dimitri Lozeve 2024-12-04 22:35:40 +01:00
parent 1412646bd1
commit 08d93ade69
4 changed files with 38 additions and 0 deletions

13
2021/day11/day11.bqn Normal file
View file

@ -0,0 +1,13 @@
in'0'-˜>•FLines"input"
fs«,»,«˘,»˘,»(»˘),«(«˘),«(»˘),«˘»
Flash{𝕊flashedm:
flashed+9<m
flashed,(¬flashed)×m++´fs{𝕎𝕩}¨<9<m
}
Step{𝕊fm:
Flash•_while_{´9<1𝕩} (f)0,1+m
}
•Show +´+´¨Step(1+100)(in)0,in
•Show /´¨¨Step(300)(in)0,in

10
2021/day11/input Normal file
View file

@ -0,0 +1,10 @@
8261344656
7773351175
7527856852
1763614673
8674556743
6853382153
4135852388
2846715522
7477425863
4723888888

5
2021/day11/smalltest Normal file
View file

@ -0,0 +1,5 @@
11111
19991
19191
19991
11111

10
2021/day11/test Normal file
View file

@ -0,0 +1,10 @@
5483143223
2745854711
5264556173
6141336146
6357385478
4167524645
2176841721
6882881134
4846848554
5283751526