-
Notifications
You must be signed in to change notification settings - Fork 0
/
input
1000 lines (1000 loc) · 12.7 KB
/
input
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
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
010100010111
100100100110
100110111001
011001011011
010000110111
000011101001
011000011101
101111011111
011001011010
111100001001
111111000110
100010100110
011100100100
011111010000
111010001100
010111001110
100010100100
101000010000
011101110100
100010011000
001111110011
111001100001
010000011001
000011101010
100010101100
111011100010
110000100001
101010110001
111101110101
001010010100
001001111001
100001110010
100100000111
000101010101
001101111011
111100011000
100111110101
010101111000
100110011001
010001111010
010111111001
111000100010
011000011011
100010111111
010110110010
010100000001
100011000100
100000010001
101010001000
100111011001
101011001010
010110110111
111011000100
110010111110
010101000111
000101111101
101101101101
010100010001
000111101111
101101001101
000011110010
000101101011
001111100000
001000100110
111000000100
001000010110
000111010001
111011001010
100011100010
011010101011
001100010001
000001011001
110001101101
010101100001
111000011100
000101000000
001001010101
100000100111
110000001000
111001110100
001111000110
111110000100
100111111000
100101111111
100101011111
111000000011
110000011001
000101000101
110110010011
110111010100
001001101100
101101100001
110011001000
010010100111
000110101011
101010000011
100110001011
000111111011
000100111011
101011111001
011010110110
100101011000
100000010110
000010101000
100100111000
011100011000
000010011001
000001010000
011001110110
111101101010
011110001000
011100110001
011011010101
101011100001
000000111000
110000110011
101111001100
111000101111
100110110110
110000111101
001101110000
100010001110
001001010010
001010000110
000110011001
111111000101
111011011010
101101111010
101001000110
101100100101
001110100000
110001000001
010010011101
011110100010
011000000010
101110100111
000001001010
101101110001
001110101100
011101011001
011010000001
100010011110
000111100010
011000100110
101001010101
000110011010
111100101001
011010000011
010101011101
010011011000
011001000100
010011101111
100110100111
110111010110
011001101101
110001100111
010100111110
111101011010
011010000100
010101101110
101000101100
110110110001
110011110011
111100001100
000011110101
011100000110
011100000111
100101001010
001110010001
011101110111
001101100001
111111010011
101001111110
000000100000
000000100010
101100101000
010011011111
101100100000
000110100100
000010001001
110011000111
101000101101
100101010111
010111001010
000000011011
110110100011
111001100000
000011101101
001011100010
001100110100
010010100010
001001010100
100111010110
001001111000
011011110101
110111101011
000000001000
111110011011
010101011001
001011111111
011011111100
011000001011
101000100000
010011011011
011100111100
011001011110
111001101010
111011111111
100010101010
101100001101
110001000111
100111011010
010000111010
011001101000
111111001001
000111100000
011000010111
110110000111
110100111100
011111000001
000001110100
100110101110
111000111001
010001000000
111001001010
111100111101
101000110100
000101000011
010100101111
010100011010
111110000110
110000010111
010100001100
010000011010
111010000100
000011010010
011001101001
010100111001
011001010111
001001100011
110001100101
101001001001
011101010010
011101011110
000111111110
010111010001
101011011110
001011101101
100110010000
001111100101
011101001110
010111100000
000010111111
101001010000
001101001010
110010111101
001010110110
001001001001
110110110101
000001011011
001110010101
011110000001
101111011011
100000011100
101000010001
000101101100
010111110111
010001101110
011101001000
110100001110
110010110101
101001101000
000101010010
011101001100
100111101100
001011111001
011111101100
100100110001
101001101101
011100001010
000111101101
110010110111
100111010011
000101110110
100111000010
101010000111
101101110101
100000100101
111100010101
111011100111
110011011111
100110100011
111011000101
001010101110
010011000110
110001001111
110100110110
011011011100
111111100100
101010110010
110011101001
000110100001
010011110111
110111001101
100100100100
000111000110
001001010000
001111111110
110000011101
011101011000
110000111001
000100000000
100110111100
111000010101
100010011100
110100111011
010111110110
101111101010
100110111101
110100110101
011111001010
000010010001
011001010010
010111101101
000000110000
111001101110
001011000101
100011011101
101101010100
010000010111
000010101111
001110101010
100000001011
111101011110
110110001000
010100010000
010100110011
000001001110
101011000111
110111101000
001100110111
100110101000
000100111110
101111110000
101001001000
001101001011
111011111101
111011110011
110111111100
110001010100
011110001110
010011100100
101100010000
111010000111
100100011010
100100011011
100001101111
000111100111
001101011010
101110000010
000000000101
110111000110
000010100111
001100101110
000010011101
101100100001
011011000101
100110101100
011000110000
111000100101
011110110101
111011011111
000110010110
001010011110
001110111111
110110011100
111110001001
000001111000
101100101110
011110001001
000101010011
011100100000
100011111010
111011101011
000111100110
101011111010
010100111101
110100110000
000000000011
011000010101
101110110101
011100010101
000111001101
100011010000
010111001100
110000110010
010001001100
000001011100
110111000000
011110011001
101000010110
000100100111
101110000011
001111011001
101010011101
111100110110
111101100000
000000101111
011111011110
000000000111
001000101110
011101101111
011010100011
010101000010
001000101100
010000110100
100010101111
000011010111
011011110000
010101100110
011110001011
101011000001
011100101101
111001100011
100001100101
101011010110
010101000101
001001011111
111010001101
010011001111
001010100110
011101000001
000000111101
111010000101
011000100011
100100011110
010001111011
111100111001
011101111111
001111110000
100100010001
100111100001
001111000011
100010111011
110110000110
110000001010
000000100101
000110111010
100001010100
011011000010
111001001110
100010000000
100101000011
111101010000
001001110110
111010010011
110101101000
101100111001
101010100111
000001101001
000110010001
010001100100
101011100100
111000110000
001100111101
011000111101
110010110110
101101010111
110110100100
101001001011
000101100111
000110010011
011000110011
100011110110
110000101111
100110111000
100000000010
001001011100
100100000110
100001001001
010000011011
110111110100
000110100110
011010000010
110001100110
011000101010
111011011110
100011010110
100001001000
101010101000
011100100110
010000010010
100010010011
100000101011
010110000101
000000101010
000000010111
110110110010
101111010101
000010001000
100000110101
000100111010
111100000100
101000101110
100100001111
000111011101
110100101101
011010010100
001010110011
111110011101
101110111010
001110110110
111100011010
100110000010
111000001110
110010010010
101010100110
011101010011
101100100111
100011101110
111110101010
110011111101
101110001001
001101100101
011010100100
110010001101
010011001010
100100010010
100110011111
110010111001
001111111100
110011111110
111001101000
010101100000
101101000010
100011011110
010000111110
110000111010
011111110110
101010111001
000110111001
100111010000
111001010001
111101001000
111000001101
001100001001
001101111111
011010101001
001100111000
000100101101
010101110000
000100100010
010111010101
110011001111
101001010110
100000001010
110010001110
100011100101
110101011111
101110110011
010010110110
100100001011
111111110110
011100101011
101111110011
110001110001
011011101000
110110000101
101001110000
110111111111
001100000110
001100111111
010101010111
100001001110
110011001010
011010100000
001010101011
000010000101
100101010010
111011110101
111110010001
011000011110
001111111101
011010111100
001011100110
100110101010
101100001000
101011000000
111000010011
001101000111
010001010111
000100000001
000110001101
001111100010
111000100011
111111001010
010011110100
111111000010
001100001100
100010110110
010111101110
100010000111
100101001000
000011011100
110010001111
111000111110
010110001101
100110001100
101001000011
010110010000
010010100101
010110110001
001111001001
101011100111
101010010100
000001101100
100010000110
010111101010
110010100100
110011010000
100110100110
011010110101
000011100111
001001100111
101011100000
010010011000
000010000011
010111111100
001010111101
001111010010
101011110000
110111011100
011100001110
010000000001
101110001100
001011111110
110100100001
011010111101
100110010101
111111100010
100111101010
110010010001
100010111001
001010000000
010011110001
001100010110
001111100100
001011010111
001010110101
010111100101
010100001110
000110010100
000001111101
110101100101
010101100011
011110111000
100001101001
001001001011
111010101101
001111011110
110111110001
001110100100
100011100001
100001111111
100000111001
000110110100
111001110011
010111000110
101100101111
000110001011
110111101101
110101001101
101111101011
111010110101
101101111110
011001001100
010100110101
110100101100
110011101111
010000111101
111101011111
111010111100
011000101001
010000111000
001010001001
100111110111
010111011010
001011010100
011001001101
010011100000
000111010010
000001101110
001101011110
100000010000
010100000010
010010000110
111000101100
101111101100
000101111010
111011011101
011101000011
000111000100
010101111001
100110010001
000001011101
010010101101
100101100111
100101110010
101001000001
110000110001
101110111111
100100000010
011010001110
011011000110
000110001001
010110100101
111001110101
000010011000
010110011011
100110010111
111111010010
101011001101
010011100101
010010110011
101100011100
010111010110
110001101100
000101101000
010011101000
101011100011
000001001100
101111110010
111001111100
000111111010
110100101010
101010110011
000011111010
011100111001
101010001110
010101010001
011110101011
001111001011
010100101001
110001100000
110101000010
011100110011
111111011111
100010000011
101001100111
000000101000
101110110100
110100111010
111101110010
010111111011
111110100100
010001100001
000011010011
000011100011
110010010011
111010011000
101111001111
011000100111
010101101011
001000001101
110110110111
111100010100
100001100001
100010100001
010001011001
101010110000
011110101010
011110111100
100110100010
011111111101
100111001110
101011011111
000011100000
111110101001
000010110010
110000001110
110011111010
001001101111
100010010001
101001010010
111111111010
000000111100
000001000001
100000110100
010000101111
001111111001
001110001010
100111110100
000110111111
010100010100
001000000110
011011110001
100011110011
011101111000
011011000011
110101100011
111101001100
010001001010
010010001101
111110010111
111010011101
100111101011
000110000101
010111011000
111110010011
101001100001
011010100001
100111100011
101010001101
000011101100
010001010001
010000000000
111001100111
110010000101
010011101101
100101000100
000011100101
111101101110
001110101000
010110101111
010011110000
011101011100
011001100100
001101011011
101110011111
100001101010
110111111000
000001111011
101111000100
100100001010
101001110011
010111100010
110111001011
100001000100
001001101000
000001100010
001011001110
001100000000
101110010111
110011101011
001110001101
001000110101
100111101110
000001010101
011001100101
010001000111
011010100101
011110111111
110001000000
000001110000
011101000000
100011000010
110101001011
101100000110
111001001111
110100010110
001001001000
110100011110
101101001000
000001100000
101000000100
000000100110
111101111000
100001101011
111100011101
010001001101
101011010001
001100010010
100101010000
111110010000
101110101001
101001101011
111000011010
001111101101
001001011101
111000010010
111110111100
110000101101
111000000000
001010001010
100001101100
010101110111
001001011001
001110000001
100100101100
011111011010
001001000100
100000111111
111001100110
100101110000
000001001111
111110010100
100101000000
001000000111
010100000101
010101000001
100111000110
110101000100
110110001111
001001000011
111110001101
011000001110
100001111011
101110011001
011011001110
000100100110
100101100010
111110101011
010000101010
000011011110
101110010001
101000011101
101001001010
110101011101
001111110111
110001110000
001011101011
111110000011
100111011011
101011001000
010001000110
100100111010
010111001111
111101000111
011001111110
000110010000
111100111111
000111011111
110000101000
011001101100
111000011011
011110010110
010101100111
011111000101
100111100000
000001001001
010111010100
101010100000
010111001011
110001010111
000110100111
010110010001
010111000001
011010001010
110111010000
000000100001
000110110110
110011111111
011011101100
010011011100
111000011101
000001111111
010100000011
110001111100
100000011001
010100100101
011010010011
000011110110
110100011001
110111100101
000001000100
001110111100
010011010110
100100010111
110111011110
000011111100
110011010011
100110001110
000101001011
110110101001
111010011111
110001010000
100111111100
010000110001
011110000111
110011110001
010110110011
100010001011
110010101011
110111100010
110010001001
100000001100
010110010011
000111111111
011010010111
110101100100
110100000101
100111010001
110110111101
100100001101
100111101000
000111000011
100001010001
101011001100
100100111001
100010001111