do day20 for 2020

This commit is contained in:
2022-09-25 23:43:24 -04:00
parent 81acc2d472
commit 8deb5610a0
37 changed files with 2141 additions and 10 deletions
+7
View File
@@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "aoc-2021"
version = "0.1.0"
+8
View File
@@ -0,0 +1,8 @@
[package]
name = "aoc-2021"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
+2000
View File
File diff suppressed because it is too large Load Diff
+98
View File
@@ -0,0 +1,98 @@
[[{[<{{<<{<[<{<>[]}([][])>{{<>()}<()>}](({{}<>}[[]<>])<([]<>){[]()}>)>[<{{<>}<[]()>}[{[][]}<{}{}>]><{<
{[<[({([[(<<(([]{}))<[{}()]>>>)]])<([<{[{({}{})[[]()]}[(()[])<{}()]]]{{[[][]]<<>[]>}}}{([([
{<{<{(({[[([{<<><>>([]())}[{()[]}({}())]}<{{{}}{[]<>}}({<>{}})>){<(([]())([]<>))(<<>[]><[]<>>)>({[[]
{[([<{<([{{(({()<>}({}<>)))(<{<>{}}](<<>[]><()()>))}{[{{[]()}(<>[])}{{[][]}{<>{}}}]}}{[{{{{}[]}<<>()>}}<{([]
[({[{[(<<<[((<{}<>><{}{}>)({[]<>}((){}))){{[{}<>]{{}<>}}})[<[<<>>[<>{}]]{{<>[]}}>]>>[[([<{<><>}
<[{[{[[<{[[{<<[]()>[{}<>]>}]<([{{}}({}{})])>]{<[[<<><>><()[]>]([[]<>]{[]<>})]{(([][]){()[]})
((<(<(<[(<([(<{}<>>(()()))](<{{}[]}{()[]}>))<<<(<>[]){()()}>([<>{}]{{}})>({{[][]}(()())}(<
{{([(<{<([([[[<><>][()<>]]{(()[])}])]({<[<<>>[()<>]]({()[]}[{}()])>]))>({<<[<{[]()}<<>[]>>{<[]
([<{{((<({<[<({}<>)[[]()]>]([(<>)<(){}>](([][]){{}{}}))>{(({<>[]}<()()>){(()[])})[{{[][]}((){})}[([]<>)({}{})
<<<{<{<([<[((<()<>]<[]()>)[(<>[])[{}<>]])]><[<[(()())[()()]]{[{}{}][()()]}>]{<<(<>())[<>[]]>>[<(()())<[]
{<[[({<[{[{[({{}<>}<<>{}>){<{}[]><{}{}>}]{{<<>>}<(<>()){()<>}>}}]}{{<[({{}()})([()<>]{[]})
(((([[(((<(<<(<>())[(){}]>([[][]]{()()})>{<[<>[]][()<>]>(([]{})[<>{}])})[({{()<>}({}())})]>([[[(()<>)][[<>()
[<({([[[<<([<<<>()>>{[<>()](<>{})}]){<[[{}<>]]<{{}<>}([]{})>>}>[<<<{{}()}>>[[([][])<<><>>]({<>
{<(<<{{<<[({{({}<>)[[][]]}(<()[]>[<>])}<{<()>{{}()}}>){{<[(){}][(){}>><{{}<>}[[]{}]>}}]<{<{
{(<{<[<(<<(<[([][])<[]{}>]><{([]())(<>{})}{<(){}><[][]>}>><({({}[]){<>()}}{<{}>(())})>>{({{(<><>)[{}()]}
[(<{[<<[{((({[{}<>][[]<>]}){(<{}<>>({}<>))<(<><>)[<>]>})<({{<>[]}}}>)}]>([{{<<{{[][]}(<>())}<{{}
<<<[[{[<<{[{<(()[])<[]()>>}[(({}[]))(({}<>){<>})]](([{(){}}[<>]]<[{}{}]<{}<>>>))}>{{[(((()[]){(){}})(<(){}>{
[{{<<([[[[<<[{(){}}{(){}}]{<{}()>(()())}>{{<{}()>}<[<><>][()()]>)>([{{()<>}<()[]>}[[<><>]{[]<>}]]{[{
<[[{[{<[(({({[<>{}]}([<>[]]))<<[<><>]([]<>)>([{}()][()()))>}[((<{}>{[]{}}))[[{{}}[<><>]]]])(([{{[]()}<[]
{{{<{([[[<[<{{(){}}({}{})}>[[{()[]}<[]{}>]<<()<>>[()[]]>]}<{[[[]()]<<><>>]({<><>}<[][]>)}{(<[]()><{}<>>)}>>
([<<[(([{{[([{<>{}}])<[(()){<>{}}]>](<{([][])[<>()]}<{{}()}>>)}>{[{{(<()()>[<><>])((<><>){()()})}{([[][]])[[{
[{((({<([{(<{(<>)[[]()]}({{}<>}<[]<>>)>)}(<<[({}{})]{({}<>)[<>()]}>>[<[[()<>]{<>()}][<[][]><<>{}>]>[<([][])[(
(<[{<[<((<{<[{<>[]}{{}<>}]([[][]]{{}[]})>[<[(){}]{[]()}>({<>}{<><>}}]}>[[(<{()[]}<()[]>>[{{}()}<<>[]>
({{<([{<<<<<{{()}({}())}<[()]{[]{}}>>[([()<>]([][]))<{()<>}>]>>>>}<{[[[<<<<>()>{[]{}}>[({}()){(){}}]
<[{([<<(<(<[(({}()){[][]})[[(){}][[]()]]][<[{}]([][])>]>}>(<{[({[]<>}{(){}})<(<>)({}())>]<[({}<>)<{
(({[{<({<<[<{{[]<>}[<><>]}{{{}}<()[]>}>]<<<{()()}{{}<>}>([[]()][<>()])>>><[([(<><>)<()[]>]
{([<<[{[(({[{{()<>}({}{})}<[{}[]]<(){}>>]<{<[]<>>}<[()()][()()]>>}<<[[(){}](<><>)]><(<{}[]>
{([<{<([(<(<(<[]{}>{<>()}){{<>{}}}>({<[][]>(<>{})}))<[<[{}{}]<{}{}>>{(<>[])(<>())}][<{{}<>}(()[]
[{[(<(({{(<{(<[][]>){[<>{}]}}{<{(){}}{<><>}>({[]{}}{[]{}})}>)(<[(([]<>))[[[]()]<[]<>>]]<{({}[])<{}<>>}[
[{<{({((<{[{[<<>{}>[[]]]{<{}()>[<>]}>]}>[{([(<[][]>{[]()}){<(){}>[<>[]]}][[([]<>)<[]{}>]{{{}}[{}]}])([
{<(<({[{[(({((<>[])<{}{}>)({[]<>>[{}[]])}([{(){}}([])]{<<>[]>[{}()]}))[[<[<><>]<<><>>>{[()()]<
{{{<[<<{(<(([({}<>)<()>]{<()()><[]<>>})(<[()[]]{[]{}}>{{{}{}}(<>())}))({([[]()]{()[]}){{{}<>}[
(<({{[{<{[<[[{[]()}]([[]()][<>{}])][[[<>]{<>}]<([]{})<{}[]>>]>{[{{<><>}[[][]]}<{[]{}}({}())>](<[[]()]({
<<[{[<{<[[(<[<(){}>(<>)](<[]<>>[[]()])>{<<{}[]><{}()>>[(()[])(<>{})]})({({{}<>}[<>{}])}{({[][]}<<><>>)})]({<[
[[([<{{(<({[{([][])(()<>)}]{{{[]<>}[()()]}[({}{})[()[]]]}}>><[[{{[()()]({}())}}({(()[])[[]()]}{
<<{(<(([{((<([()()]){{[]<>}{{}()}}>)<<<({}<>)[<>{}]><({}[])<[]<>>>>(<[[]]{(){}}>(([][])([])))>)[{[{([]<>)[<>{
[(<(<<{{[([[[({}{})<()())]({[]}{{}[]})]({[()()]([]{})}{({}[])[[]()]})]<[[{<><>}<[][]>][[[]()]{(){}}]]>){(([<(
[[<[<{<[{({{{{<>{}}<[]()>}<<(){}>>}<{{{}{}}{()<>}}[([]{}){<>{}})>})[[((<<><>>[{}[]])<{()<>}<()
((<(<<[[{{{(<<{}()>[()()]><((){})>)[[[[][]][()[]]][{[]<>}<{}{}>]])((([[]{}]<[]{}>))([{<>{}}(<
{{(({[{[({({<<<>[]><<>[]>>{{()[]}[{}()]}})[{(<{}<>><[]>)(({}[]){{}[]})}<<<[]()><[]{}>><{<><>}<()<>>>>]})
[(<[{[<({{[{<[<>()]([]{})><{(){})[()[]]>}<(<()()>(()()))(<{}[]>({}[]))>]([([[]()]({}{}))({(){}}([](
{({(({[<{<[<<{<><>}(<>[])>[<{}{}><[]<>>]><<{<>}>>](<<<()<>>(()<>)>{<{}[]>([]<>)>>)>}<{<{{<<
<([[[(({[{<(({<>[]}<<>[]>){<{}[]>([]()))){<({}<>)<[][]>>{<{}{}>{()[]}}}>{((({}{})[{}[]]))({[<><>]}<<<>{}
[{[[[{<<(({[({[][]}<[]<>>)<{{}()}{{}}>]{({[]}[<>{}]){<[][]>[{}{}]}}})[[([<<>()>(<>[])]<<<>
<({<<[(({[([{[()[]]({}{})}{{()[]}[()[]]}])[([((){}){<><>}]{<()[]>{{}{}}})]][[{<[()()]({}<>
[{<([<({{<<[((<>[])(<><>))((()[])([][]))][(([][])<<>()>)]>[<<{()<>}<{}<>>><<{}<>>{()<>}]><{[()[
[<{[<([{((({<<[]{}><{}{}>>([{}<>]<<><>>)})[[(<{}<>>([]<>))<<{}()>{{}<>}>]{[<[]<>>][[{}<>]<{}[
({<{<[<({([<{<()()>{{}[]}}({<>{}})><{[[]<>]<[]()>}<[{}()]{{}[]}>>])}([<<[{[]<>}<<><>>][<[]{
{[({<[[<<<(<{<{}<>>(()())}[{()}{()<>}]>)[<{{(){}}(()<>)}>{[([]{})(()<>)]{[(){}]{()[]}}}]>{{[<<[]()><()<>>>{
<[{{({({(<<{[(()<>){[]()}][<[]>(()())]}{<(<><>}{()[]}>}>(<<{{}()}<[][]>>[{()<>}{{}{}}]>)>)}<[(<((<(
[<{[<[{[[[([<(<>{}){{}<>}>(<<>{}>{{}{}})]{({<>[]}<{}()>)<({}<>)<{}{}>>}){<[[[]{}]{{}{}}]<<[]<>>(()[])>
{[{((<(<[(((<({}[]){[]()}>)))]([{<(<<>{}>[[]])<[[][]][(){}]>>[{[{}<>]{[]<>}}{(<>())(())}]}[{<{{}()}<<>[]>>}[[
[[[{{(<<<<((<((){}){[]<>}><<(){}><()<>>>){[<[][]>({}[])](({}{})<[][]>)})[[{(<>>}([{}()][{}()])]]>>>((<{[
[[({<[[<([<[((<>{})({}<>))({{}{}}(()[]))]<<((){})<()()>>[<[][]><{}{}>]>>({[<()()>[[][]]]})])>
([<(<{(<<[<{{([]<>)[<>[]]}<<()()>[(){}]>}><([[<>[]]](({}[])))({(()())<(){}>}<[<>>[()()]>)>]>>)
{(({([{[{(<[[((){})(<>{})]<(()())(()[]>>]{([{}]{[][]})}>)<((((()<>)[<><>])<((){})[()()]>)[[<()<>>][<{}
{{([{{<<({{<<<[]()><()[]>}{{()<>}}>[<{()<>}<[]{}>><{{}[]}[{}[]]>]}})({{({[<>{}]<(){}>}(<<>>(()<>)))(<
<[[{<(<{{<[<{({}())}({[][]}{<><>})>{[<<>{}><()[]>]<[<>[]]<<>[]]>}]>(({[{[]()}<[]<>>]{<<>><<>[]>}}))}([[<
([{<[{<({{[((<{}<>>[(){}])({()<>})){{<<>{}>}[<{}()>{()[]}]}]}[{(({()[]}(<><>))[<{}()>(<>[])])<[{()[]}[
{<[{({<((<({[{[][]}{{}[]}]{[<>()][<>{}]}}((({}())([]()))<([][])[[][]]>)}({[[[][]]({}())]}{({{}}){(<>[])
{{[{{({(<(<[[[[]{}](<><>)]([[]{}]{<>[]})]>({{{()[]}([])}[{[][]}(<><>)]](({[]}<<>[]>))))>)}({{[{{(([])
[<[{[{<<({{[{[<>{}]<(){}>}]}<{(({}()){{}<>})(<{}()>{[]<>})}{<[[]{}]>}>}[<[[([][])[[]]]]{{([]())[{}<>]}<({
([<({{[((<({(([]<>){[]<>))[({}())([]<>)]})[{{{{}<>}{{}[]}}}<<([]{})({}[])>[<()[]>]>]><([[[{}<>]<()>]([<>{}
<[<{[[[<{{[[([[]<>]{(){}))[[{}<>][[][]]]](([<>[]]<<>[]>)[(()<>){()<>}])]}[<<((())(<>{}))<{[]()}<[
[{[[{[[(<<(<({{}[])[<>()])><[[[]()](<>())]<{[]<>}({}())>>){[<{<>{}}[[]<>]>]}>{{<[<<>()>[()[]]
[(([{(([{<[<[<{}[]>[<><>]]>({[{}{}]{[]{}}})]>}{{[[<[{}{})<()()>>{{<>}{{}[]}}]{{([][])[<>{}]}{
(((<<<<[(<[<{{()()}<[]{}>}<{[][]}{<>[]}>>[[[()()]{{}{}}]]]({[<()()><[]{}>]{{[]{}}([]())}}<{<()<>>[<>]}<<{}
<([<[[<<[(({(({}())<{}>)<(()[])[{}[]]>})<<({{}}[[]{}])[({}{})((){})]><<{{}()}{[][]}>>>)]>[[(
<<<{(<{{(([{<{()[]}><<[]{}>{{}[]}>}{(<[][]>[[]<>])[{()<>}]}](<[[<><>][<>[]]]([()[]]<{}()>)>))<(
{[[([<<[[(<((<()()>(<><>))[[{}()]<()<>>]){[((){}){[]{}}][[{}[]]]}>([<((){}){(){}}>[([]{}){()[]}]]))]<[<<{<<><
([{[{([<{{{[<(()[])({}())>{[<>{}]{{}<>}}]{(([]<>){<>}){[()<>]<()[]>}}}(<<[{}<>](()[])>{[[]()]
[<((<<<[{[((([<>{}]){[(){}]})<<{<>{}}({}[])>[[[]{}]<()[]>]>){<(<<>()>(<>[]))[(()[]){[]<>}]>
<(([({[[[[<<[[[]()]]<<()[]>>>>{{<[()[]]{{}{}}>{<[]()>{()[]}}}<[({}<>)[()<>]]>}]([([[()()]<<>{}>])<{<{
<{([([((<{{[([()[]]{{}()})][(<<><>>){{{}[]}[[]<>]}]}}>[((<(<<>>[[]<>])[(()[]){()<>]]><<{{}
{<[[({{<<[<<<{()[]}<<>{}>>([[]<>]((){}))>[{[<>()]{{}<>}}[({}())]]>{[{{[]()}({}())>]({{(){}}<()<>>}{<(){}>{
{(<[{[{{[<(<({(){}}<[]()>)(<<>[]>{<>{}})>)>]({[{[({}()){<><>}]<[[]<>]{<>{}}>}(<<{}{}>([]<>)>(({}{}){(
((<((((<<({[{{{}[]}(()())}{<()()>}]<[[<>[]][(){}]][{()[]}]>}(([<[][]>][<[]()>({}[])])[<<[]()>[{}<>
[[{<[(<{{<{<[{<>()}[[]]]({{}<>})>{{{()[]}<{}<>>}}}<({{()[]}}[[<>()](()[])])<[([]<>)[{}<>]][([][]
<{{[{[{(<<({{{{}[]}{[]<>}}<[[]{}]{{}[]}>}[({{}{}}<[]()>){[[]<>]}])((<{()()}[[]{}]>({()<>}<
({{{<({{<<[<[{()<>}[[]<>]]<[{}{}][<>[]]>>({[{}()]<<>>}[(<><>)({}())])][([{<>()}{<>{}}]{(<>()){()[]
[((<({(<<({[<(<>{})<[]<>>>[([])[(){}]]][{{()<>}(<><>)]<[{}{}][{}<>]>]}{<{(<><>)[{}[]]}(([])[[]{
(([{<[<{<<{{({()[]}{<>{}})[[[]<>]<[][]>]}<{<()<>>[()()]}{<<>><()<>>}>}>>[<[[<[{}<>]{[]{}}><(<
(<<<[<<<(([{{<()<>>[<>[]]}{<()[]>([][])}}])(([{{{}{}}[<>()]}({<>()}{[]{}})]<[<<>[]>]{({}<>){[]<>}
{<<[<([[({({{<{}[]>([]{})}[<()<>>[(){}]]}{[(()<>)]{<()[]>({}[])}}){<([{}[]]({}<>))(({}{})(()<>))><([(){}]<{}
{{[[<(<({<([[{[]{}}(()[])]<(<>[])>])({[[{}[]]({}<>)]})>[(<<[{}{}]<[]<>>>>{{{[]<>}[{}()]}({<><>}<<>()])}){([<
{[[{{<(({(([[<()>{()<>}]([[]()]([][]))]<<({}[]){[][]}>([<><>]{()()})>)((<[<><>]{[]<>}>[[[][])[[]<>]
[[<<{[[{([<{({[]()}({}())){{{}<>}<()()>}}([{{}()}<{}()>][{<>}[()<>]])><{{{{}[]}(<><>)}{[[]<>]<[]<>>}}>])}
({(({(<({[{((<{}><{}>){<{}()>[{}[]]})}]{[<({<><>}({}()))>{{({}<>)(()<>)}{<{}{}>{<>[]}}}]}}({[{([[]{}])[<()
({[{<<[<<[{{{{[][]}[()[]]}<<{}()>{{}()}>}{({<><>}([]))[<{}<>>(<>{})]}}{[([<>{}][()<>])([()[]])]}]<{[(<<><>
{<{<(({[[{(({{()<>}[[]<>]}[[()<>][()()]])(<((){})[<><>]>{[[]<>][()<>}}))}<[<{{{}}[{}[]]}<(
{{<[[(<[{<<((<{}<>>{(){}}))((<[]<>><{}{}>)({<>()}<()<>>))>>({[{(()[])<{}<>}}(<()()>)][<[<>{}]{<>
<[<{((([<(<<((<>())<<>()>)>(<{<>()}{[]<>]>)>)[[{{{()[]}(()())}{({}())({}<>)}}](<[{()()}<()()>]((()){<>[]})><[
(<([{[[[[[(<(<<>{}>)<{{}{}}>>(<<[]()><[]()>>(<(){}]{()()})))]]]({(<{(<()>([]{}))[{()<>}{[][]}]}([<
(([({{{<(<{[<[<>[]](<>())>(<{}{}>)]<(([]<>>(()[]))(<()()>(<>{}))>}>({{[{[][]}][{[]<>}([]{})]}(<(()
({({<{[{{([(<(()())><{[]{}}(<>())>)(<[()()]{()()}>[[[]()](<><>)])]{<<[[]<>](<>())>(({}{})<<><>>)>
((([[{[<[{(<[{<><>}{{}<>})>{<[<>{}](<>)>[<[][]><[]{}>]}){[{{()[]}<<><>>}<(<><>)({}{})>]{<{(
[[<({([{{[<{<(()())<[]<>>>{[[]{}]}}(<[{}<>]<<>()>><(()<>)[()()]>)>>{<{<[[]<>]{[]()}>{<[]<>>{[
(({[[(([[<{([[{}<>]{()()}][[{}[]]{[]{}}]){[[()[]]<[][]>][<{}{}><{}{}>]}}[{[({}())[[]<>]]}{[({})<<>>]<{<>[]}
+10
View File
@@ -0,0 +1,10 @@
[({(<(())[]>[[{[]{<()<>>
[(()[<>])]({[<{<<[]>>(
{([(<{}[<>[]}>{[]{[(<()>
(((({<>}<{<{<>}{[]{[]{}
[[<[([]))<([[{}[[()]]]
[{[{({}]{}}([{[{{{}}([]
{<[[]]>}<{[{[{[]{()[[[]
[<(<(<(<{}))><([]([]()
<{([([[(<>()){}]>(<<{{
<{([{{}}[<[[[<>{}]]]>[]]
+10
View File
@@ -0,0 +1,10 @@
4134384626
7114585257
1582536488
4865715538
5733423513
8532144181
1288614583
2248711141
6415871681
7881531438
+10
View File
@@ -0,0 +1,10 @@
5483143223
2745854711
5264556173
6141336146
6357385478
4167524645
2176841721
6882881134
4846848554
5283751526
+806
View File
@@ -0,0 +1,806 @@
527,872
94,740
502,586
33,514
349,784
1292,133
733,623
305,336
108,628
1086,396
845,128
674,761
768,317
783,154
731,697
803,844
865,96
1263,567
1141,141
1218,644
1115,429
951,373
748,326
1088,422
259,673
885,885
150,732
181,19
182,581
1130,838
647,386
53,140
27,726
1198,105
219,476
545,779
234,528
1042,145
422,852
683,726
636,40
140,590
415,824
415,637
238,478
0,347
1277,380
1076,366
984,112
808,787
321,480
576,707
999,810
1283,392
604,606
610,724
107,487
657,497
258,378
392,224
1044,498
53,754
706,606
1191,753
661,256
895,637
1015,373
455,808
825,753
929,835
581,205
1236,30
343,74
207,813
547,866
1005,558
113,420
445,4
562,326
924,593
209,621
1078,42
1265,798
923,408
1082,808
910,889
850,408
1277,268
984,809
1191,813
295,541
108,826
705,698
97,666
878,33
1245,240
1257,140
1001,416
252,478
139,51
75,732
925,750
388,502
721,703
509,254
808,532
478,386
349,299
328,85
463,210
254,126
835,281
895,569
850,155
513,782
195,465
1066,155
119,529
355,826
1078,68
176,350
459,465
1077,364
47,567
674,40
169,141
119,305
541,485
1009,642
1212,894
537,544
674,754
517,616
25,38
5,32
191,572
700,276
1004,891
492,547
701,516
65,45
319,60
1071,325
621,575
1131,834
185,560
693,571
441,140
157,533
527,32
915,221
1212,780
1131,501
463,684
1169,112
1299,269
832,350
555,733
1115,476
432,422
266,310
835,393
105,277
820,499
967,820
63,894
561,754
301,642
668,233
182,600
801,640
502,532
1134,554
546,68
11,625
373,98
1082,114
654,771
763,28
92,102
713,74
869,409
855,360
1277,864
1083,875
604,288
924,301
11,269
841,511
1037,140
868,670
759,486
604,222
917,464
1034,512
806,126
1004,865
677,670
763,866
1305,862
681,728
1251,408
955,390
224,119
465,598
87,773
442,670
492,558
1019,406
929,59
513,560
1146,323
947,646
305,224
656,632
952,520
639,82
1200,99
984,206
951,93
1283,502
150,574
825,164
432,413
965,579
436,740
445,778
840,254
1310,547
93,759
299,726
761,725
793,558
1202,826
1173,822
951,476
415,40
423,226
405,175
813,529
499,451
254,630
845,369
73,653
234,814
855,808
465,318
12,162
403,284
730,478
907,284
224,396
301,520
186,590
551,486
832,116
773,544
956,362
273,140
234,379
828,182
306,865
1193,574
176,554
1175,810
711,617
1015,541
928,644
426,808
586,826
535,753
1173,72
301,597
311,532
233,493
838,28
174,227
219,110
597,841
884,780
271,102
65,240
354,362
932,522
652,833
720,894
895,824
371,779
957,374
293,799
169,276
791,532
580,416
711,726
408,462
239,396
1077,135
754,360
609,322
880,119
497,500
289,323
875,784
239,817
455,154
137,72
1101,768
212,126
445,452
1029,546
108,68
610,170
579,162
295,521
1124,369
797,334
872,347
137,822
1202,266
649,376
984,645
1280,150
102,870
485,164
435,476
924,28
1289,819
760,525
483,3
1029,348
1255,168
276,382
808,219
108,714
1295,596
1237,395
556,222
996,232
440,341
30,150
349,336
422,826
113,754
801,621
811,239
15,364
748,568
924,749
661,638
45,798
281,546
228,114
359,476
929,588
1119,210
470,254
415,257
70,698
649,862
999,74
711,700
381,140
1305,704
313,467
70,366
475,393
1011,826
945,634
621,366
1191,305
288,728
346,700
513,112
863,81
883,161
229,493
507,396
383,252
579,732
309,864
324,425
1163,501
268,145
1094,547
579,396
438,99
157,365
1260,606
373,49
266,502
492,150
1310,632
381,59
499,655
838,313
447,813
420,515
890,515
961,670
855,154
199,422
927,102
1044,502
1128,742
408,581
1223,773
254,217
764,628
325,161
902,581
1017,416
887,226
1265,96
1071,396
535,141
1265,123
45,330
562,120
706,64
119,813
1205,277
209,871
753,661
832,126
53,280
93,588
731,396
515,619
473,173
541,409
326,533
1163,53
1101,452
1285,297
754,672
455,740
472,600
1289,147
960,640
855,534
311,74
1009,252
504,126
53,166
1257,754
836,56
758,422
1173,476
585,194
465,185
830,73
1007,611
633,670
68,516
1310,85
955,68
689,319
1283,726
513,334
426,86
669,427
1049,586
1280,744
1125,831
1292,854
663,386
1266,618
748,341
1148,547
627,420
1305,302
268,637
746,96
1252,705
232,42
1155,239
281,378
351,611
944,789
731,249
1004,193
666,422
147,277
639,805
991,834
883,875
713,841
33,127
924,252
835,255
1173,542
355,68
455,360
937,116
475,501
549,169
835,396
18,488
400,406
523,877
556,332
222,33
627,392
301,710
748,553
818,150
545,115
584,196
55,168
870,341
305,558
634,451
601,614
45,123
254,406
393,308
1101,871
131,93
970,662
801,478
415,817
1119,322
550,77
1258,486
1251,486
224,567
460,155
1170,590
238,416
358,598
835,501
786,774
353,168
835,57
855,740
507,844
811,655
179,639
1064,761
633,784
1029,378
119,753
326,85
599,866
1021,858
1082,780
1076,814
1031,416
385,750
345,579
233,530
1078,490
791,154
145,142
1056,453
922,215
283,331
393,464
1066,739
117,621
797,560
609,798
705,196
982,137
604,560
957,168
627,502
557,681
1128,600
604,334
793,542
445,871
386,642
621,268
1280,374
231,226
191,322
445,96
845,576
1305,592
218,42
729,732
435,110
445,116
181,478
919,558
525,402
465,766
806,574
55,277
731,809
542,553
753,681
850,632
1237,284
25,616
1265,330
229,885
759,72
276,512
472,581
1233,623
1216,740
420,528
1071,369
1265,378
556,534
373,826
917,430
599,617
475,709
1310,123
957,726
191,292
701,322
295,373
499,443
65,849
472,742
682,793
562,568
605,698
765,779
865,173
711,476
837,875
599,476
597,302
530,56
730,416
269,750
1198,553
726,196
455,472
524,344
683,882
1064,313
431,502
1130,607
991,123
361,543
507,820
628,793
1173,128
510,537
65,654
629,194
432,33
827,891
1114,605
182,742
326,137
1058,478
962,417
947,406
1125,560
738,267
633,672
584,698
355,56
227,19
845,318
396,378
676,451
72,574
400,5
542,341
1163,165
1098,126
639,530
436,404
910,630
353,642
938,612
884,114
832,544
1298,680
1011,378
97,213
306,701
12,680
838,581
1246,558
1064,252
937,49
1108,504
865,350
174,362
1094,347
1237,205
269,144
325,733
1235,732
937,68
1175,740
803,820
604,64
601,140
402,478
1260,222
468,590
246,194
305,523
519,292
1138,264
319,834
127,470
415,854
299,378
959,283
1223,413
1081,885
671,162
186,369
311,362
1213,666
1131,863
1212,114
649,638
686,374
723,445
345,315
565,823
30,520
348,254
465,576
801,721
75,681
214,117
910,453
1305,32
103,408
599,194
580,478
276,672
1138,712
689,864
233,759
18,133
1059,661
970,232
962,254
381,588
922,663
301,252
1242,154
519,602
1009,374
773,423
117,273
597,820
556,0
246,313
1015,521
502,308
914,378
82,627
845,525
902,462
372,612
918,808
455,870
1268,616
517,542
609,378
1115,465
874,42
1094,795
895,376
1115,866
1086,119
656,470
629,408
1284,101
105,617
1266,276
654,470
714,136
392,808
918,224
1015,821
755,161
1021,323
1056,217
1280,520
87,481
731,162
1163,396
244,155
1131,498
137,542
937,826
681,821
fold along x=655
fold along y=447
fold along x=327
fold along y=223
fold along x=163
fold along y=111
fold along x=81
fold along y=55
fold along x=40
fold along y=27
fold along y=13
fold along y=6
+21
View File
@@ -0,0 +1,21 @@
6,10
0,14
9,10
0,3
10,4
4,11
6,0
6,12
4,1
0,13
10,12
3,4
3,0
8,4
1,10
2,14
8,10
9,0
fold along y=7
fold along x=5
+102
View File
@@ -0,0 +1,102 @@
SCSCSKKVVBKVFKSCCSOV
CP -> C
SF -> S
BH -> F
SS -> N
KB -> N
NO -> N
BP -> F
NK -> P
VP -> H
OF -> O
VH -> O
FV -> F
OP -> V
FP -> B
VB -> B
OK -> S
BS -> B
SK -> P
VV -> H
PC -> S
HV -> K
PS -> N
VS -> O
HF -> B
SV -> C
HP -> O
NF -> V
HB -> F
VO -> B
VN -> N
ON -> H
KV -> K
OV -> F
HO -> H
NB -> K
CB -> F
FF -> H
NH -> F
SN -> N
PO -> O
PH -> C
HH -> P
KF -> N
OH -> N
KS -> O
FH -> H
CC -> F
CK -> N
FC -> F
CF -> H
HN -> B
OC -> F
OB -> K
FO -> P
KP -> N
NC -> P
PN -> O
PV -> B
CO -> C
CS -> P
PP -> V
FN -> B
PK -> C
VK -> S
HS -> P
OS -> N
NP -> K
SB -> F
OO -> F
CV -> V
BB -> O
SH -> O
NV -> N
BN -> C
KN -> H
KC -> C
BK -> O
KO -> S
VC -> N
KK -> P
BO -> V
BC -> V
BV -> H
SC -> N
NN -> C
CH -> H
SO -> P
HC -> F
FS -> P
VF -> S
BF -> S
PF -> O
SP -> H
FK -> N
NS -> C
PB -> S
HK -> C
CN -> B
FB -> O
KH -> O
+19
View File
@@ -0,0 +1,19 @@
NNCB
CH -> B
HH -> N
CB -> H
NH -> C
HB -> C
HC -> B
HN -> C
NN -> C
BH -> H
NC -> B
NB -> B
BN -> B
BB -> N
BC -> B
CC -> N
CN -> C
+100
View File
@@ -0,0 +1,100 @@
5698271399793414121494916897678273334792458352199237144928619653191794144917556817941885991921787155
5661218626919981949139858312691785612259857529334128895157352159114297128511813456894839991981828919
1829946539172173769987529428979213588624889988719998181167931129997731961946189278688942251875931179
1999119539431115938818955166792951461581819916221516821681692884358864981966117818421936138119178448
8248487982679211958329811353187936515794549929583184191911666793879132359192179796818752613119298188
7391613611139499971186919159397755657961352334771192112294557688911149919935819422199281134255797767
8124729396114568961156298172414395681961627813193215526122172712983935817479529728239799416288287177
9649211889945273498525484578866135611815817899936588391937238711562851327977738262898917714539618992
1141741151396594515311116985514997126571483473844951949329748922961996548324126664446185813879832188
6514441248746823748338931782958583948711212951974131921212693782738511196996128897191782852921157717
9391886829151987712527174199971418888695457266233516772351113144394198243117872737133772919969819519
1198331423874598397283651925996811591794589456846981969193281925566799829729889189889897828398875973
3993119331859999411778999198997168314599391886293921999193929916292896686191667979558511312556596894
4885648184914319438678987185948358172121994124174189148399374584265796556987819754991475787318732495
7161834654516953633561499967999394938799899319729924222599794975138255185728879581989683917238688499
5984849949933778929823916964338381451782979977879923213397398539961494556984787412996655398495998949
5715125898984926281417488864215481241818325728147899985999237792243119997919523716364219919384984139
9859999616929285298541192766179418656994667513839176241589982149119397731438826191347741844116719249
8175137179841286592241832831664588945248987741981849615626887738291971771877815459199919596297762924
1195455998712612867139126669399111711242319181378472389957511612195887919281465911167399661193991259
6683294289715197916912936717981879539595921479689377149531198421412217683129512395995551899999253636
4384549778929184387719457231348656645896889888925317219969479184937844937194733193727596993257773958
3276812228776279165124713927385779131439398642869891821824228691957821333121694837396724995969152871
9919942131189697791118151719399685129324814276422561998279371918941781591744772893513849374159719689
9381491523919433281119518148692169889399181847183427693123932741321897894329241437714386791132191185
9491214195479284697132149999835916255594317799411165638929858419125934487114527249742829613155512959
6311661999995998283745198816594176551398793726177951929118916489667398222393341857119652996537191216
6982112288787347411291733589694945315895949612819676734199121729449261277878511178985354939268994351
3674562711198699238983994755221985299338191681822892997159181992896128148896975971957144448941814152
9899194386288999913747123919122811877922937176682999664964885597922734185747279621687621731836928862
2116816742597199191219978826825994722615889928911124939448369538185829869273435191136937156632583851
4349941568369745619775621261571293998779732985286699593958874613332787391776856914459351828283129499
2139545889871837989617135399996761155985919219131927394712919919165898258917812865693299999372143937
2797918178177159361299151932139531949921215449467992544898132943871367946184259699282519985747111894
1486233998921528551532861544482468798798911836599829829996424887757819971589876285997126989165281171
8861164846365591334792621191572483286587764653747651579926829499721832813168648324199795414996798928
9291853568543999152479124588672419544474748794822216282929683566381835292497918418175413139195238875
4459193479395871171969518189835778911861995829613879912466644113246996925946217134981986998535612761
3917415977315473896693284392244697742378915475693115524188981984797471519797297767819983299114674163
9479997975888641554837851979187615719199134617129683999813865847829191959434496893219481276491982115
1192917311668797426356261998346738779982194786382977926498879633266998527258133639952619989139917922
7719288735263969519584635229174517995733918532265569199269899656492443157891869119696416131629593639
2184119869185523966813259979736987537578526292398798983845392291835172615194758136222947294271887893
8729953944813191318117475998726288371635861354847924941923488971912998769489173795899411912899358291
4865718997911481411828882919717899614955999831128828316982172988928635967691754477941769257918149225
2993917151292413828544861759731699793999794939134673192415919816989946192187733812832551933836349353
2392657723121896915129994993779197965282385759494924426239478311328999729999373913937519813997858629
1231999494818876979724169419419112419866229157682954926121898668165939174414423891657921992944249919
9918532449129634933779591992923399274618345391686218726361524731393799762548689548319471496829728796
9998799217976696793819516835698899484118485923118178917448293998592525822132531922781281129488216397
5192761493599676289836184964748349843714842349297638881284681117695677295987225931879393958925236789
7268883329987412183226822596174125816931195839329615165616819294836862793251385934133841918139897811
6965568945376938749193143429716268629281259918717113392767177211856962116259137767717711199819531318
9946637998921258586362681893277981845668197589625911332226897948938743394789819211693113189244919914
4871851551891469283341781775791494521158119524555886558545149797364636497391519989229278417113895118
1345983432979827816668993821658815763434864899249549719186967999197848321762371279955891998781349927
6314411929798522969667512333572214219998191666968187141597233789569459669912829965921239279371936316
3992169277898367859361361786747537912321799661448888219875991399581567758199888738334192143862413181
2222496914541859183177213262919191272991899639234997678238191986198749293843119619698119988293199525
5915371189328353219855382685759969775542849935211982181425259529898186916649392484997392838711191117
8169587973671717318581118999998425389847631991852491196188179989154396999942138113786691868241134889
5344685492577218115877995132456423826951924968919925139319849473936971671795487241479296442941929811
1251739861149952116921832956986111819961136698717996819282184146866727525158711738228839674622782386
9847314199798528792466291586899159199338477391961835887792183113688154215493472212798899991864295742
5257272784491799827451173416779878548132798785993631488174276918175531348892491918523719192299467898
7992979991181179831169821468119411577879187992796818917682661441819267843277919392835983139489719471
4128797488218887928681673379728116122642549998949328966228125433858567196198751462818891984938354911
3475959599312382511869439189922686358873981983568449243997159614192913999914236993319949291439999198
1517571791296243999998371134995497132685919198842128735596841665424591185199389913668775951218689423
5654967112585715992259299352411729124559287912759919919348673481869219527276935916149899615111454338
7959995196194629598269761799738458135587969367688876114561929169848572742199927976195348111813159694
8341237826999851918267518141919121565937312914613679117869654472139112992413357268683764935191892197
9191144725134452491124119549826718699739659572818352415387359897217137915122751995997915493159884984
6114992423997191951469189895299879231999121815923893319995434539493649119619119321913937699983662725
8691733293139727547586431961128887545859836374323612455831994799481883935133399817678718165893368111
9561258499233959148319937411137559674714812297689646923979591185916186723579892829686891551677119835
3817583836164917989158856146991679117129286763822991921599939389559162988815144775134949221893987156
8869393821317962938731194192326717912615937839319191487729718951863811937788448721968368554499469998
9779931174618997891716996479823339528914111348193299619911134519591869598192982377992849895786861628
9228849524211171112561193761591642939783616849941114962751144449512592397581717151998199129916399569
3681981471397593418983945941198912291467516143121382229831485899639873221948653399284748979865113829
4511319899177843659998889999335128559884168939718989492987161554392999453863694462822117736248363914
6889791329888928324783251893783438993799912282811711691692819391686821652429416117277191688919199791
1813466918799319576952728154162197258151141791197279928841612511822193355919372971629299829231292443
6929796618267421196847896679863622321769172269232621692961879886142891298588221949715178615764931656
2181488467213697845251891984157371193949716425395214118928493219545175866269193351849171839139818194
9145886424872389992784162159124115362691198296549871231961989118911915871253826391146992645811797217
7261813715196955953539695411269291743513585462916998619485955985198911978299891114856577679915119891
2395375323918811172993132575669768211797188142297317469339437887956823821249292252996118812429293966
3493698117398613593295939911464991949189591628859269618891373198822876449981519279397383938445938961
7188399498811299474499795927858692591488691212476189948484913298291739588851722167749543818816918814
6639711919811875921558499577359957913939617544713997397137148176493159178897792388987517214382594658
9868637769618335566138613187813295523435485163161618919397998236266915715199319761642818478856959385
1181969758279137971179348866926365624188612783894276496899793241258119122436174649949517195172514793
6282561199121299888181471164167212292274611428169718849631799674421998399218169533259817922649993996
7892189127116936145295482897726952912496729194898291625689311833439971918991813338319988542899569332
1984849148728139499199899219892824339819797636941197152362487518771542766624971973432971739847999929
1389955743198821981998929159786983988371511612124611537771554447966118799114165127857297139873268292
7114948568589988719191915583826591117862589116475856191177131841299229935172958819245872994369999426
4275554996585879411196552781973718511282969951492149869419418957345666452981882879663949917972311592
+10
View File
@@ -0,0 +1,10 @@
1163751742
1381373672
2136511328
3694931569
7463417111
1319128137
1359912421
3125421639
1293138521
2311944581
+10
View File
@@ -0,0 +1,10 @@
199
200
208
210
200
207
240
269
260
263
+1000
View File
File diff suppressed because it is too large Load Diff
+6
View File
@@ -0,0 +1,6 @@
forward 5
down 5
forward 8
up 3
down 8
forward 2
+100
View File
@@ -0,0 +1,100 @@
9987532143456789996545678998976545699965434567899998795698764323456789543457899986533467894569896501
9876321012367899989434567987997956989896546789998998634569843214567898732326789765422589923456789413
8765432123478999878923459876789899878789987899987889545698755323678987651015697996201289312347994324
9876553266599998967894569985895699768677898998765678956799898745689998542123456789412378925456795435
7987654345678987656789698743434987654556789987654789897987987656789899653435667894323459434687896745
6598766566789886545678987652329876543345898976543456789876599887999789876545678965436568945799998767
5459887677899765434567998761012986532234567897856789899965410998998674987679789876547878957897659878
6668998889998774323478965432123499540167898929878995999854329109989543598989899987898989878989543989
7978989999987653212589896743334598751358969212989997898765498999878932429694998798989799989878932598
8989678998798743203456789654545679862349654101599998959876987886767891019543234679878678999967893457
9294569876569764212567898767957989983458943213459859345989876745456789998956745998764567898656989598
2123458965459876327678959879898994594567894324599743232399765432347997897897859876543458987549878989
2012567894346987434799543998789543987678965436987654101999876921259876786789967987656789898798765879
3488998965457898567898932198698932498789876945698543219899987810398765665689989998767896789997654567
4567899876567987678997899989587894979999989896987654598789998323997654344578999899878945699876543238
5678921988678998789986798975456789865678998789998765999678989439876543213567898789989434989999654123
8789992399789559999875987654345679764589897678999879876569876545987432103459987698996599879898763245
9899889965992346789663976543256789543456789567899989986432987699876543212349896577898989768799854345
2998769894321245696542987654368995432367893458789999994321298789997654323656789456999876645679865456
1987656789540787789531098765459996545698912345678929865410129891398865434567892349898765432459876567
0299545678921656897642129876799987656789101476789019865321234990239976545689921298769879821266997678
9987834567892345698743458988998798789893213567899198986492949989945987656789652397654998732345698799
8756423478943466789964567899543679899954324678998987597989898979896799768996543987642349643456899899
9543212367894578999987679910964567998765435699987895439876787656789899879898659876521298759567899998
8732101456896689789998799929878678999896846989876986589965982545678999989789798765434999898978998867
7653312345789795678999989894988789898987959878984987679854671234567898795679899876549899987899987757
8764453468998964569989878793299898787899998769213498798743210125698989654367999987698769876789986545
9875654567897653498876465689999987656967899658926599987655321238789478965456789798789659765678997756
7986785678999542987675334567898976543456998767899989999867545678892367896567896569998769874789349897
6097896799998943976543123589967896552347899978998778999878756789943456999678912478999879875697657998
5298987893987899987655437678956794321456789989876567889999897897654567898989323489989989986789867899
4349898932345678998786545889545989432345678998767455878999998998765698967999934569878798897894978932
5656789931234568999897656795439878943456789999654344568989879999876789456798795998765656798923989921
6787899890347679999998768976598767896567894987543123679878767899987892345997679899654345679212997890
7898998789498998989999879987987854589678965987651012598765456789998943459876598789541245695499896889
8969989688989987678989989499896743478989876798766323459854347878999656789985432678932359796989765678
9659876567878998545678992398765432367893989899875454598743234767898787899987654569543498989879834569
8798965456567987434567941299976543456932398999996765797643123456969898978998765678956697878965423498
9987654367459876323458932989988658567891987998987976899854234569654929467899898789997976567893210987
0199876212398765466567899878999867678999865467898987999976545678943212349953999899989895456965429876
1399854323469896568789999657967978989098764379989698989987656789659333678932399999876789578977998765
2989765459589987678892398743458989192129863238976569678998987899798944599953989998765678989989897654
9979876567690198989991987652347891093998754347895454567899998998987895989899879987654567899998789543
8765989678789389999989876541466789989899867656789363456789879997676789876798767898543478998767678932
7654695989895478989878998732345678978789978969896212345698867896545898765987654987654567897656569893
6543434597996569976768996543489789265679989899954343656987656789234987654394323498765678978543456789
5432125456789698765459889676578990123498998789765654578996545892134998995999212349876789765412367895
8742012347898798654348678987689321234987899678996767889987656943547899989898923556987899854303458954
7632123456799987663234579998789495349876787466789878999999767898756789878767894567898998963212367893
6545234767899876542127678929899989498765456365678989989879878999987899965456989878949987654325459921
7656346978932976543549789212989678999874343234569999876765989987899969875345678989234598765456567910
8967897989431097656656792109878569876543210145778999765434599876789656994234899892101469976567878921
9878998999549198767767893298766456987654321246789998856323767965696547987345998766412359899878989432
2989349478998999878898999349754357898975492997896987543212359876789439876567899654323498789999197545
1293296569987989989929998998921238569987989879965987654323567987892123987689998765434987676789098856
2394989678996577995439876587890123456798977768954398965454698998943239899799019879579896555678998767
3989978989765456889549765456789234567899866657895239798767989989894598769898923998998765444599899878
9876569899974345678998654345678945698921954346789123679899878679799987654967894997789974323486789989
8765456789985239789886765234569756789939893235694234567987664545678976543456789875698763212345694395
7654345678999398998765432125678969899898789126895645979876543234569876542367899764987654743656789234
6543234789898987987654321036789998998798678937896799899987754345679965431478987653498987654577892101
8752145898767656798765432123698987987657567898997898789998876789898765432789998542129498765788989212
9643276987656345799876543234567896798543458939789989679979987892999896545699984321012349877999878923
8754387896543235689998756345678935989432569023679875458965498921279987756789876434123899998989567894
9965498987684034678959767896989129876521678954589965347894329440567998768899987546238789349765456989
6798569998755126789549878987895436987833489765699987266789494321459439879999899677545690298765345678
5987678987643234899434989699976545698954599896989998345899989432398921999998798798776789349979236899
4598789299754345678949896545988656898765678999976899456999878949987890989865679899887899959898945678
5979890156965676789898765432199767899876899998765978987898767898765999876754567999999999898787896789
9867921239876989898789876545234978921987932987754567898987654679874789765532345689990198765676789897
7657894345989991997678989658365989210198999876543456929999743599765678974321234567989297654545678976
8546789956799910984569898767878996321459789997432347910998632989896789999210356779878987743634567895
3237897897899899873497679878989985432345679876521257899876549876987899878931767898765696532124568934
4348986789999789762398789989999876543959798765432456789987997654698978767899878997654597543035699323
5467965623987689943479899997897998759898999896545598999999876543789765458998989998965698654145789212
6569894219876567896567999876546789898767899987956679998978997954569654345987898769996798765345899901
7698789398767466789778989965437897998545789998967899987969999895678965239876789654987909878656999893
8997678987654345678989579876546986987656789899998998785459898789789654398985678943498912999767898789
9986578998743234569995455987657895498767896789879987654398767678999965987674567892359533459898997678
9875467895432101678994323498878954349878945678965698765987654578989899999543567891239644567929986567
9954345976543212349989212569999761256999234589654579896796543439878788998674578932398755678919873459
8765496989655458498978994569878972349754345678943989989987652129765677999895699899498766789998762688
9876789898966567987867989698768993598965676789769899878999421019654376899976989798999877890987653567
9987898787898679896955678969656789987896789899898789767989432198743265689999877567899988921998768778
9998987676789798765634569654345679896789896923987679659876543989432134567898765456789999439879989989
8939876545699987654323478967236598785678975439886568943987659876543245778969981345899876598765494597
7921987436789498765654567892103497654567896798765458952199767987655356889654930234589987679896323456
6899898526789219879765678954212985423456789999876567921019878998766867998969821345678998799999212345
5498765434569423989979799765679876538967899899989878932123989349878978987898765456789999989898909499
6309876565678934799998989878989989547898998789899989543234593234999989466799876578999899878787898987
5214997878989545679887678989891097656789897656778997664567989945987894345698987679565698765656897876
4323698989997656798776567898779198797898767545567998975979878899876743235567898996423987654345986765
5434569997899987999534345696568999898999656333456789989897563789765432123468999543212399983239765634
6545678986798998984321245689457899999989543212445693299765432678976321034567897432109999874129874323
7656899345987899876510157893346899989878954301234892129898541567895434128978996543998898765034965210
8767901239876567987823267892234998678967965412345691034987540458789545367899987659887789978239876391
9898992398765459865439878921019876563556799563456789145996532345678955456987699798765678989347997989
9979989987654346976545989765323985472345678974567897659876543456799766567898543987654567965456999878
9765678987543257987858999875439876321234569985678998789997655687899889678976542398765679876597899954
9876789997678349998967899986598765410123679876789219891298766799921998789987843459976789987698998765
+5
View File
@@ -0,0 +1,5 @@
2199943210
3987894921
9856789892
8767896789
9899965678
+56
View File
@@ -0,0 +1,56 @@
#![allow(dead_code)]
fn parse_input(input: &str) -> Vec<u32> {
input
.split_ascii_whitespace()
.map(|x| x.parse().unwrap())
.collect()
}
fn part_1_solution(input: &str) -> u64 {
parse_input(input)
.as_slice()
.windows(2)
.fold(0, |acc, w| if w[0] < w[1] { acc + 1 } else { acc })
}
fn part_2_solution(input: &str) -> u64 {
parse_input(input)
.as_slice()
.windows(4)
.fold(0, |acc, w| if w[0] < w[3] { acc + 1 } else { acc })
}
#[cfg(test)]
mod part1 {
use super::*;
#[test]
fn run_sample() {
let input = include_str!("../inputs/1_test.txt");
assert_eq!(part_1_solution(input), 7);
}
#[test]
fn run() {
let input = include_str!("../inputs/1.txt");
assert_eq!(part_1_solution(input), 1139);
}
}
#[cfg(test)]
mod part2 {
use super::*;
#[test]
fn run_sample() {
let input = include_str!("../inputs/1_test.txt");
assert_eq!(part_2_solution(input), 5);
}
#[test]
fn run() {
let input = include_str!("../inputs/1.txt");
assert_eq!(part_2_solution(input), 1103);
}
}
+105
View File
@@ -0,0 +1,105 @@
/**
* File: day10.rs
* Author: Adam Jeniski; @Ajetski
*/
use std::collections::HashMap;
type Stack = Vec<char>;
fn part_1_solution(input: &str) -> u64 {
let point_table = HashMap::<char, u64>::from([(')', 3), (']', 57), ('}', 1197), ('>', 25137)]);
let match_table = HashMap::<char, char>::from([(')', '('), (']', '['), ('}', '{'), ('>', '<')]);
let mut count = 0;
for line in input.split_ascii_whitespace() {
let mut stack = Stack::new();
for c in line.chars() {
if "([{<".contains(c) {
stack.push(c);
} else {
let start = stack.pop().unwrap();
if start != *(match_table.get(&c).unwrap()) {
count += point_table.get(&c).unwrap();
break;
}
}
}
}
count
}
fn part_2_solution(input: &str) -> u64 {
let point_table = HashMap::<char, u64>::from([(')', 1), (']', 2), ('}', 3), ('>', 4)]);
let match_table_from_start =
HashMap::<char, char>::from([('(', ')'), ('[', ']'), ('{', '}'), ('<', '>')]);
let match_table_from_end =
HashMap::<char, char>::from([(')', '('), (']', '['), ('}', '{'), ('>', '<')]);
let mut counts = vec![];
'outer: for line in input.split_ascii_whitespace() {
let mut stack = Stack::new();
for c in line.chars() {
if "([{<".contains(c) {
stack.push(c);
} else {
let start = stack.pop().unwrap();
println!("{} {}", start, c);
if start != *(match_table_from_end.get(&c).unwrap()) {
continue 'outer;
}
}
}
let mut count = 0;
while !stack.is_empty() {
let c = stack.pop().unwrap();
count *= 5;
count += point_table
.get(match_table_from_start.get(&c).unwrap())
.unwrap();
}
counts.push(count);
}
counts.sort();
counts[counts.len() / 2]
}
#[cfg(test)]
mod part1 {
use super::*;
#[test]
fn run_sample() {
let input = include_str!("../inputs/10_test.txt");
assert_eq!(part_1_solution(input), 26397);
}
#[test]
fn run() {
let input = include_str!("../inputs/10.txt");
assert_eq!(part_1_solution(input), 339477);
}
}
#[cfg(test)]
mod part2 {
use super::*;
#[test]
fn run_sample() {
let input = include_str!("../inputs/10_test.txt");
assert_eq!(part_2_solution(input), 288957);
}
#[test]
fn run() {
let input = include_str!("../inputs/10.txt");
assert_eq!(part_2_solution(input), 3049320156);
}
}
+141
View File
@@ -0,0 +1,141 @@
/**
* File: day11.rs
* Author: Adam Jeniski; @Ajetski
*/
fn part_1_solution(mut input: Vec<Vec<i32>>) -> u64 {
fn flash(data: &mut Vec<Vec<i32>>, row: usize, col: usize, count: &mut u64) {
*count += 1;
//println!("flash {row} {col}");
data[row][col] = 0;
for (i, j) in (-1i32..=1).flat_map(|i| (-1i32..=1).map(move |j| (i, j))) {
// compute coords as i32 so we can do bounds checking
let x = i + row as i32;
let y = j + col as i32;
//print!("{row}, {col}; {x}, {y}. ");
// skip out of bounds
if x < 0 || y < 0 || x >= data.len() as i32 || y >= data[x as usize].len() as i32 {
//println!("exiting");
continue;
}
// convert coords to usize for easy indexing
let x = x as usize;
let y = y as usize;
if data[x][y] != 0 {
data[x][y] += 1;
//println!("updated data to {}", data[x][y]);
}
if data[x][y] > 9 {
//println!("flushing");
flash(data, x, y, count);
}
}
}
let mut count = 0;
for _ in 0..100 {
for row in &mut input {
for cell in row {
*cell += 1;
}
}
for i in 0..input.len() {
for j in 0..input[i].len() {
if input[i][j] > 9 {
flash(&mut input, i, j, &mut count);
}
}
}
}
count
}
fn part_2_solution(mut input: Vec<Vec<i32>>) -> u64 {
fn flash(data: &mut Vec<Vec<i32>>, row: usize, col: usize) {
//println!("flash {row} {col}");
data[row][col] = 0;
for (i, j) in (-1i32..=1).flat_map(|i| (-1i32..=1).map(move |j| (i, j))) {
// compute coords as i32 so we can do bounds checking
let x = i + row as i32;
let y = j + col as i32;
//print!("{row}, {col}; {x}, {y}. ");
// skip out of bounds
if x < 0 || y < 0 || x >= data.len() as i32 || y >= data[x as usize].len() as i32 {
//println!("exiting");
continue;
}
// convert coords to usize for easy indexing
let x = x as usize;
let y = y as usize;
if data[x][y] != 0 {
data[x][y] += 1;
//println!("updated data to {}", data[x][y]);
}
if data[x][y] > 9 {
//println!("flushing");
flash(data, x, y);
}
}
}
for count in 1..100000 {
for row in &mut input {
for cell in row {
*cell += 1;
}
}
for i in 0..input.len() {
for j in 0..input[i].len() {
if input[i][j] > 9 {
flash(&mut input, i, j);
}
}
}
if input.iter().all(|row| row.iter().all(|cell| cell == &0)) {
return count;
}
}
todo!()
}
#[cfg(test)]
mod part1 {
use super::*;
fn parse_input(input: &str) -> Vec<Vec<i32>> {
input
.split_ascii_whitespace()
.map(|s| s.chars().map(|c| c.to_string().parse().unwrap()).collect())
.collect()
}
#[test]
fn day_11_sample_part_one() {
let input = include_str!("../inputs/11_test.txt");
let sol = part_1_solution(parse_input(input));
assert_eq!(sol, 1656);
}
#[test]
fn day_11_test_part_one() {
let input = include_str!("../inputs/11.txt");
assert_eq!(part_1_solution(parse_input(input)), 1725);
}
#[test]
fn day_11_sample_part_two() {
let input = include_str!("../inputs/11_test.txt");
assert_eq!(part_2_solution(parse_input(input)), 195);
}
#[test]
fn day_11_test_part_two() {
let input = include_str!("../inputs/11.txt");
assert_eq!(part_2_solution(parse_input(input)), 308);
}
}
+116
View File
@@ -0,0 +1,116 @@
use std::collections::HashSet;
type Point = (i32, i32);
#[derive(Debug)]
enum Fold {
X(i32),
Y(i32),
}
fn part_one(points: Vec<Point>, folds: Vec<Fold>) -> i32 {
match folds.first().expect("first fold") {
Fold::X(coord) => points
.into_iter()
.map(|(x, y): Point| (x.abs_diff(*coord) as i32, y))
.collect::<HashSet<_>>(),
Fold::Y(coord) => points
.into_iter()
.map(|(x, y): Point| (x, y.abs_diff(*coord) as i32))
.collect::<HashSet<_>>(),
}
.len() as i32
}
fn part_two(points: Vec<Point>, folds: Vec<Fold>) {
let mut points = points.into_iter().collect::<HashSet<_>>();
for fold in folds {
points = match fold {
Fold::X(coord) => points
.into_iter()
.map(|(x, y): Point| (coord - x.abs_diff(coord) as i32, y))
.collect::<HashSet<_>>(),
Fold::Y(coord) => points
.into_iter()
.map(|(x, y): Point| (x, coord - y.abs_diff(coord) as i32))
.collect::<HashSet<_>>(),
};
}
let max_x = points
.iter()
.fold(0, |acc, (x, _)| if *x > acc { *x } else { acc });
let max_y = points
.iter()
.fold(0, |acc, (_, y)| if *y > acc { *y } else { acc });
let lines: Vec<Vec<char>> = (0..=max_y)
.map(|y| {
(0..=max_x)
.map(|x| if points.contains(&(x, y)) { '#' } else { ' ' })
.collect()
})
.collect();
for line in lines {
let line = line.into_iter().collect::<String>();
println!("{line}");
}
}
#[cfg(test)]
mod tests {
use super::*;
fn parse_inputs(input: &str) -> (Vec<Point>, Vec<Fold>) {
let mut sections = input.split("\n\n");
(
sections
.next()
.expect("coords section")
.lines()
.map(|line| {
let mut coords = line
.split(',')
.map(|num_str| num_str.parse().expect("coord number"));
(
coords.next().expect("coord x value"),
coords.next().expect("coord y value"),
)
})
.collect(),
sections
.next()
.expect("fold instructions section")
.lines()
.map(|line| {
let (direction, num) =
line.split(' ').nth(2).expect("fold equation").split_at(2);
let num = num.parse().expect("coordinate to fold at");
if direction == "x=" {
Fold::X(num)
} else {
Fold::Y(num)
}
})
.collect(),
)
}
#[test]
fn part_one_sample_test() {
let input = include_str!("../inputs/13_test.txt");
let (points, folds) = parse_inputs(input);
assert_eq!(part_one(points, folds), 17);
}
#[test]
fn part_one_test() {
let input = include_str!("../inputs/13.txt");
let (points, folds) = parse_inputs(input);
assert_eq!(part_one(points, folds), 653);
}
#[test]
fn part_two_test() {
let input = include_str!("../inputs/13.txt");
let (points, folds) = parse_inputs(input);
part_two(points, folds);
}
}
+121
View File
@@ -0,0 +1,121 @@
use std::collections::HashMap;
type Transforms = HashMap<(char, char), char>;
fn part_one(input: String, transforms: Transforms) -> i32 {
let mut input: Vec<char> = input.chars().collect();
for _ in 1..=10 {
let pairs = input.windows(2);
let mut next = vec![input[0]];
for pair in pairs {
let key = (pair[0], pair[1]);
if let Some(val) = transforms.get(&key) {
next.push(*val);
}
next.push(pair[1]);
}
input = next;
}
let mut counts = HashMap::<char, i32>::new();
for char in input {
if char != '\n' {
counts.insert(
char,
match counts.get(&char) {
Some(val) => *val + 1,
_ => 1,
},
);
}
}
counts.iter().max_by_key(|c| c.1).unwrap().1 - counts.iter().min_by_key(|c| c.1).unwrap().1
}
fn part_two(input: String, transforms: Transforms) -> u128 {
type Bag = HashMap<(char, char), u128>;
let mut last_pair = ('a', 'b'); //hacky
let mut bag = {
let mut bag = Bag::new();
let mut iter1 = input.chars().filter(|c| *c != '\n');
let mut iter2 = iter1.clone();
iter2.next();
while let (Some(c1), Some(c2)) = (iter1.next(), iter2.next()) {
last_pair = (c1, c2);
bag.entry((c1, c2)).and_modify(|e| *e += 1).or_insert(1);
}
bag
};
for _ in 0..40 {
let mut new_bag = Bag::new();
for ((c1, c2), val) in bag {
let transformation = transforms[&(c1, c2)];
if last_pair == (c1, c2) {
last_pair = (transformation, c2);
}
new_bag
.entry((c1, transformation))
.and_modify(|e| *e += val)
.or_insert(val);
new_bag
.entry((transformation, c2))
.and_modify(|e| *e += val)
.or_insert(val);
}
bag = new_bag;
}
let counts = {
type Counts = HashMap<char, u128>;
let mut counts = Counts::new();
for ((c1, _), val) in bag {
counts.entry(c1).and_modify(|e| *e += val).or_insert(val);
}
counts.entry(last_pair.1).and_modify(|e| *e += 1);
counts
};
counts.iter().max_by_key(|(_, val)| **val).unwrap().1
- counts.iter().min_by_key(|(_, val)| **val).unwrap().1
}
#[cfg(test)]
mod tests {
use super::*;
fn parse_input(input: &str) -> (String, Transforms) {
let (input, transform_list) = input.split_once("\n\n").expect("two sections");
let mut transforms = Transforms::new();
for line in transform_list.split('\n') {
let (input, output) = line.split_once(" -> ").expect("transform");
let mut chars = input.chars();
transforms.insert(
(chars.next().unwrap(), chars.next().unwrap()),
output.chars().next().unwrap(),
);
}
(input.to_owned(), transforms)
}
#[test]
fn part_one_test_sample() {
let (input, transforms) = parse_input(include_str!("../inputs/14_test.txt"));
assert_eq!(part_one(input, transforms), 1588);
}
#[test]
fn part_one_test() {
let (input, transforms) = parse_input(include_str!("../inputs/14.txt"));
assert_eq!(part_one(input, transforms), 2112);
}
#[test]
fn part_two_sample() {
let (input, transforms) = parse_input(include_str!("../inputs/14_test.txt"));
assert_eq!(part_two(input, transforms), 2188189693529);
}
#[test]
fn part_two_test() {
let (input, transforms) = parse_input(include_str!("../inputs/14.txt"));
assert_eq!(part_two(input, transforms), 3243771149914);
}
}
+152
View File
@@ -0,0 +1,152 @@
use std::{
cmp::Ordering,
collections::{BinaryHeap, HashMap},
vec,
};
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
struct Path {
x: usize,
y: usize,
length: u32,
}
impl From<&Path> for u32 {
fn from(val: &Path) -> Self {
val.length
}
}
impl Ord for Path {
fn cmp(&self, other: &Self) -> Ordering {
u32::from(other).cmp(&u32::from(self))
}
}
impl PartialOrd for Path {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
Some(self.cmp(other))
}
}
fn part_one(input: Vec<Vec<u32>>) -> Result<u32, &'static str> {
let mut queue = BinaryHeap::new();
let mut dp = HashMap::new();
let num_rows = input.len() as i32;
let num_cols = input[0].len() as i32;
let target_x = num_rows as usize - 1;
let target_y = num_cols as usize - 1;
queue.push(Path {
x: 0,
y: 0,
length: 0,
});
dp.insert((0, 0), 0);
'outer: while let Some(path) = queue.pop() {
if path.x == target_x && path.y == target_y {
return Ok(path.length);
}
// skip this if we've seen better
if let Some(length) = dp.get(&(path.x, path.y)) {
if *length < path.length {
continue 'outer;
}
}
'inner: for (x_offset, y_offset) in [(-1, 0), (1, 0), (0, -1), (0, 1)] {
let x = x_offset + path.x as i32;
let y = y_offset + path.y as i32;
if x < 0 || x >= num_rows || y < 0 || y >= num_cols {
continue 'inner;
}
let x = x as usize;
let y = y as usize;
let length = path.length + input[x][y];
let entry = dp.entry((x, y)).or_insert(u32::MAX);
if length < *entry {
*entry = length;
queue.push(Path { x, y, length });
}
}
}
Err("couldn't find an answer")
}
fn part_two(mut input: Vec<Vec<u32>>) -> Result<u32, &'static str> {
let num_rows = input.len();
let num_cols = input[0].len();
for offset in 1..5 {
for row in input.iter_mut().take(num_rows) {
for idx in 0..num_cols {
let mut val = row[idx] + offset;
while val > 9 {
val -= 9;
}
if val == 0 {
val = 1;
}
row.push(val);
}
}
}
for offset in 1..5 {
for row_idx in 0..num_rows {
input.push(vec![]);
let last_row_idx = input.len();
for col_idx in 0..input[row_idx].len() {
let mut val = input[row_idx][col_idx] + offset;
while val > 9 {
val -= 9;
}
if val == 0 {
val = 1;
}
input[last_row_idx - 1].push(val);
}
}
}
part_one(input)
}
#[cfg(test)]
mod tests {
use super::*;
fn parse_input(input: &str) -> Vec<Vec<u32>> {
input
.split_ascii_whitespace()
.map(|s| s.chars().map(|c| c.to_digit(10).unwrap()).collect())
.collect()
}
#[test]
fn part_one_sample_test() {
let input = parse_input(include_str!("../inputs/15_test.txt"));
assert!(part_one(input) == Ok(40));
}
#[test]
fn part_one_test() {
let input = parse_input(include_str!("../inputs/15.txt"));
assert!(part_one(input) == Ok(581));
}
#[test]
fn part_two_sample_test() {
let input = parse_input(include_str!("../inputs/15_test.txt"));
assert!(part_two(input) == Ok(315));
}
#[test]
fn part_two_test() {
let input = parse_input(include_str!("../inputs/15.txt"));
assert!(part_two(input) == Ok(2916));
}
}
+65
View File
@@ -0,0 +1,65 @@
pub fn run(lines: Vec<String>) {
let mut h1 = 0;
let mut d1 = 0;
let mut aim = 0;
let mut d2 = 0;
let mut h2 = 0;
for line in lines {
let parts = line.split(" ");
let command = parts.clone().nth(0).unwrap();
let num: i32 = parts.clone().nth(1).unwrap().parse().unwrap();
match command {
"forward" => {
h1 += num;
h2 += num;
d2 += aim * num;
},
"up" => {
d1 -= num;
aim -= num;
},
"down" => {
d1 += num;
aim += num;
},
_ => println!("unknown command: '{}'", command)
}
}
println!("{}, {}", h1 * d1, h2 * d2);
}
#[cfg(test)]
mod part1 {
use super::*;
#[test]
fn run_sample() {
let input = include_str!("../inputs/2_test.txt");
assert_eq!(part_1_solution(input), 150);
}
#[test]
fn run() {
let input = include_str!("../inputs/2.txt");
assert_eq!(part_1_solution(input), 1660158);
}
}
#[cfg(test)]
mod part2 {
use super::*;
#[test]
fn run_sample() {
let input = include_str!("../inputs/2_test.txt");
assert_eq!(part_2_solution(input), 900);
}
#[test]
fn run() {
let input = include_str!("../inputs/2.txt");
assert_eq!(part_2_solution(input), 1604592846);
}
}
+129
View File
@@ -0,0 +1,129 @@
/**
* File: day09.rs
* Author: Adam Jeniski; @Ajetski
*/
use std::collections::{HashSet, LinkedList};
type Position = (usize, usize);
fn is_local_min(data: &Vec<Vec<u64>>, (row, col): Position) -> bool {
if row > 0 && data[row][col] >= data[row - 1][col] {
return false;
} else if row < data.len() - 1 && data[row][col] >= data[row + 1][col] {
return false;
} else if col > 0 && data[row][col] >= data[row][col - 1] {
return false;
} else if col < data[row].len() - 1 && data[row][col] >= data[row][col + 1] {
return false;
}
true
}
fn get_local_mins(data: &Vec<Vec<u64>>) -> Vec<Position> {
let mut mins = vec![];
for row in 0..data.len() {
for col in 0..data[row].len() {
if is_local_min(data, (row, col)) {
mins.push((row, col));
}
}
}
mins
}
/** use a BFS to count all of the nodes in the basin */
fn get_basin_size_from_min(data: &Vec<Vec<u64>>, start: Position) -> u64 {
/* queue: pop from front; push to back */
let mut search_queue = LinkedList::from([start]);
let mut visited = HashSet::from([start]);
let mut count = 1;
while !search_queue.is_empty() {
let (row, col) = search_queue.pop_front().unwrap();
let mut directions = vec![];
if row > 0 {
directions.push((row - 1, col));
}
if col > 0 {
directions.push((row, col - 1));
}
if row < data.len() - 1 {
directions.push((row + 1, col));
}
if col < data[row].len() - 1 {
directions.push((row, col + 1));
}
for (next_row, next_col) in directions {
if data[next_row][next_col] != 9 && !visited.contains(&(next_row, next_col)) {
search_queue.push_back((next_row, next_col));
count += 1;
}
visited.insert((next_row, next_col));
}
}
count
}
fn parse_input(input: &str) -> Vec<Vec<u64>> {
input
.split_ascii_whitespace()
.map(|a| a.chars().map(|c| c.to_string().parse().unwrap()).collect())
.collect()
}
fn part_1_solution(input: &str) -> u64 {
let data = parse_input(input);
let mins = get_local_mins(&data);
mins.len() as u64
+ mins.iter().fold(0, |acc, (row, col)| {
acc + data[row.to_owned()][col.to_owned()]
})
}
fn part_2_solution(input: &str) -> u64 {
let data = parse_input(input);
let mins = get_local_mins(&data);
let mut basin_sizes: Vec<u64> = mins
.iter()
.map(|k| get_basin_size_from_min(&data, k.to_owned()))
.collect();
basin_sizes.sort();
basin_sizes.reverse();
basin_sizes.iter().take(3).fold(1, |prod, curr| prod * curr)
}
#[cfg(test)]
mod part1 {
use super::*;
#[test]
fn run_sample() {
let input = include_str!("../inputs/9_test.txt");
assert_eq!(part_1_solution(input), 15);
}
#[test]
fn run() {
let input = include_str!("../inputs/9.txt");
assert_eq!(part_1_solution(input), 502);
}
}
#[cfg(test)]
mod part2 {
use super::*;
#[test]
fn run_sample() {
let input = include_str!("../inputs/9_test.txt");
assert_eq!(part_2_solution(input), 1134);
}
#[test]
fn run() {
let input = include_str!("../inputs/9.txt");
assert_eq!(part_2_solution(input), 1330560);
}
}
+13
View File
@@ -0,0 +1,13 @@
#![allow(dead_code)]
/**
* File: lib.rs
* Author: Adam Jeniski; @Ajetski
*/
pub(crate) mod day1;
pub(crate) mod day9;
pub(crate) mod day10;
pub(crate) mod day11;
pub(crate) mod day13;
pub(crate) mod day14;
pub(crate) mod day15;