-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathday13input.txt
921 lines (920 loc) · 7.31 KB
/
day13input.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
994,18
1014,343
84,406
219,849
570,488
575,395
387,213
904,382
676,479
1028,437
500,123
202,735
716,315
1153,822
197,397
678,154
1104,285
1041,799
262,159
925,543
1193,299
918,159
1170,826
1181,889
938,9
843,481
5,480
95,416
944,831
853,285
276,108
435,717
616,383
766,893
863,611
442,521
5,446
272,26
1146,876
244,845
117,747
457,397
336,235
249,169
612,443
251,693
67,333
376,840
16,719
1190,617
95,857
955,511
984,180
134,613
413,145
1141,416
681,830
162,308
411,70
1041,239
184,382
460,791
798,79
1161,429
238,450
649,296
445,53
616,495
244,519
669,781
15,105
157,296
411,824
713,450
922,311
373,173
5,190
1156,347
1262,392
441,656
984,744
810,123
216,1
395,185
930,893
669,864
934,600
160,121
1170,628
713,562
512,290
1058,618
1294,719
910,683
338,661
910,298
172,547
694,495
1041,95
875,717
269,95
902,385
599,737
825,693
1232,848
1138,235
887,640
1066,845
13,47
1272,511
622,289
1190,277
1148,586
776,3
780,271
713,239
649,25
107,513
35,799
825,84
363,565
609,621
1250,708
1121,605
401,668
306,810
880,635
628,98
885,504
952,694
1116,254
80,98
947,351
1067,152
406,270
1059,693
1102,238
785,30
232,311
1232,64
994,876
1133,429
1260,330
524,386
167,324
28,393
132,516
1305,296
72,698
385,254
475,477
587,287
1049,168
142,64
172,235
1002,679
430,515
741,593
528,289
768,266
716,260
910,235
1305,704
870,399
1146,18
1077,751
281,53
830,164
306,35
142,127
610,880
480,705
1113,397
257,51
734,46
649,598
300,322
1058,52
913,843
638,175
1200,893
1158,276
1131,346
1066,729
669,47
55,269
1141,362
774,208
387,661
842,555
1181,617
84,488
85,301
356,277
196,297
152,637
274,221
423,640
1267,283
1116,444
412,854
256,690
656,240
1278,737
90,65
522,516
639,789
527,351
445,343
576,848
408,660
1124,339
641,113
890,354
239,611
141,768
1131,122
413,749
276,142
937,534
1133,1
1148,296
1086,483
5,704
706,142
311,339
915,185
80,576
103,294
840,767
928,607
45,595
710,714
902,770
236,325
947,187
1180,386
1156,464
251,201
452,436
1056,7
214,292
162,596
415,425
1297,864
858,21
922,235
448,436
632,292
1156,99
1158,637
425,106
785,478
595,9
1275,203
971,28
1255,269
813,598
1034,752
974,222
773,501
1186,873
788,378
246,621
1036,221
50,330
1118,225
944,887
843,654
892,688
10,170
624,327
59,325
796,404
560,583
634,158
430,820
361,771
1004,84
848,732
1020,577
570,630
951,255
231,702
186,555
239,835
177,270
626,617
597,2
1068,488
70,879
939,507
997,781
202,383
1174,124
142,290
1086,820
763,269
1246,383
276,451
308,215
1232,512
594,442
1068,157
1240,15
22,451
1017,729
788,516
35,95
897,609
189,605
267,824
701,299
0,395
447,163
900,434
691,691
1062,270
758,288
1148,308
902,124
880,596
796,490
492,596
470,319
874,343
535,275
110,449
894,2
798,736
1278,157
932,786
1226,712
216,893
186,714
457,53
1265,299
1251,549
959,688
974,235
631,861
1161,653
895,835
59,9
686,648
1200,449
956,602
149,494
234,92
328,296
872,757
910,659
353,136
206,609
43,171
470,799
246,385
610,14
669,113
527,95
1074,617
1110,737
726,879
1069,749
701,621
773,119
835,865
1049,280
567,374
447,843
1287,879
1233,501
743,822
1124,180
621,165
1047,49
681,136
171,276
753,240
1064,621
108,294
688,157
557,218
149,429
1230,268
576,325
616,368
996,784
534,3
1092,175
850,444
731,28
1081,838
1022,78
392,63
383,849
728,401
669,847
441,238
415,835
937,165
154,99
618,868
764,294
1012,893
853,53
569,581
1146,856
261,589
1071,59
994,170
619,169
20,747
291,259
864,238
505,848
177,449
311,789
97,228
1091,717
691,203
65,502
242,488
1043,233
1156,547
1266,213
525,49
54,42
974,683
887,752
1280,556
1260,623
775,619
984,296
256,204
296,255
1230,57
397,101
186,443
1066,273
246,273
1064,837
316,101
569,761
341,702
570,264
780,67
341,192
759,121
536,208
582,151
1086,411
512,736
430,635
78,288
80,823
1230,161
1071,649
1044,659
1243,633
90,887
773,53
1104,443
443,609
753,228
1168,255
218,175
579,649
564,719
393,838
304,292
954,277
1004,35
200,157
1034,108
622,597
246,572
1299,527
1094,893
874,712
108,495
552,288
1168,527
1173,512
634,606
1056,289
910,605
713,892
1092,742
629,830
678,227
514,404
1207,600
1287,127
186,180
559,702
213,600
818,596
33,640
542,266
13,296
1290,411
736,268
339,82
1011,511
363,777
1036,1
129,617
11,866
436,103
1146,756
1052,448
587,561
194,254
1302,211
1076,92
1250,583
22,555
955,383
728,679
393,56
574,268
171,724
1138,224
1056,887
982,843
470,751
219,717
649,89
567,163
957,382
184,738
574,71
1047,497
1153,192
863,843
318,211
669,270
348,35
366,7
949,837
875,177
269,640
452,10
338,618
735,395
713,655
55,848
1220,569
693,476
880,515
609,273
306,84
199,298
440,602
137,605
1267,723
38,383
208,238
457,192
140,107
810,99
371,507
995,759
157,192
300,154
607,621
721,502
1238,698
1290,288
50,527
59,549
335,618
154,795
261,676
1170,787
452,603
291,351
164,876
1049,589
366,455
964,343
1052,446
567,420
944,63
90,271
818,242
1290,362
110,1
624,567
243,152
137,289
528,605
925,450
544,585
0,499
1113,702
430,298
691,169
740,45
55,401
107,625
336,211
530,827
676,736
400,298
1064,273
140,266
199,596
276,752
843,240
1288,443
1168,830
537,327
1091,625
172,323
77,841
738,823
728,493
1233,841
1074,773
569,593
78,64
1161,150
474,831
475,865
904,737
416,2
688,289
547,401
80,621
785,497
746,7
1069,637
1297,296
932,183
783,635
977,805
241,749
162,296
594,260
678,718
979,324
261,305
782,93
1092,623
1049,726
1216,311
1020,317
574,318
1113,192
194,327
791,698
773,327
880,35
259,261
743,693
1299,28
1011,383
525,254
1305,414
120,891
962,604
1280,567
514,490
11,28
266,191
1299,418
892,211
1173,323
599,158
1074,586
678,740
1180,829
1092,719
557,228
214,714
423,254
1153,744
692,868
569,285
726,463
537,53
1302,670
1250,442
723,561
184,512
520,613
808,637
72,316
599,718
796,68
54,266
952,639
1278,297
853,217
1161,465
567,245
546,600
932,527
129,169
574,519
400,45
743,474
683,63
219,625
654,240
402,394
202,159
1285,512
885,390
1019,19
157,744
927,176
500,464
177,429
686,327
830,730
257,101
997,593
1056,148
853,609
828,771
1078,311
517,323
567,72
1074,596
70,239
372,661
753,676
1225,761
8,352
1133,744
785,49
1118,221
1184,829
23,575
254,849
632,624
254,887
641,623
269,444
351,688
293,729
254,148
734,569
574,621
621,254
410,210
631,879
72,663
184,95
8,318
923,661
1203,269
482,99
938,681
1285,288
600,714
868,521
691,317
1272,495
1043,824
741,285
820,74
1233,53
728,148
984,598
987,772
326,296
734,288
1089,136
587,261
1240,879
734,325
90,623
467,15
1183,707
80,733
124,67
514,826
1235,245
400,235
1310,395
1148,596
1181,497
971,866
392,159
713,444
1299,866
254,743
32,597
644,276
1074,271
885,106
629,382
87,245
616,526
363,187
795,464
740,264
252,52
191,420
328,322
520,501
326,843
869,238
1215,857
887,254
274,1
528,93
927,830
1202,399
452,291
865,343
1041,640
120,667
132,416
750,535
845,289
406,737
1058,276
557,464
52,893
604,142
1081,676
887,37
272,868
805,17
1126,319
564,623
482,771
956,322
731,649
1034,443
811,394
569,313
412,830
962,479
904,624
656,372
710,490
1255,401
679,861
551,121
632,227
1178,192
977,744
992,211
1086,158
378,527
1297,47
410,729
438,85
298,445
582,764
1251,773
1000,719
507,794
909,668
969,478
843,413
1308,101
1230,716
129,254
458,745
346,551
313,593
761,127
1053,101
304,602
900,281
1104,3
736,57
336,672
134,137
43,283
746,439
609,299
1232,606
689,254
124,21
1280,191
715,9
25,288
869,656
848,757
870,752
224,483
915,136
132,444
1153,254
552,606
617,628
177,445
341,478
348,290
547,269
682,98
661,805
743,374
984,843
236,569
452,425
646,542
388,659
1006,292
339,28
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