Compare commits
12 Commits
1c770538b7
...
c55423d6f3
Author | SHA1 | Date |
---|---|---|
magical | c55423d6f3 | |
magical | 99405e2ad0 | |
magical | e8a6d55fa8 | |
magical | b7062a7801 | |
magical | 55158903e6 | |
magical | 3b5b9f3839 | |
magical | 3ba6804013 | |
magical | c111075e16 | |
magical | a395a39fac | |
magical | 395ad666c8 | |
magical | 484c0744fb | |
magical | 99621f071a |
|
@ -0,0 +1,200 @@
|
|||
-7 4 41 121 272 539 997 1790 3238 6096 12113 25120 52964 110690 225447 443645 840883 1535008 2702137 4594155 7553340
|
||||
4 6 15 32 56 97 215 608 1782 4848 12001 27235 57322 113013 210281 371191 623616 998482 1522475 2203130 3001892
|
||||
1 14 30 60 127 259 482 812 1241 1708 2047 1924 854 -1364 -2779 6693 61773 262974 871468 2514024 6601925
|
||||
6 11 22 52 122 270 570 1162 2299 4438 8451 16122 31239 61800 124158 250420 501360 989250 1920158 3677323 6993968
|
||||
5 7 20 59 158 375 798 1567 2933 5377 9809 17858 32248 57231 99015 166082 269237 421163 635178 922797 1289594
|
||||
0 -3 -6 -7 1 43 201 703 2093 5515 13138 28727 58310 110773 197987 333665 529470 785825 1073258 1297757 1240279
|
||||
4 16 31 51 77 110 165 305 716 1872 4881 12159 28649 63886 135307 273317 528748 983488 1765211 3067307 5175293
|
||||
28 42 56 70 84 98 112 126 140 154 168 182 196 210 224 238 252 266 280 294 308
|
||||
14 30 55 105 221 486 1057 2232 4581 9179 17987 34432 64237 116546 205378 351432 584260 944840 1488635 2289343 3443761
|
||||
11 22 37 68 148 338 743 1559 3190 6514 13460 28214 59658 126174 264919 549437 1122545 2256574 4461315 8672808 16575204
|
||||
13 16 35 83 171 318 572 1047 1989 3900 7783 15648 31591 64129 131249 271201 565159 1183779 2480632 5175309 10704255
|
||||
-7 -11 -2 41 146 354 734 1409 2595 4667 8313 14965 27979 55581 117567 259445 580783 1290395 2812622 5992175 12490570
|
||||
8 7 5 17 83 276 712 1579 3222 6366 12646 25770 53931 114643 244277 516741 1079964 2226889 4532683 9117139 18139459
|
||||
25 41 76 150 290 533 930 1551 2491 3877 5876 8704 12636 18017 25274 34929 47613 64081 85228 112106 145942
|
||||
21 50 90 137 187 236 280 315 337 342 326 285 215 112 -28 -209 -435 -710 -1038 -1423 -1869
|
||||
14 22 37 55 73 93 126 196 344 632 1147 2005 3355 5383 8316 12426 18034 25514 35297 47875 63805
|
||||
9 11 21 58 153 364 817 1783 3810 7966 16336 33094 66812 135287 275234 560945 1138767 2288413 4528199 8789922 16701011
|
||||
8 14 35 91 217 469 946 1850 3620 7208 14641 30168 62576 129773 267707 547650 1110014 2231708 4462709 8905935 17791177
|
||||
8 19 38 65 93 119 179 422 1244 3509 8890 20369 42941 84573 157475 279746 477464 787295 1259702 1962841 2987237
|
||||
10 29 55 97 174 315 559 955 1562 2449 3695 5389 7630 10527 14199 18775 24394 31205 39367 49049 60430
|
||||
11 21 37 74 173 415 947 2045 4251 8633 17229 33748 64613 120443 218083 383303 654299 1086141 1756325 2771598 4276237
|
||||
3 13 33 63 103 153 213 283 363 453 553 663 783 913 1053 1203 1363 1533 1713 1903 2103
|
||||
7 9 17 31 51 77 109 147 191 241 297 359 427 501 581 667 759 857 961 1071 1187
|
||||
-8 -2 22 78 200 459 982 1972 3727 6652 11253 18096 27698 40263 55025 68607 71081 37078 -92913 -449054 -1297721
|
||||
8 0 -16 -37 -45 8 222 774 1952 4228 8438 16189 30679 58196 110656 209648 392576 721624 1296420 2271439 3879363
|
||||
15 32 68 131 226 355 517 708 921 1146 1370 1577 1748 1861 1891 1810 1587 1188 576 -289 -1450
|
||||
25 48 89 168 324 622 1160 2076 3555 5836 9219 14072 20838 30042 42298 58316 78909 105000 137629 177960 227288
|
||||
6 6 14 56 182 492 1191 2686 5741 11717 22951 43393 79771 143892 257421 462023 840872 1563564 2977624 5789534 11411748
|
||||
6 24 58 127 264 524 1003 1871 3422 6144 10812 18607 31264 51252 81989 128095 195686 292712 429342 618399 875848
|
||||
2 15 35 78 172 354 662 1121 1734 2511 3615 5798 11471 27026 67417 164495 381118 833495 1724359 3389070 6355154
|
||||
10 12 13 25 76 226 607 1493 3403 7237 14442 27202 48643 83041 136018 214708 327872 485938 700939 986319 1356574
|
||||
12 23 47 90 151 215 256 260 283 567 1743 5149 13278 30341 62878 120271 214902 361551 575439 868084 1239849
|
||||
10 15 30 57 98 155 230 325 442 583 750 945 1170 1427 1718 2045 2410 2815 3262 3753 4290
|
||||
11 26 41 56 71 86 101 116 131 146 161 176 191 206 221 236 251 266 281 296 311
|
||||
22 35 46 66 130 306 709 1536 3152 6272 12307 23995 46562 89916 172870 331321 634164 1214667 2333799 4511553 8805034
|
||||
25 46 79 133 222 366 592 935 1439 2158 3157 4513 6316 8670 11694 15523 20309 26222 33451 42205 52714
|
||||
17 20 21 20 17 12 5 -4 -15 -28 -43 -60 -79 -100 -123 -148 -175 -204 -235 -268 -303
|
||||
18 43 75 114 167 264 488 1019 2192 4569 9025 16848 29853 50510 82086 128801 195998 290327 419943 594718 826467
|
||||
3 12 29 49 67 78 77 59 19 -48 -147 -283 -461 -686 -963 -1297 -1693 -2156 -2691 -3303 -3997
|
||||
16 18 27 47 82 147 282 565 1119 2107 3705 6042 9124 12866 17606 25912 47070 106096 258775 611721 1339290
|
||||
0 3 17 65 177 391 757 1349 2311 4001 7367 14814 32041 71732 160796 354586 765302 1619811 3378481 6978415 14323381
|
||||
23 29 34 55 137 371 930 2143 4633 9552 18955 36367 67613 122002 213983 365425 608715 990919 1579312 2468655 3790681
|
||||
6 8 22 63 148 303 570 1007 1680 2669 4163 6831 12899 28894 72134 185261 467246 1136558 2654320 5954663 12859322
|
||||
15 23 43 94 209 457 978 2031 4055 7743 14129 24688 41449 67121 105232 160281 237903 345047 490167 683426 936913
|
||||
14 17 28 69 186 475 1114 2398 4773 8864 15506 25842 41681 66560 108425 185762 340856 667587 1368500 2869679 6046748
|
||||
9 13 32 92 233 526 1101 2190 4207 7929 14928 28560 56075 112810 230009 468630 942605 1856477 3564216 6658388 12101797
|
||||
9 20 37 61 93 143 246 494 1109 2617 6263 14965 35372 81983 184799 402632 845125 1708254 3331901 6296837 11597563
|
||||
26 35 45 75 156 332 675 1333 2643 5374 11232 23881 50947 107835 224792 459621 919968 1801397 3450831 6469735 11878094
|
||||
3 10 43 115 234 409 680 1189 2311 4863 10404 21640 42995 81600 149492 269125 487274 909039 1778256 3662348 7866979
|
||||
8 20 47 109 238 481 909 1642 2922 5313 10206 20999 45662 101954 227416 497518 1057100 2172642 4316065 8294857 15448502
|
||||
1 10 38 105 244 505 971 1807 3383 6558 13298 27941 59630 126725 264391 537055 1058045 2019482 3736406 6710193 11717576
|
||||
17 26 30 30 35 64 155 385 898 1933 3850 7189 12904 23157 43537 88430 192703 435132 982422 2167632 4623809
|
||||
12 18 34 66 122 222 413 804 1647 3502 7554 16231 34465 72352 150787 313173 648982 1339442 2742866 5548392 11043844
|
||||
8 8 5 12 63 230 654 1597 3536 7347 14661 28505 54356 101720 186285 332571 576796 969382 1576129 2476582 3757505
|
||||
-5 -3 13 58 155 341 677 1275 2366 4439 8494 16494 32207 62865 122579 239562 471597 939109 1894851 3867122 7944923
|
||||
0 8 27 71 168 365 731 1353 2328 3768 5854 9010 14356 24821 47806 101363 228022 524654 1205019 2727507 6050558
|
||||
5 1 7 46 164 442 1021 2158 4338 8483 16338 31194 59248 112115 211301 395803 734375 1344297 2418557 4262978 7343672
|
||||
6 18 51 113 214 364 571 846 1227 1840 3022 5539 10941 22106 44036 84980 157972 282886 489125 819077 1332488
|
||||
12 26 57 112 209 387 728 1412 2833 5815 11999 24548 49473 98181 192388 373478 719926 1378780 2620661 4932488 9168229
|
||||
-4 -8 -4 25 106 281 627 1306 2657 5334 10477 19879 36097 62487 103290 164264 255098 396164 634330 1075909 1949772
|
||||
11 29 51 76 110 173 301 545 985 1804 3505 7403 16584 37594 83203 176682 358135 693543 1287303 2299182 3966754
|
||||
-1 8 25 54 103 181 295 447 631 830 1013 1132 1119 883 307 -755 -2481 -5084 -8815 -13966 -20873
|
||||
-3 9 36 78 135 207 294 396 513 645 792 954 1131 1323 1530 1752 1989 2241 2508 2790 3087
|
||||
6 18 35 62 114 237 541 1254 2830 6190 13265 28193 59904 127628 272524 582022 1240250 2631130 5545775 11591944 23985770
|
||||
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
||||
-2 -4 0 24 102 305 773 1775 3825 7912 15953 31656 62091 120417 230408 433667 800720 1447548 2559550 4425440 7484172
|
||||
8 19 44 98 215 467 1013 2188 4632 9456 18458 34449 61841 107806 184569 313801 534712 918433 1592800 2783964 4884691
|
||||
6 17 29 36 46 111 369 1090 2711 5832 11127 19108 29680 41463 50964 51899 35344 -8001 -81243 -166928 -199578
|
||||
7 15 48 123 261 492 860 1428 2298 3688 6163 11232 22755 50057 114512 262985 594501 1311829 2818870 5900153 12043773
|
||||
7 19 37 61 88 107 85 -64 -539 -1757 -4523 -10289 -21530 -42269 -78787 -140558 -241453 -401261 -647579 -1018127 -1563548
|
||||
3 11 19 27 35 43 51 59 67 75 83 91 99 107 115 123 131 139 147 155 163
|
||||
23 38 55 74 95 118 143 170 199 230 263 298 335 374 415 458 503 550 599 650 703
|
||||
0 4 15 38 81 153 262 413 606 834 1081 1320 1511 1599 1512 1159 428 -816 -2733 -5510 -9363
|
||||
5 4 3 2 1 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15
|
||||
10 39 84 155 274 478 822 1382 2258 3577 5496 8205 11930 16936 23530 32064 42938 56603 73564 94383 119682
|
||||
14 20 28 36 55 125 339 893 2188 5020 10925 22836 46429 93014 185790 373104 755626 1539976 3140634 6366800 12753827
|
||||
7 11 23 61 149 317 601 1043 1691 2599 3827 5441 7513 10121 13349 17287 22031 27683 34351 42149 51197
|
||||
2 17 46 106 224 434 774 1278 1968 2879 4203 6734 12972 29564 72323 176014 412622 924173 1979684 4070866 8068272
|
||||
3 19 61 140 272 488 855 1511 2716 4924 8888 15821 27651 47427 79956 132778 217617 352481 564623 894618 1401858
|
||||
28 46 83 153 270 448 701 1043 1488 2050 2743 3581 4578 5748 7105 8663 10436 12438 14683 17185 19958
|
||||
2 -1 -4 -7 -10 -13 -16 -19 -22 -25 -28 -31 -34 -37 -40 -43 -46 -49 -52 -55 -58
|
||||
12 23 35 45 59 111 289 776 1940 4546 10215 22320 47587 98760 198793 387149 728916 1327593 2342555 4012375 6685363
|
||||
23 42 73 123 204 331 522 809 1270 2089 3642 6606 12140 22383 42006 82571 173309 385056 879027 1999545 4440608
|
||||
13 11 13 39 126 334 753 1514 2825 5096 9307 17950 37204 81576 183196 409485 895339 1899903 3904777 7783021 15092756
|
||||
-1 1 15 62 176 404 806 1455 2437 3851 5809 8436 11870 16262 21776 28589 36891 46885 58787 72826 89244
|
||||
16 27 40 63 118 253 558 1186 2373 4439 7735 12479 18397 24053 25715 15562 -21010 -109277 -290622 -629929 -1225416
|
||||
2 8 26 60 114 192 298 436 610 824 1082 1388 1746 2160 2634 3172 3778 4456 5210 6044 6962
|
||||
19 35 66 119 208 362 632 1115 2035 3961 8310 18388 41372 91838 197700 409748 816363 1565447 2896138 5183485 8999936
|
||||
20 44 88 168 310 553 949 1564 2501 4003 6763 12686 26541 59248 134022 297320 637610 1316534 2619234 5033652 9372744
|
||||
1 6 14 28 51 86 136 204 293 406 546 716 919 1158 1436 1756 2121 2534 2998 3516 4091
|
||||
1 12 27 53 120 288 653 1358 2617 4765 8374 14557 25775 47872 94901 199977 438633 977178 2169229 4741565 10139210
|
||||
24 32 47 84 172 371 797 1657 3309 6394 12158 23227 45369 91245 187908 390970 810062 1652628 3296417 6405494 12110442
|
||||
11 14 16 24 66 218 659 1783 4410 10145 21935 44885 87454 163330 294692 518407 898389 1550768 2695670 4764470 8622594
|
||||
9 22 64 155 318 581 991 1660 2882 5392 10886 22999 49091 103521 213787 432294 859071 1685202 3274052 6308883 12052900
|
||||
11 22 61 139 269 469 766 1217 1981 3506 6956 15133 34422 78851 178515 396967 866882 1862445 3944187 8243845 17014712
|
||||
5 14 21 30 66 185 494 1205 2759 6078 13050 27461 56833 116134 235288 474105 951045 1896610 3748735 7317076 14056480
|
||||
0 13 42 88 152 235 338 462 608 777 970 1188 1432 1703 2002 2330 2688 3077 3498 3952 4440
|
||||
4 5 17 61 185 476 1077 2214 4246 7775 13913 24927 45702 86816 170589 342437 691652 1389193 2756793 5394389 10415995
|
||||
17 28 46 87 182 384 785 1549 2967 5540 10096 17947 31092 52472 86283 138353 216589 331500 496802 730111 1053730
|
||||
30 46 68 112 202 378 724 1425 2862 5754 11356 21722 40042 71062 121596 201139 322590 503094 765012 1137028 1655402
|
||||
-2 -5 -1 29 122 346 831 1837 3895 8087 16574 33537 66765 130206 247892 459757 829988 1458683 2497737 4172037 6807220
|
||||
22 30 48 100 224 484 1003 2030 4054 7978 15366 28776 52192 91568 155497 256018 409574 638134 970492 1443756 2105040
|
||||
-3 1 8 15 32 105 360 1085 2877 6912 15476 33065 68676 140436 284532 571605 1135461 2221251 4263312 8006787 14692112
|
||||
16 35 69 120 206 377 733 1441 2752 5039 8932 15755 28740 56011 117280 257930 577399 1284978 2808078 6000729 12542125
|
||||
9 11 16 23 32 44 61 86 123 177 254 361 506 698 947 1264 1661 2151 2748 3467 4324
|
||||
10 20 45 95 185 345 634 1150 2034 3495 5961 10628 20989 46454 110042 263558 616093 1385974 2994218 6232675 12569356
|
||||
18 21 29 50 105 254 633 1501 3300 6733 12875 23374 40911 70322 121207 213541 388854 731069 1403201 2708962 5192037
|
||||
18 31 61 122 227 388 616 921 1312 1797 2383 3076 3881 4802 5842 7003 8286 9691 11217 12862 14623
|
||||
22 32 42 52 62 72 82 92 102 112 122 132 142 152 162 172 182 192 202 212 222
|
||||
10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110
|
||||
13 35 67 117 209 391 754 1466 2823 5317 9719 17173 29295 48269 76930 118822 178217 260079 369955 513773 697525
|
||||
27 46 79 149 296 592 1171 2285 4407 8413 15894 29699 54946 101071 186214 346693 656995 1270352 2497601 4954049 9822324
|
||||
-1 -2 2 24 92 255 600 1292 2661 5391 10921 22252 45487 92676 187042 372712 733159 1426452 2752264 5277040 10062018
|
||||
-2 -1 12 46 113 243 525 1193 2777 6335 13779 28333 55290 103646 190259 350659 665941 1325896 2769231 5980153 13089536
|
||||
-5 -1 19 69 165 325 569 919 1399 2035 2855 3889 5169 6729 8605 10835 13459 16519 20059 24125 28765
|
||||
1 8 23 58 129 260 491 886 1546 2663 4726 9145 19852 46961 114464 275419 640455 1429106 3059073 6296772 12504459
|
||||
17 43 85 154 278 518 996 1940 3751 7100 13085 23550 41841 74642 136289 258494 511481 1048509 2196953 4639266 9761996
|
||||
-5 4 34 97 205 370 604 919 1327 1840 2470 3229 4129 5182 6400 7795 9379 11164 13162 15385 17845
|
||||
0 9 43 131 316 657 1241 2215 3848 6632 11441 19819 34620 61568 112979 216077 430288 880923 1821151 3740587 7547740
|
||||
19 24 24 14 -16 -77 -168 -234 -49 1067 4867 15440 41669 101882 232566 504784 1055569 2148985 4296498 8496059 16707712
|
||||
-8 -6 -1 10 52 199 615 1618 3782 8105 16310 31454 59290 111441 212726 417455 843996 1744600 3640017 7568110 15525464
|
||||
19 44 93 182 342 632 1152 2056 3565 5980 9695 15210 23144 34248 49418 69708 96343 130732 174481 229406 297546
|
||||
19 38 77 161 332 651 1208 2154 3780 6702 12281 23525 46897 95699 196026 396694 785049 1511166 2823653 5121089 9024050
|
||||
12 21 42 99 242 568 1261 2675 5508 11149 22322 44199 86206 164800 307549 558899 988060 1699485 2846450 4648267 7411674
|
||||
9 6 -1 -12 -27 -46 -69 -96 -127 -162 -201 -244 -291 -342 -397 -456 -519 -586 -657 -732 -811
|
||||
4 17 46 97 187 346 618 1062 1756 2822 4539 7728 14826 32484 77244 187121 444340 1019516 2258574 4857886 10224905
|
||||
16 28 53 106 220 446 858 1582 2880 5334 10202 20079 40118 80285 159515 313419 608938 1173390 2254517 4347786 8466922
|
||||
13 39 72 115 176 270 435 781 1598 3551 7996 17490 36711 74412 148044 294951 598739 1248527 2665452 5759825 12430770
|
||||
17 40 82 157 280 477 813 1453 2779 5596 11487 23454 47176 93667 185129 367997 741815 1522010 3173022 6682697 14110922
|
||||
9 15 32 67 119 172 180 36 -472 -1693 -4079 -7987 -13117 -17108 -12104 23526 144519 481823 1333954 3351191 7890107
|
||||
17 20 38 90 210 468 1016 2185 4670 9865 20460 41494 82172 158891 300079 553708 999019 1765994 3071478 5293702 9134802
|
||||
5 -2 1 39 161 454 1057 2175 4093 7190 11953 18991 29049 43022 61969 87127 119925 161998 215201 281623 363601
|
||||
19 34 55 90 154 265 440 691 1021 1420 1861 2296 2652 2827 2686 2057 727 -1562 -5117 -10298 -17522
|
||||
20 32 47 78 159 354 776 1628 3289 6499 12757 25149 50002 100097 200860 402401 803348 1598842 3178136 6323201 12609933
|
||||
-5 -2 7 17 28 52 124 332 904 2438 6443 16482 40377 94154 208674 440213 886617 1711062 3175887 5689431 9869282
|
||||
13 35 75 150 302 610 1210 2331 4355 7909 13997 24180 40812 67340 108676 171649 265545 402743 599455 876578 1260666
|
||||
16 32 67 132 241 427 769 1429 2700 5078 9406 17211 31482 58341 110406 213347 418786 830753 1662681 3364365 6907349
|
||||
18 26 36 46 51 47 36 29 53 199 812 3032 10058 29736 79378 194113 440564 938248 1891820 3638138 6713125
|
||||
11 37 82 154 274 493 916 1747 3393 6701 13458 27389 56109 114947 234469 475196 955891 1906493 3764126 7341668 14114472
|
||||
16 40 80 148 273 523 1036 2055 3961 7311 12936 22266 38262 67694 126062 247275 501350 1024946 2071592 4091096 7850935
|
||||
25 38 48 56 71 123 283 692 1616 3565 7532 15408 30585 58638 107764 188412 311503 485392 714412 1008488 1427223
|
||||
14 19 39 103 268 642 1425 2988 6036 11947 23455 45965 89980 175446 339407 649438 1227274 2290475 4225743 7716883 13965076
|
||||
5 11 28 66 140 276 526 997 1899 3617 6812 12556 22506 39122 65934 107863 171601 266055 402860 596966 867304
|
||||
8 13 31 81 208 495 1080 2181 4132 7434 12821 21329 34356 53787 82604 127367 206280 371838 768806 1774285 4323634
|
||||
9 18 35 71 145 291 576 1137 2256 4519 9166 18861 39330 82676 173737 361669 740083 1480624 2886941 5478659 10118335
|
||||
21 31 45 64 100 195 458 1132 2718 6217 13614 28847 59736 121792 245640 491198 974063 1913167 3714191 7111094 13399192
|
||||
1 12 32 58 95 164 317 674 1509 3439 7816 17487 38177 80909 166261 332305 650790 1262667 2458657 4861265 9826204
|
||||
14 27 54 100 181 331 619 1195 2388 4893 10124 20898 42785 86778 174547 348728 692995 1370992 2701051 5297233 10329738
|
||||
-3 -8 -8 12 79 249 642 1504 3310 6928 13866 26611 49032 86770 147540 241478 382379 592396 916292 1457810 2461765
|
||||
15 31 60 102 157 225 306 400 507 627 760 906 1065 1237 1422 1620 1831 2055 2292 2542 2805
|
||||
10 23 51 110 230 460 877 1614 2941 5463 10551 21211 43741 90750 186443 375543 737860 1411367 2627747 4765780 8429696
|
||||
3 18 49 97 163 248 353 479 627 798 993 1213 1459 1732 2033 2363 2723 3114 3537 3993 4483
|
||||
6 15 28 43 60 83 127 248 635 1836 5238 13997 34750 80693 177053 370696 746640 1455529 2757432 5088111 9153132
|
||||
23 32 32 16 -28 -120 -291 -586 -1067 -1816 -2938 -4564 -6854 -10000 -14229 -19806 -27037 -36272 -47908 -62392 -80224
|
||||
14 39 73 108 148 223 407 847 1824 3904 8313 17801 38467 83342 179071 378052 780510 1575696 3122007 6109179 11895198
|
||||
22 47 93 176 322 583 1064 1956 3578 6459 11554 20802 38412 73511 145101 290630 579846 1135911 2165915 4002828 7160406
|
||||
7 16 39 76 127 192 271 364 471 592 727 876 1039 1216 1407 1612 1831 2064 2311 2572 2847
|
||||
2 12 42 105 217 391 629 912 1188 1358 1260 651 -813 -3599 -8321 -15766 -26922 -43008 -65506 -96195 -137187
|
||||
0 -3 -1 28 114 290 587 1029 1628 2379 3255 4202 5134 5928 6419 6395 5592 3689 303 -5016 -12790
|
||||
18 36 75 147 271 480 842 1511 2833 5551 11204 22950 47369 98511 206849 438313 932832 1978762 4151057 8560981 17302215
|
||||
10 3 -9 -17 8 121 408 1003 2153 4414 9142 19562 42850 93831 201048 416043 826640 1574737 2878477 5057525 8558344
|
||||
16 30 45 63 93 155 282 521 934 1598 2608 4126 6650 12007 26282 67260 181392 479382 1206027 2869985 6474071
|
||||
19 30 48 86 161 293 509 851 1382 2182 3348 5091 8201 15476 35234 88799 224921 545498 1248748 2698152 5528061
|
||||
20 39 73 127 212 360 646 1215 2312 4313 7755 13363 22072 35042 53664 79555 114540 160619 219917 294615 386860
|
||||
11 12 23 64 171 417 939 1972 3911 7453 13909 25812 47978 89232 165192 303042 550551 994426 1798527 3282128 6074521
|
||||
26 40 53 68 95 155 286 551 1048 1922 3379 5702 9269 14573 22244 33073 48038 68332 95393 130936 176987
|
||||
12 23 45 75 110 147 183 215 240 255 257 243 210 155 75 -33 -172 -345 -555 -805 -1098
|
||||
3 19 52 108 193 319 525 920 1764 3637 7828 17238 38379 85534 188923 409940 868373 1789219 3580508 6958696 13144865
|
||||
17 33 47 55 61 97 270 860 2510 6575 15736 35042 73634 147592 284807 533920 981975 1790865 3273077 6045893 11334635
|
||||
15 44 84 131 181 230 274 309 331 336 320 279 209 106 -34 -215 -441 -716 -1044 -1429 -1875
|
||||
6 27 67 134 236 381 577 832 1154 1551 2031 2602 3272 4049 4941 5956 7102 8387 9819 11406 13156
|
||||
29 47 79 131 212 342 560 932 1559 2585 4205 6673 10310 15512 22758 32618 45761 62963 85115 113231 148456
|
||||
-9 -7 10 57 168 408 882 1734 3136 5286 8465 13246 21003 34935 61899 115437 220485 420367 786804 1433807 2536474
|
||||
8 13 43 123 295 625 1210 2185 3730 6077 9517 14407 21177 30337 42484 58309 78604 104269 136319 175891 224251
|
||||
14 21 37 71 138 259 460 786 1367 2600 5550 12739 29624 67357 148080 315462 656254 1344845 2734927 5545487 11231700
|
||||
6 16 35 76 161 319 589 1030 1740 2886 4747 7772 12655 20429 32581 51190 79090 120060 179043 262396 378173
|
||||
25 36 45 64 130 321 779 1754 3702 7500 14889 29333 57614 112746 219398 424500 819260 1586873 3107330 6185019 12529795
|
||||
7 6 2 -5 -15 -28 -44 -63 -85 -110 -138 -169 -203 -240 -280 -323 -369 -418 -470 -525 -583
|
||||
14 23 35 62 125 254 488 875 1472 2345 3569 5228 7415 10232 13790 18209 23618 30155 37967 47210 58049
|
||||
11 23 29 28 38 109 347 976 2491 6006 14004 31900 71212 155816 333902 700066 1434747 2872297 5614783 10716676 19976490
|
||||
13 13 16 25 40 69 149 377 951 2221 4750 9385 17338 30277 50427 80681 124721 187149 273628 391033 547612
|
||||
24 37 60 109 210 404 760 1411 2641 5071 10033 20303 41509 84771 171547 342454 673451 1306066 2504783 4766554 9027925
|
||||
7 28 58 104 184 327 573 973 1589 2494 3772 5518 7838 10849 14679 19467 25363 32528 41134 51364 63412
|
||||
2 9 15 18 16 7 -11 -40 -82 -139 -213 -306 -420 -557 -719 -908 -1126 -1375 -1657 -1974 -2328
|
||||
-2 -8 -22 -36 -30 32 216 659 1677 4012 9338 21221 46842 99962 205876 409585 789396 1480256 2715538 4904886 8782742
|
||||
3 10 27 73 182 407 824 1536 2677 4416 6961 10563 15520 22181 30950 42290 56727 74854 97335 124909 158394
|
||||
10 19 44 102 227 482 972 1856 3356 5774 9577 15730 26695 48929 98377 211450 465398 1013941 2146626 4383766 8623131
|
||||
10 31 72 149 284 512 899 1586 2882 5437 10534 20547 39620 74630 136505 241976 415850 693899 1126468 1782913 2756988
|
||||
11 33 74 146 273 497 898 1641 3074 5923 11677 23368 47206 96055 196723 404751 833173 1706029 3453804 6877118 13417719
|
||||
8 21 58 132 265 504 939 1721 3091 5469 9726 17876 34585 70136 145929 304513 628138 1274073 2543782 5020872 9847569
|
||||
-4 -8 -14 -25 -37 -22 109 583 1910 5132 12220 26671 54365 104750 192431 339247 576928 950432 1522070 2376535 3626959
|
||||
18 38 82 173 347 653 1153 1922 3048 4632 6788 9643 13337 18023 23867 31048 39758 50202 62598 77177 94183
|
||||
15 28 47 91 191 388 741 1353 2420 4300 7589 13199 22512 37951 64995 118188 236764 521302 1213228 2857007 6615220
|
||||
14 21 37 81 183 388 760 1386 2380 3887 6087 9199 13485 19254 26866 36736 49338 65209 84953 109245 138835
|
||||
16 24 32 40 48 56 64 72 80 88 96 104 112 120 128 136 144 152 160 168 176
|
||||
3 8 23 61 141 288 533 913 1471 2256 3323 4733 6553 8856 11721 15233 19483 24568 30591 37661 45893
|
||||
14 30 57 99 167 295 569 1169 2424 4880 9381 17163 29961 50129 80773 125897 190562 281058 405089 571971 792843
|
||||
-6 -7 -10 -4 37 154 403 855 1596 2727 4364 6638 9695 13696 18817 25249 33198 42885 54546 68432 84809
|
||||
1 6 25 68 141 255 458 900 1941 4312 9339 19240 37505 69369 122388 207128 337977 534090 820477 1229244 1800997
|
||||
17 27 53 113 230 432 752 1228 1903 2825 4047 5627 7628 10118 13170 16862 21277 26503 32633 39765 48002
|
|
@ -0,0 +1,3 @@
|
|||
0 3 6 9 12 15
|
||||
1 3 6 10 15 21
|
||||
10 13 16 21 30 45
|
|
@ -0,0 +1,51 @@
|
|||
#!/usr/bin/env tclsh
|
||||
source ../prelude.tcl
|
||||
|
||||
proc diff {lst} {
|
||||
set out {}
|
||||
for {set i 1} {$i < [llength $lst]} {incr i} {
|
||||
lappend out [expr {[lindex $lst $i] - [lindex $lst [expr {$i-1}]]}]
|
||||
}
|
||||
return $out
|
||||
}
|
||||
|
||||
|
||||
proc allzeros {lst} {
|
||||
foreach x $lst {
|
||||
if {$x != 0} { return 0 }
|
||||
}
|
||||
return 1
|
||||
}
|
||||
|
||||
proc predict {lst} {
|
||||
#puts "predict $lst"
|
||||
if {[allzeros $lst]} {
|
||||
return 0
|
||||
}
|
||||
return [expr {[lindex $lst end] + [predict [diff $lst]]}]
|
||||
}
|
||||
|
||||
proc unpredict {lst} {
|
||||
# note: this could be
|
||||
# return [predict [lreverse $lst]]
|
||||
if {[allzeros $lst]} {
|
||||
return 0
|
||||
}
|
||||
return [expr {[lindex $lst 0] - [unpredict [diff $lst]]}]
|
||||
}
|
||||
|
||||
proc solve input {
|
||||
set fw {}
|
||||
set bw {}
|
||||
while {[gets $input line] >= 0} {
|
||||
set next [predict $line]
|
||||
set prev [unpredict $line]
|
||||
lappend fw $next
|
||||
lappend bw $prev
|
||||
puts "$prev {$line} $next"
|
||||
}
|
||||
puts [ladd $fw]
|
||||
puts [ladd $bw]
|
||||
}
|
||||
|
||||
solve stdin
|
|
@ -0,0 +1,140 @@
|
|||
F7.-.|.-F777F7.7-|F-7-7J.-J-7-JFFFJ-F--7FJ-|7F-JF|-F.|F-7-F7-L-.FF-|7.--FL-L7-J-FJF-F7F--77..F|.F--7F777|-JJ7FJF---J-L7L-F-LJ7F.|F7JJ-777.-|
|
||||
7F||LF7F7L-J7||.|.JL-7LFFJFF7.LFF7|.J7F7JJ|L-JFJFJF--FF7L|.-.|-FJL7|-FJ.-F7J.FJ|LJF.L|J|F-L7.F|FL-7LJ|7FL7|.|-LJ7JJL--FJL77JJLL7.F||7|L|-7JJ
|
||||
F-J|L|F7|7JLFF7-L-J7.JFJJ.|LJ7||JJF7|J|J-F-7-F7-|FF-FJ||7.|F-L-7-.L.LJJ77LL-7J.|JJL7.|7FF-||||F---JF7L-7J--FJFJ.L7-FJ7L77JLJ.|LLF7.-|-7LL777
|
||||
7JF--|.JJF-7.7-7FLF--J||F|.|LF7LJF7LJ.|L.F-FFFL.-|7-||LLJ777LLLLJF77F|-FL|-|L--FJF-F7L-JLFL--LL----J|F-JJ-|F-7L-7|.LF-7F|7-FLL-F|JFL|.|J.|--
|
||||
|.|77|.|LJ7F.|-L--7J|F|FF7.F7||-77F77-LJ7|-J-JJ7|L|LJ7LJ|.L77J|F-FJ|L7-J|......|F|7LJJ.FL-7FJ.L|-F7FJL--7F7J.|FLL77F--J--|FF-|F7|F|-|L77F7|7
|
||||
F7|L-|F|7L-|FJ7-JFJ|L--JJFJJF|7-J|J|-FJF777LL7F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7LJL7-L--|7|7--.J
|
||||
F7-777L-LLF7L------7F7|||||FJL7F--J||L7|FJL7LJ|FJF----J|LJFJL7|L7F-7||LJJF7||F7|F--7L-7||||FJLJFJL7L7|F7L7||L-7||LJL7|.F7LJL---J..|JLJ---J|J
|
||||
-J7L|F7F|J|L7JF--7LLJ|LJLJ|L-7|L--7||FJ|L7FJF-JL7|LF7F7|F-JJFJ|FJL7LJF7F7||||||LJF-JF-JFJ||L--7L-7L7|||L7|LJF-J|L7F7|L-JL-----7F7FF-77J.J-|.
|
||||
.-J7FJLLJFL7L7L-7|F77L7F-7L-7|L7F-J||L7L7|L7L7F-JL-J||LJL--7L7|L7FJF7|||||LJ||L7FJF-JF7L7LJF--JF7L7|||L7LJF-JJFJFJ|LJF7F------J|L-JFJ77-JLFF
|
||||
F7LL7-LJ.F-JFJF-J||L7-LJ7L7FJL7||F7LJFJFJ|FJFJL---7FJ|F--7FJFJ|FJL-J||LJ|L7FJ|FJL7L7|||LL7FJF7FJL-J|||FJF7|LF7L7L7|F7|LJJF-----JF7FJJLFJ.F|.
|
||||
7J.L|.|.L|F7L7L-7LJFJF--7FJ|F-J|LJL-7L7L7|L7|F7F-7|L7LJF-JL7L7|L7F7FJ|F-JFJL7||F7|FJFJL7FJ|FJ|L---7||LJFJLJFJL7L7|||LJF--JF7F---JLJF7JL--F|7
|
||||
J7L-J-7|LLJL7|F7|F7L7L-7|L7|L-7L7F--JFJFJ|FJ||||FJL7L7.L--7|FJ|FJ|LJFJL-7L-7|||||||FJF-JL7||FJF7F-J|L-7|F7F|F-JFJLJL7-|F--JLJF--7F7-|7.FL7.J
|
||||
FF-FJL7JJF--JLJ||||FJF-J|FJ|F7L7||F-7|FL7|L7|||||F7|FJF7F7||L7||FJF7L7F-JF7||||||||L7|7F7||||F||L7FJF7|||L7|L7FJF--7L-JL-----JF7LJL-7----77.
|
||||
L-7.--||FL--7F7|LJ|L7L-7|L7|||FJ|LJFJL--J|FJ||||||||L7||||||FJ||L7||FJL7FJ||||||||L7||FJ||LJ|FJ|FJL7|||||FJL7||FJF7L7F7F-7F-7FJL7F7FJ-L-J|--
|
||||
FJLJFF--7F-7LJ||F7|FJF7||||LJ|L7|F7L---7FJ|FJ|||LJ||FJ|||||||FJL7|||L7FJ|-|||||||L7||||FJ|F-JL7||LFJ|||||L-7|LJL-J|LLJ|L7||JLJ-FLJLJJJJ-FJ.|
|
||||
7JF.LL7FJL7L--JLJLJL-JLJL-JF7L7|LJ|F---JL-JL7||L-7||L7||||||||F7||||FJL7L7||||LJ|FJ||LJ|FJL-7FJ|L7L-J||||F7LJF-7F7L--7L-JLJF--7F-7J|.|7|||FJ
|
||||
LL|J.|||J7L7F-7F-----7F7F7FJL7|L-7|L------7J||L7FJ|L7||LJ|||||||||||L-7L7|||||F-JL7|L-7||F--JL7L7|F--J||||L-7L7||L-7FJF--7FJF-J|FJ7L--F7F-7|
|
||||
--FJFFJL7F7LJLLJF77F-J|||||F-JL--JL-7F7F7FJFJL7LJFJFJ||F-J|||||||||L--J-||||||L7F-J|F-JLJL---7L7LJL--7|LJL-7|FJ|L-7|L7|F-JL7|F-JL-77J.L|7FL-
|
||||
LFL7-L-7|||F7FF-JL-JF7|LJLJL7F7F7F-7||LJ||FJF7L7LL7L7||L7FJ|||||||L7FF7FJ|||||FJL-7|L7.F7F7F-JFJF----J|F---J|L7L--JL-J||.F7|LJF7F-JJLFL|-7LJ
|
||||
LLJ|.|L||||||FJF----J|L7F---J|||||L||L-7||L7|L7L-7|FJ||FJ|FJ|LJ||L7L-J|L7|||LJL-7FJL7L7|LJLJF7L7L-7F-7|L---7L7L-7F7F7FJL7|||F-J|L7F7.7-7-L..
|
||||
FL-LFF-JLJLJLJFJLF---JFJL--7FJ||||FJ|F7|LJFJL7L7FJ|L7|||FJ|FJF-JL7|F-7L7LJ|L--7FJL7F|FJL7F-7|L7L-7LJFJ|F---JJL-7LJ|||L7FJ|LJL-7L-J||F7.F7LL|
|
||||
FLFJLL--7F7F7FJF-JF-7FJF--7LJ-LJLJL7LJLJF7|F-JJ|L7L7|LJ||FJL7L7F7|LJ|L7|F-JF--JL-7L7|L-7LJJ||.L--JF7L-J|F--7F-7L--J|L-JL-JF7F7L7F-JLJ|.L-7FJ
|
||||
F.L7|.|LLJLJLJLL--JFJ|-L-7L--7|F7F7L---7||LJF--JFJL||F-J|L7FJFJ||L-7F7|||F7L----7|FJL--J.F-J|F----JL-7.LJF-JL7L----JF7F7F-JLJL7LJF-7FJ-JJ|F|
|
||||
-.L|77J7F--------7|L-JF7LL--7L7|LJL----J||F7L--7|F7LJL-7L7LJ-L7||F-J|LJ||||F-7F7||L----7FJF7|L7F----7L7F-J|F7|F---7FJLJ|L----7|F-JL||J7F|F--
|
||||
L-F7J-JFL-------7L----J|F--7L7|L--------JLJL7F-JLJL-7F-JFJF7F7|||L-7L7FJ||||FJ||||F-7F7|L7|LJFJ|F---JFJL---JLJL7F7LJF7FJF----J|L7J7LJ|.|-|-|
|
||||
LJ||-JJL|F------JF7F-7FJL7FJJ|L7F-----7F7F-7||F7F---J|F7|FJ|||||L-7L7|L7||||L7|||||FLJ|L7||F7L-JL---7|LF----7F7LJ|F7||L-JF---7|FJ-F7||7J.-FJ
|
||||
F|L-7.FF7L--7F--7|LJFJL7J||LFJFJL----7LJLJLLJ|||L---7LJ||L7LJLJL-7L-J|FJ||LJFJ||||L-7||FJLJ||LF-----JL7L---7LJL--J||||F7FJF7FJ|L-77-7LL7L..F
|
||||
L|J||L-LF---J|F7LJ-FJF7L-JL7L7|F7F--7L---7F--J||F7F-JF-J|-L---7F-JF-7||FJL7FL7||||F7L7LJF7FJL-JF-7F7F7L----JJF7JF7|LJLJLJFJ|L7L--JJF7-||-|7L
|
||||
L|-|-JJ|L-7F7||L---JFJL7F-7L-JLJ|L-7|F---JL7F7||||L-7|F7L7.F--JL-7|FJLJ|F7L-7LJ|||||FJFFJ|L--7FJ.LJ|||F7F----JL7|LJF-----JFL-JJF7LF-7-LL7.JJ
|
||||
FJLF7|-|JL|||||F--7FJ-F||-L--7F7L--J|L7F--7LJLJ|||F7||||FJFJF-7F7LJL--7|||F7|F-J|LJ||F7L7|.F-J|F7F-J|||LJF----7||F7L----7F7FF--JL7L7|J7L-7L7
|
||||
FJF.LJFJLFJ|LJLJF7LJ||FJ|F---J||F--7L-J|F-J|F-7||||LJ||LJ7L7|FJ||F-7F-J||||LJL7FJF-JLJ|FJL-JF-J||L7FJLJFFJF--7LJ||L--7F7LJL7L7F--J-||.|-.L7J
|
||||
|-F-|||.FL7|F-7||L7FF-JFJL7F--JLJF-JLF7|L---JFJLJ|L-7|L7LF7LJ|FJ|L7|L7LLJ|||F-J|FJF7F7||F---J7FJL-J|F7F7L-JF7L--JL-7-LJ|F-7L-JL7F--JL-7J7|L7
|
||||
|.|LFF|7FLLJL7L7L7L7L--JF-J|F----JF--JLJF----J|F7|F7|L7L7|L--JL7|FJL7L--7LJ-L-7||FJ||||||F----JF7F7||LJL--7||F--7F7L--7|L7L---7LJF----J.F-JF
|
||||
F-|FFJF-L7F||L7L-JFJF--7L--JL7F---JF-7F-JF7F7F-J|LJLJ||FJL---7FJ|L7.|F--JJ|JFFJ|LJFJ|LJLJL-----JLJLJL----7|||L7|LJL-7FJL7L---7|F-JJ7LLJ-JF-7
|
||||
F7|J..J.F7J|FFJF-7L-JF7L--7J|LJF7F7L7|L--JLJLJF-JF--7FJL7LF--JL7L7|FJL-7F-7-FJFJF7L7|7||.F---------------JLJL7L-7LF7LJJJL----JLJF--7-|7.L7J.
|
||||
L|L||-LF-.|FFL7|FJF7FJ|F-7L7F--JLJL-JL-------7L--JF7|L-7L7|F-7FJJ||L7F7LJFJ-|FJFJL-JL7JJ7L--7F---------7F---7|F-JFJL7JLF7FF---7FJF7|FF-7FLL7
|
||||
LJ.FJF7JL|-F77LJL-JLJLLJLL7|L---------------7L7F7FJ|||FJFJ|L7|L7-LJFJ||F-JLLLJJL-7F7FJJ|F7F7LJF7F7JF--7LJF7FJLJF-JF7L7FJL-JF-7LJFJ||-J7L|.||
|
||||
FLF-7LL--F-JL-------------J|F7F-------------JJLJ|L7|L7L7|J|FJL7L--7|FJ|L777|-L7F|LJ||LF-JLJL--JLJL7L-7L--JLJF7F|F-J|FJ|F---JJL--J.LJJF7.J-J-
|
||||
|J|L||FJ.L-7F--------7F-7F7LJ|L-------7F----7F-7L-JL7|-||FJ||L|F7FJLJFL-J7-L.F|L-F-JL7L---------7FJF7L----7J|L-JL-7|L-J|F-------7F7-|L|-L7.J
|
||||
777LL7-F-JFJ|F7F-----JL7LJL-7L--------J|F---J|FJF7F7LJFJ|L7L7FJ||L7..7|L|L7--J7.F|F-7|-F7F-7F---JL-JL7F---JFJF7F-7||F-7||F--7F--J||F7L7-F..|
|
||||
LL7-F|.L-LL-J||L-------JF--7|F---7F7F7FJL7F--JL-JLJL77L-J.|FJL7||FJ..F7L|7LF-LF--LJ-LJFJ|L7|L-----7F7LJF---JFJ|L7LJ||FJLJL-7LJF--JL-77|-LFF|
|
||||
FF7F7J||||.F-JL---7F7F7FL-7LJ|F--J|LJLJF-J|F-7F7F--7L-7F-7LJLFJ|||J.F|-7J|.77-LJ||J-LFJFJF|||F7JF-J||F-JF---J|L-JF7LJL----7L7JL7F---J-J.LF77
|
||||
F-J||F-J7L-L-7F7F7LJLJL---JF7|L---JF7F-JF7|L7LJLJF7L-7||FJ||FL7|LJJ.LJLJJ7FLJ77L|JJFFL7L7FJL-JL-JF7|LJF7L--------JL-----7-L-JF7|||F-7JJ-F-7L
|
||||
FJ-7|J-LF-7|FLJLJL7F7F7F7F7|LJF----JLJF-JLJFJF7F7|L7LLJ|L-7J|-||-JL7-FFJFLJ|.FJ7JJF7J-L7LJF-7F-7FJ||F-JL--7F7F-------7F7L----JLJL-JFJJJFLLL|
|
||||
F||LJJ|LL-|7F-----J|LJLJLJLJF7L7F---77|F---JFJLJLJFJF7F|F-J-|-||-LLL7JL77|.-L--LFF--7F7L--JJLJLLJFJ|L-7F-7LJLJF7F---7LJ|F7F7F------JJJ.|7-L|
|
||||
.L|JJFL7|F-FL---7F7|F-7F7F--JL-J|F--JFJL7F77L7F--7|FJL7||F7J.LLJ--7||-7L-7-|.J.LLL-7LJL--7LF-7FF7L7|F7LJ-L----JLJF--JF-J|LJ|L---7F7F7.F|JLFJ
|
||||
LLL.|LJ-L-FF7FF7LJLJL7||LJF--7F-JL---JF-J|L7FJL7.LJ|F-J|LJL7-7FLJ7|-|.L-||-JFL|LL|LL-7F-7L-JFJFJL7LJ||F7F----7F--JLF7L-7L-7|F-7FJ|LJL7L|FL7J
|
||||
F|7FL-FF7L-|L-J|7F-7FJLJF7|F7LJ7F-----JF7|FJ|F-JF7FJL--JF7FJ.FF-J|FF-7F-7J||7JLF-F---JL7L--7L7L-7|F7|LJ|L-7F7LJLF--JL-7|F7|||FJL-JF7FJ.F-JJ|
|
||||
L|-7..F-|7FL--7L7L7|L---JLJ||F--JF-----JLJL-JL-7|||F----JLJ|7FFJ7FF-L7JFL.FL.F7LLL--7F-JF--JFJF7||||L-7L7FJ|L7F7L7F---JLJLJ|||F7F-JLJL|.L-77
|
||||
L|.FJ-L.|JFF7JL7L-J|F--7F7FJ|L---JF------7F----J|||L---7F----7|F7J-L-JF--F.L--F-----JL-7L--7L-J||LJ|F7L7|L-JFJ|L-JL----7F7LLJLJ|L--7JF|FFJLJ
|
||||
||LLJ-LFF7F||F7L--7|L-7LJ|L7|FF7F7L77F7F7LJ7F7F7||L7F-7LJF---JF-7J7.|L|7L7F-7LL--7F----JJF7|F-7|L-7LJL7|L---JFJF7F7F---S||F7F-7L7F-J.FJJ|J..
|
||||
--|L7-F7||FJ||L-7FJ|F7L-7L-J|FJLJL7L7|||L---JLJ||L-JL7L--JFF7||FJ-FF7.LF7|7.-JJ.L||F-----J|LJFJ|F7L--7|L-----JFJ|||L---7|||||FJJ|L--7L||-FJ7
|
||||
L-7FLFJLJ||FJL-7|L7|||F7|F-7LJF--7L-J|||F-----7LJF7F7L-7F7FJL7||-F7||-LL|-FFJJLF-LJL-7F--7L-7L7|||LF-JL-------JFLJ|F7F7||||||L-7|F--J-|J|JF-
|
||||
F|L-JL7F7LJL-7FJL-JLJLJLJL7L7FJF7L---JLJL----7L7FJ|||F-J||L-7LJL7|LJL7-LFJ.7JJ.L.F7F7LJF7L-7|J|LJL-JF-------7F7F7FLJLJLJ|LJLJF-J||J|J7LL|FJ7
|
||||
|-7LF-|||F--7LJF7F7F7F7F--JFLJFJL------------JJLJFJ||L--JL--JF7FJL7F-J-7|-F7-F7LF|LJ|F-JL-7|L-JF7F7FJF7F---7LJLJL----7F7|F7F7L-7LJ-|7LF7JF7|
|
||||
.FJ7L7||LJF-JF7|LJ||LJ||F-7F7FJF7F--------------7L-JL7F---7F-JLJ-FJL7J7FJJ||.J7.LL-7LJF--7LJF7FJ||||FJLJF77L7F7F7F-7FJ||||LJ|F7|JFLJF|JL7|77
|
||||
F-FJLLLJF-JF7|||F-J|F7LJL7|||L7|LJF----7F-------JF--7|L--7LJF-7F7L7FJ-|LJ-|L7-FF-7-L7FJFFJF7|||FJ|LJL7F7||F7LJLJ|L7|L-JLJL-7||LJJLF7-|7.JJF7
|
||||
J7FJ7JF-JF7|LJLJL--J||F7FJLJL7LJF7L---7||F-----7FJF7|L7F7L--JFJ|L-JL-7F77FJFJF7L7|.L||F-JFJ|||||FJLF-J|||LJL---7L-J|F-7F-7FJ|L7J7-L7.L--|J||
|
||||
LF7--FL-7|||F-7F7F--JLJLJF7F7L--JL--7FJ|LJF7F-7LJFJ|L7LJ|F-7FJ|L-7F--J||FJFJ-||FJL7|LJL-7L7LJLJLJF7L-7|LJF7F---J-F7LJL|L7LJ|L-JJ||J.-|-LJL-.
|
||||
LLJ-JLL|LJLJL7LJ|L---7F7FJLJL7F--7F7LJJL--JLJLL7FJFL7L-7LJL||F7LFJ||F7|LJFJF7|LJF-JF7F--JFJLF----J|F7||F-JLJF7F7FJL--7L7L7F7F7.LF|LJ|.|||-LF
|
||||
--LJ|.-F-7F7FL-7L--7LLJLJFF-7||F-J|L7F--7F----7|L--7|F-JFF7LJ||FJFJFJ|L-7|FJ||F-J-FJ|L--7|F-JF---7|||LJL----JLJLJF7F7L7L7LJLJ|7-7L7.-FJ-|.F-
|
||||
.LJ.|.LL7LJL---JF-7L-----7L7|LJL--JFJ|F-J|F7F7|L-7FJLJF7FJ|F7||L7L7L7L7-||L7||L7JLL7|F7JLJL--JF7FJ|||-F7F------7FJLJ|FJLL7F-7L7.|LJ-|JF7JF-7
|
||||
7.FJ.7JL|F-7F-7FJLL-----7L-JL7|F--7L-JL7L||LJLJF7LJLF7|||FJ||||F|FJFJFJFJ|FJ|L7L7F7|||L77F7F7F||L7LJL7||L-----7LJF-7|L-7FJL7|FJ7||F7|FJ|7J-L
|
||||
LFJ.LLJ.LJF||FJL7F------JF--7L7L-7|F7F7L-JL7|F-JL--7||||||FJ||L7|L7L7L7L7|L7|FJFJ||||L7|FJLJL-J|JL7F7LJL------JF7|FJL-7||F-JLJF7F77L||LJ7F7.
|
||||
-JL|FJF-F-7LJL--JL--7F--7|F7L7L-7|LJLJL7F-7L7L-7F--J|LJ|||L7||FJ|FJFJFJFJ|FJ|L7L7||||FJ|L-7F7F7|F7LJL---------7|LJL--7LJLJLF77||-LF7F7.L7-F7
|
||||
FFFL|.J.L7|F7F7F7F-7LJF7LJ|L7L-7|L----7||FJFJF7||F-7|F-J|L7|||L7|L7L7L7L7||FJFJFJ||||L7L-7LJLJ||||F7F--------7LJF-7F-JF7F-7|L7||-F|LJL7.JF|7
|
||||
FFL-77.FFJLJ||LJ||FJF-JL--JFJF7||F---7|||L7L-J|||L7LJL-7L7LJ||FJ|FJ7L7|L|||L-JFJJ|LJL7|F-JF---JLJLJLJF-7F7F-7L7FJFLJF-J|L7||FJ||F7|F--J7L-77
|
||||
FLJ-|7-FJF-7|L-7LJL7L-----7|FJLJ|L--7LJ|L7L7F-J||FJF7F-JFL-7||L7|L7F7||FJ||F--JF7L--7|||F7L----------J|LJLJFJ|LJF7F7L-7L-J||L-JLJLJL7J.--LF-
|
||||
|-|7|L-L-J-||F7L-7FJF-7F--JLJF-7L---JF7L-JFJL--JLJFJLJF7F-7|||FJ|FJ|LJ|L7|||F--J|F-7|LJLJL7F-----7F--------JLF--J|||F-JF--JL7F------J77J-|FJ
|
||||
7.-7|-L||F-JLJ|F-JL7L7|L--7F7L7L7F---JL7F7L--7F-7FJF7L|LJFJ|LJL7|L7L-7|FJ||LJF--JL7||F---7|L----7LJF7F-------JF--J||L7FJF7F7||F-------7---|.
|
||||
LJ7|J7.LLL-7F7LJF-7L-JL---J|L7|FJ|F----J||F-7||FJL7|L7L-7L7|F-7||FJJFJ||FJL7FJ.F-7|||L7F7LJF7F77L--J||F-------JF7|||FJL-JLJ||||F-7F---J--||F
|
||||
|LL|J7F7.F-J||F-J7L-------7L7LJL-JL-----JLJFJLJL--J|FJF7|FJ|L7LJ|||FJFJ|L7FJ|F7L7|||L7||L7FJLJ|F7F7FJ|L7F7F----J|FJ||F-----J|LJL7LJ.L|LFFJ77
|
||||
F7|LFL7L-L-7|LJF----------JFJF--7F-------7FJF-7F-7FJL7|||L-JFJF-J|FJFJFJFJL7|||FJ||L7|||FJ|F--J|LJLJFJ-LJLJF----J|FJ|L----7L|F--JJF7L7.F7.|.
|
||||
7L7-FF-JJLJ||F-JF-7F7F7F7F7L7L-7|L------7LJ7|FJ|FJL7FJ|LJF-7L7L7FJ|FJFJFJ|FJLJ||FJL7||||L-JL7F7L----JF-7F-7|F7F7FJ|||F----JFJ|F7F7|L--7|J.|J
|
||||
|.L7FJ.F777LJL--J.LJ||||LJL7|F-J|-F-----JF7FJ|FJL7FJL7L-7L7L-JFJL-JL7|FJF7|F--J|L7FJLJ|L-7F-J||JF7F7LL7|L7LJ|||LJFJFJL-77F7L7||LJLJF--J7.FJJ
|
||||
F7||L-J-L--F-----7F7LJLJF7JLJ|F7L7L---7F-J||FJL-7|L7FJ7FJFJF-7|F--7FJ|L7||||LF7|FJL--7L7|||F-J|FJ|||F-JL-JF-JLJF7|FJF--JFJL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|.J.L7J.|.FLL--7||FFJ.J-FJJ-F-J
|
||||
|LF7F|.L----F-77||.|FL7|.L.||L|JJF7FJJJ|LL7FL7L7|7.-L7-J|L|J-L7|L|7|FJ7FL---|7.L.F.|.F-F-|JLJFF..L7J.|-LF7..FL7JF.L----JLJLL---7L.|.-J|7FLF.
|
||||
|J||7LJ|.||.L7L--7F-|7LJ.|..|7||-JLJJ-77FLJJ-|J||-7|JJ|L-.L7|F|-J.L||J77F7|F-J.|F--77JLLL|-F--|-|-77LJJ|LFLJJL|LF7|-7F--F|7.LFJ7-|.L7FLL|LJ7
|
||||
J-F-JJJF7-|7.|.LJ-LJ|LL7LFJ-7-|7FLF|.FFL7.||.J--J-|7.L|7|.FJ-7.|J|F||-J7JL|J7.FFJ|7||-..L|-J7F|LF7-|.-.F-JFFL-|L|-7|.|L77.FF7-7L7LFLJ||J.F-7
|
||||
.FF.J.F7J.L--LF7J.|.LJ7||L|F7|JJF.|JFLJL|7LL7-||JJL|-7JF--|J7|.FFJ7LJ7|JLFJLJ7L.L-77|L|-.L.|-FL7.FJ.FJF-J.F|-FJ||.FJ-.|.F-L-F.F-F-7.FF|JFL7.
|
||||
-L|JL--J--J.LLLL7-F7-L-L-JL-JL..L-.L|J.F7-JL|--J---JJJLLL-7--FJLLLFJL-|JJL--LFL7.LLL-7JLLJ-7-J.F-FJ-L-LJJF7JL|JLF7J.L-L--JJ.|.LJ.LJ.-7J.L7-7
|
|
@ -0,0 +1,9 @@
|
|||
...........
|
||||
.S-------7.
|
||||
.|F-----7|.
|
||||
.||.....||.
|
||||
.||.....||.
|
||||
.|L-7.F-J|.
|
||||
.|..|.|..|.
|
||||
.L--J.L--J.
|
||||
...........
|
|
@ -0,0 +1,10 @@
|
|||
FF7FSF7F7F7F7F7F---7
|
||||
L|LJ||||||||||||F--J
|
||||
FL-7LJLJ||||||LJL-77
|
||||
F--JF--7||LJLJ7F7FJ-
|
||||
L---JF-JLJ.||-FJLJJ7
|
||||
|F|F-JF---7F7-L7L|7|
|
||||
|FFJF7L7F-JF7|JL---7
|
||||
7-L-JL7||F7|L7F-7F7|
|
||||
L.L7LFJ|||||FJL7||LJ
|
||||
L7JLJL-JLJLJL--JLJ.L
|
|
@ -0,0 +1,5 @@
|
|||
.....
|
||||
.S-7.
|
||||
.|.|.
|
||||
.L-J.
|
||||
.....
|
|
@ -0,0 +1,5 @@
|
|||
..F7.
|
||||
.FJ|.
|
||||
SJ.L7
|
||||
|F--J
|
||||
LJ...
|
|
@ -0,0 +1,131 @@
|
|||
import sys
|
||||
from collections import defaultdict
|
||||
map = [x.strip() for x in sys.stdin]
|
||||
|
||||
print(map)
|
||||
|
||||
Y = len(map)
|
||||
X = len(map[0])
|
||||
assert all(len(row) == X for row in map)
|
||||
|
||||
N,E,S,W = 1,2,4,8
|
||||
unknown = 0b11111
|
||||
grid = {}
|
||||
start = None
|
||||
for i, row in enumerate(map):
|
||||
for j,c in enumerate(row):
|
||||
d = 0
|
||||
if c == ".": d = 0
|
||||
elif c == "7": d = W|S
|
||||
elif c == "J": d = N|W
|
||||
elif c == "L": d = N|E
|
||||
elif c == "F": d = S|E
|
||||
elif c == "|": d = N|S
|
||||
elif c == "-": d = W|E
|
||||
elif c == "S":
|
||||
d = unknown
|
||||
start = (i,j)
|
||||
else:
|
||||
raise Exception("invalid char %s at (%s,%s)" % (c, i, j))
|
||||
grid[i,j] = d
|
||||
|
||||
#print(grid)
|
||||
|
||||
def find_loop(grid, start):
|
||||
front = [(0,start)]
|
||||
dist = {}
|
||||
count = defaultdict(int)
|
||||
count[start] -= 1
|
||||
def push(i,j,from_):
|
||||
if grid.get((i,j),0)&from_:
|
||||
front.append((cost+1, (i,j)))
|
||||
while front:
|
||||
front.sort()
|
||||
cost, n = front.pop(0)
|
||||
if n not in grid:
|
||||
continue
|
||||
count[n] += 1
|
||||
if n in dist:
|
||||
continue
|
||||
dist[n] = cost
|
||||
i, j = n
|
||||
d = grid[n]
|
||||
if d&N: push(i-1,j,S)
|
||||
if d&S: push(i+1,j,N)
|
||||
if d&W: push(i,j-1,E)
|
||||
if d&E: push(i,j+1,W)
|
||||
|
||||
#print(count.values())
|
||||
if not all(c == 2 for c in count.values()):
|
||||
# not a loop
|
||||
return {}
|
||||
|
||||
return dist
|
||||
|
||||
def enclosedby(grid, points):
|
||||
# upsample by 3x3
|
||||
import numpy
|
||||
fill = numpy.zeros((Y*3,X*3+1), dtype='uint8')
|
||||
#fill = [[0]*(X*3) for _ in range(Y*3)]
|
||||
for i,j in points:
|
||||
d = grid[i,j]
|
||||
if d == N|S: t=[[0,1,0],[0,1,0],[0,1,0]]
|
||||
elif d == N|W: t=[[0,1,0],[1,1,0],[0,0,0]]
|
||||
elif d == N|E: t=[[0,1,0],[0,1,1],[0,0,0]]
|
||||
elif d == S|W: t=[[0,0,0],[1,1,0],[0,1,0]]
|
||||
elif d == S|E: t=[[0,0,0],[0,1,1],[0,1,0]]
|
||||
elif d == E|W: t=[[0,0,0],[1,1,1],[0,0,0]]
|
||||
else: raise Exception("invalid d=%d at (%s,%s)" % (d, i, j))
|
||||
for k in range(3):
|
||||
for l in range(3):
|
||||
fill[i*3+k, j*3+l] = t[k][l]
|
||||
|
||||
def draw(fill):
|
||||
for row in fill:
|
||||
print("".join(".+O"[f] for f in row))
|
||||
|
||||
draw(fill)
|
||||
|
||||
# fill edges
|
||||
for i in range(Y*3):
|
||||
if fill[i, 0 ] == 0: fill[i, 0 ] = 2
|
||||
if fill[i, X*3-1] == 0: fill[i, X*3-1] = 2
|
||||
for j in range(X*3):
|
||||
if fill[ 0 , j] == 0: fill[ 0 , j] = 2
|
||||
if fill[Y*3-1, j] == 0: fill[Y*3-1, j] = 2
|
||||
|
||||
# flood fill
|
||||
changed = True
|
||||
while changed:
|
||||
#draw(fill)
|
||||
changed = False
|
||||
for i in range(Y*3):
|
||||
f = (fill[i] == 2)
|
||||
f = numpy.roll(f, 1) | numpy.roll(f, -1)
|
||||
if i > 0: f |= (fill[i-1] == 2)
|
||||
if i < Y*3-1: f |= (fill[i+1] == 2)
|
||||
f[-1] = False
|
||||
f &= (fill[i] == 0)
|
||||
if f.any():
|
||||
fill[i, f] = 2
|
||||
changed = True
|
||||
draw(fill)
|
||||
|
||||
# downsample
|
||||
inside = []
|
||||
for i,j in grid:
|
||||
f = [fill[i*3+k, j*3+l]==0 for k in range(3) for l in range(3)]
|
||||
if all(f):
|
||||
inside.append((i,j))
|
||||
|
||||
|
||||
print("inside =", inside)
|
||||
return len(inside)
|
||||
|
||||
for D in [W|S, N|W, N|E, S|E, N|S, W|E]:
|
||||
grid[start] = D
|
||||
loop = find_loop(grid, start)
|
||||
if loop:
|
||||
print(D, loop.keys())
|
||||
print(max(loop.values()))
|
||||
print(enclosedby(grid, loop))
|
|
@ -0,0 +1,140 @@
|
|||
.#...........#.........................................................................#...............#...........#........................
|
||||
.......................#....................................................................................................................
|
||||
...............................#...........#.................#.............................#.............................................#..
|
||||
......#............................................#........................................................................................
|
||||
......................................................................#.....#.....................#.........................................
|
||||
.................#.......#.......................................#................#.....#.....................#.............................
|
||||
.........................................#.................#................................................................................
|
||||
................................#.............................................................#..........#..................................
|
||||
#.......................................................................#..............................................#.................#..
|
||||
..........#....................................#......................................#............................................#........
|
||||
................#....................................#........#.............................................................................
|
||||
......#........................................................................#............................................................
|
||||
......................#..............#..............................................................#..........#.....#......................
|
||||
..................................................#.......................#..................................................#..........#...
|
||||
............................#...............................................................................................................
|
||||
........#...................................................................................................................................
|
||||
..................#.......................#................................................................#................................
|
||||
.............................................................#........#.....................................................................
|
||||
..............................#.......#......................................#.............#........................#.......................
|
||||
.#............................................................................................................#...........................#.
|
||||
...................................................................................................#....................#...................
|
||||
....................#......................#.............#.....#..................................................................#.........
|
||||
.................................................................................................................#..........................
|
||||
............................................................................................................................................
|
||||
....................................................................#.....................#.................................................
|
||||
.................................#..............................................#..............#............#.............#.................
|
||||
...........................#............................................#...........................................#.......................
|
||||
......................#.........................#...........................................................................................
|
||||
.......................................#....................................#...................................#...........................
|
||||
.....#..........#.........................................#...............................................................................#.
|
||||
#..........#......................#...................................................#.......#.....#.......................................
|
||||
.........................#..................................................................................................................
|
||||
....................#..............................#.............#.........................................#.......#........#...............
|
||||
...........................................#........................................................................................#.......
|
||||
...........................................................#....................#...........................................................
|
||||
..........#....................................................................................................#............................
|
||||
...............#................................#..........................#..............................................................#.
|
||||
..#.................................#.................................................................#.......................#.............
|
||||
.....................#......#...............#........................#................................................#.....................
|
||||
..............................................................................................#....................................#........
|
||||
................................#.......#...................................................................................................
|
||||
..........#................................................#...................#.....#..............#..........#..........#.................
|
||||
.........................#..................................................................................................................
|
||||
..................#...............................#...........................................................................#.............
|
||||
.........................................................................#............................................#.....................
|
||||
........#.....#..............................................................................#.........#..................................#.
|
||||
.#...............................#......#............#.............................................................................#........
|
||||
....................................................................................#.............#...............#........#................
|
||||
...........................#................................................................................................................
|
||||
......................#..................................#..............#................................#.............#................#...
|
||||
...............................................................#..............#.............................................................
|
||||
..................................#........................................................#........#.......................................
|
||||
......#.................................#.......#....................#...............................................................#......
|
||||
.................#............#..............................................................................#.............................#
|
||||
............................................................................................................................................
|
||||
..#.....................#.............................................................................#.....................................
|
||||
.......................................................................................#..............................#.....................
|
||||
...............................................................................#.............#..............................................
|
||||
....................#.....................#...............................................................#.................................
|
||||
..........#........................#............#...................#.............................................#...............#.........
|
||||
............................#.............................#..........................#......................................................
|
||||
...........................................................................................#................................................
|
||||
.................................................................#.................................#.........................#........#.....
|
||||
.................#........................................................#..................................#..............................
|
||||
......................................#......................#..............................................................................
|
||||
.............#...........#...............................................................................#..........#.......................
|
||||
.................................#...........#...........................................................................#..............#...
|
||||
.......#............................................#.....#....................#..............#.....#.......................................
|
||||
...................#...........................................#................................................#...........................
|
||||
........................................................................................#...................................................
|
||||
...#....................#.....#............#.........................................................................................#......
|
||||
...............#.............................................................#..................#........#................#.................
|
||||
.........#.....................................#............................................................................................
|
||||
................................................................................................................................#...........
|
||||
.....................#.............#.........................................................................#..............................
|
||||
.....#...............................................................................................................#..............#......#
|
||||
...........#.......................................#.....#.................#.................#..............................................
|
||||
............................................................................................................................................
|
||||
.#.......................................#..........................................#................#......................................
|
||||
......................#.............#.................#.......................#...........#.............................#...................
|
||||
...............#.............#................................#......#.......................................................#..............
|
||||
............................................................................................................................................
|
||||
...#............................................................................................#....................#......................
|
||||
..........#.....................#.............................................................................#.............................
|
||||
...........................#...............................................................................................#...............#
|
||||
.....................#......................................#.......#......#........#..................#...........................#........
|
||||
.....#...............................#............#.........................................................................................
|
||||
............................................................................................................................................
|
||||
.........................................................#........................................................#.........................
|
||||
#..............................#..........#..............................................................................#................#.
|
||||
....................#..............................................#.......................#.........#......................................
|
||||
............................................................................................................................................
|
||||
...........#.......................................#.............................................................................#..........
|
||||
...#......................#...............................................#......................#..........................................
|
||||
..................#.........................................................................................................................
|
||||
...........................................................#........#...........#.....#......#........................#.................#...
|
||||
........#...................................................................................................................................
|
||||
....................................................................................................#......#................................
|
||||
................................#...........#....................#.....#...................................................#........#.......
|
||||
........................#............#......................................#.............#.................................................
|
||||
...................#............................................................................................#...........................
|
||||
#................................................................................................................................#..........
|
||||
..............#.............................................#...............................................................................
|
||||
..............................#...............................................#.................#......................................#....
|
||||
....#....................#......................................#...................#...............................#.......#...............
|
||||
........................................#..........#........................................#................#..............................
|
||||
............................................................................................................................................
|
||||
............................................................................................................................................
|
||||
........................................................................................................................................#...
|
||||
...........................................................#..................#.................#.................#.........................
|
||||
.......#........................................................#................................................................#..........
|
||||
..........................#......#......#..................................................................................#................
|
||||
...............................................#.....#.................#....................................................................
|
||||
......................................................................................................#.....................................
|
||||
................#....................#.....................................................................#........#.......................
|
||||
..............................................................................................................................#.............
|
||||
...........................................#.............................................................................................#..
|
||||
....#........................#..............................#.............#................#................................................
|
||||
......................#..........................................................................................#......#...................
|
||||
....................................................#................................#.........#............................................
|
||||
..........................#.......................................#.........................................................................
|
||||
.................#........................#.....#........................................................#..................................
|
||||
.#.........................................................#............#....................................................#..............
|
||||
..........#..................#.....#..................................................................................................#.....
|
||||
.................................................................................#..........................................................
|
||||
.....................................................#....................................#.........#...........#.....#.....................
|
||||
.............................................#.....................#.......................................#.......................#........
|
||||
................................#...........................................................................................................
|
||||
......#........................................................#..............................#.............................................
|
||||
............#......................................#.....#............................#........................................#............
|
||||
............................................................................#...............................................................
|
||||
.......................................#...............................#...................#..............................#...........#.....
|
||||
.......................#..............................#..........................#..............................#...........................
|
||||
.................................................................#...................................#......................................
|
||||
......................................................................................................................#...................#.
|
||||
.................#..........................................................................................................................
|
||||
.........#......................#.....#...........#.......................................................#.................................
|
||||
...........................................#.................#................#.....................................................#.......
|
||||
..#...............................................................#.........................................................................
|
||||
.....................#......#......#.............................................................#............#...........#.................
|
|
@ -0,0 +1,10 @@
|
|||
...#......
|
||||
.......#..
|
||||
#.........
|
||||
..........
|
||||
......#...
|
||||
.#........
|
||||
.........#
|
||||
..........
|
||||
.......#..
|
||||
#...#.....
|
|
@ -0,0 +1,84 @@
|
|||
#!/usr/bin/env tclsh
|
||||
|
||||
source ../prelude.tcl
|
||||
set input stdin
|
||||
set map [split [string trim [read $input]] "\n"]
|
||||
puts $map
|
||||
|
||||
|
||||
proc empty {row} { return [regexp {^\.+$} $row] }
|
||||
|
||||
|
||||
proc column {i} {
|
||||
global map
|
||||
set c {}
|
||||
foreach row $map {
|
||||
lappend c [string index $row $i]
|
||||
}
|
||||
return [join $c ""]
|
||||
}
|
||||
|
||||
|
||||
|
||||
proc solve {map expansion} {
|
||||
set xdist {}
|
||||
set ydist {}
|
||||
foreach row $map {
|
||||
if {[empty $row]} {
|
||||
lappend ydist $expansion
|
||||
} else {
|
||||
lappend ydist 1
|
||||
}
|
||||
}
|
||||
|
||||
set W [string length [lindex $map 0]]
|
||||
for {set i 0} {$i < $W} {incr i} {
|
||||
set col [column $i]
|
||||
if {[empty $col]} {
|
||||
lappend xdist $expansion
|
||||
} else {
|
||||
lappend xdist 1
|
||||
}
|
||||
}
|
||||
puts [join $map "\n"]
|
||||
|
||||
puts "xdist $xdist"
|
||||
puts "ydist $ydist"
|
||||
|
||||
set points {}
|
||||
for {set y 0} {$y < [llength $map]} {incr y} {
|
||||
set row [lindex $map $y]
|
||||
for {set x 0} {$x < [string length $row]} {incr x} {
|
||||
if {[string index $row $x] eq "#"} {
|
||||
lappend points $x $y
|
||||
}
|
||||
}
|
||||
}
|
||||
puts $points
|
||||
|
||||
proc dist {x y u v} {
|
||||
upvar xdist xdist
|
||||
upvar ydist ydist
|
||||
if {$v < $y} { lassign [list $y $v] v y }
|
||||
return [ladd [concat [lrange $xdist $x+1 $u] [lrange $ydist $y+1 $v] ]]
|
||||
}
|
||||
|
||||
set mins {}
|
||||
foreach {x y} $points {
|
||||
#set d 100000
|
||||
foreach {u v} $points {
|
||||
if {$u > $x || ($u == $x && $v > $y)} {
|
||||
#set d [min $d [dist $x $y $u $v]]
|
||||
lappend mins [dist $x $y $u $v]
|
||||
}
|
||||
}
|
||||
#lappend mins $d
|
||||
}
|
||||
puts $mins
|
||||
puts [ladd $mins]
|
||||
}
|
||||
|
||||
solve $map 2
|
||||
solve $map 100
|
||||
solve $map 1000
|
||||
solve $map 1000000
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,6 @@
|
|||
#.#.### 1,1,3
|
||||
.#...#....###. 1,1,3
|
||||
.#.###.#.###### 1,3,1,6
|
||||
####.#...#... 4,1,1
|
||||
#....######..#####. 1,6,5
|
||||
.###.##....# 3,2,1
|
|
@ -0,0 +1,6 @@
|
|||
???.### 1,1,3
|
||||
.??..??...?##. 1,1,3
|
||||
?#?#?#?#?#?#?#? 1,3,1,6
|
||||
????.#...#... 4,1,1
|
||||
????.######..#####. 1,6,5
|
||||
?###???????? 3,2,1
|
|
@ -0,0 +1,42 @@
|
|||
#!/usr/bin/env tclsh
|
||||
source ../prelude.tcl
|
||||
set input stdin
|
||||
|
||||
proc expand {row {start 0}} {
|
||||
set i [string first {?} $row $start]
|
||||
if {$i < 0} {
|
||||
return [list $row]
|
||||
}
|
||||
set a [string replace $row $i $i "."]
|
||||
set b [string replace $row $i $i "#"]
|
||||
incr i
|
||||
return [concat [expand $a $i] [expand $b $i]]
|
||||
}
|
||||
|
||||
proc match {row nums} {
|
||||
#puts -nonewline " $row -> "
|
||||
set row [string map {. " "} $row]
|
||||
#puts " $row"
|
||||
foreach group $row n $nums {
|
||||
if {[string length $group] != $n} {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
return 1
|
||||
}
|
||||
|
||||
set part1 0
|
||||
while {[gets $input line] >= 0} {
|
||||
set n 0
|
||||
lassign $line row nums
|
||||
set nums [split $nums ","]
|
||||
foreach x [expand $row] {
|
||||
#puts $x
|
||||
if {[match $x $nums]} {
|
||||
incr n
|
||||
}
|
||||
}
|
||||
puts "$n | $row $nums"
|
||||
incr part1 $n
|
||||
}
|
||||
puts $part1
|
|
@ -0,0 +1,93 @@
|
|||
#!/usr/bin/env tclsh
|
||||
source ../prelude.tcl
|
||||
set input stdin
|
||||
|
||||
proc count-memo {row nums i left} {
|
||||
global memo
|
||||
if {$i == 0} {
|
||||
array unset memo
|
||||
}
|
||||
set key "$i,$left,[llength $nums]"
|
||||
if {[info exists memo($key)]} {
|
||||
#puts "$key exists"
|
||||
return $memo($key)
|
||||
}
|
||||
set n [count $row $nums $i $left]
|
||||
set memo($key) $n
|
||||
return $n
|
||||
}
|
||||
|
||||
proc count {row nums i left} {
|
||||
#puts [list count $row $nums $i $left]
|
||||
if {$i >= [string length $row]} {
|
||||
return [expr {($left > 1 || [llength $nums] > 0) ? 0 : 1}]
|
||||
}
|
||||
if {[llength $nums] <= 0 && $left <= 0} {
|
||||
return [expr {[string first "#" $row $i] >= 0 ? 0 : 1}]
|
||||
}
|
||||
set c [string index $row $i]
|
||||
incr i
|
||||
if {$c eq "."} {
|
||||
if {$left > 1} {
|
||||
# contradiction: expecting a "#"
|
||||
return 0
|
||||
} elseif {$left == 1} {
|
||||
# left counts the number of "#" left in the current group,
|
||||
# plus the "." at the end. if left==1 then we've seen all
|
||||
# the "#" and now we need to see a "."
|
||||
set left 0
|
||||
} else {
|
||||
# nothing
|
||||
}
|
||||
return [count-memo $row $nums $i $left]
|
||||
}
|
||||
if {$c eq "#"} {
|
||||
if {$left > 1} {
|
||||
incr left -1
|
||||
} elseif {$left == 1} {
|
||||
# contradiction: expecting a "."
|
||||
return 0
|
||||
} else {
|
||||
set nums [lassign $nums left] ;# shift nums
|
||||
}
|
||||
return [count-memo $row $nums $i $left]
|
||||
}
|
||||
if {$c eq "?"} {
|
||||
if {$left > 1} {
|
||||
# must be "#"
|
||||
incr left -1
|
||||
#set row [string replace $row $i-1 $i-1 "#"]
|
||||
return [count-memo $row $nums $i $left]
|
||||
} elseif {$left == 1} {
|
||||
# must be "."
|
||||
set left 0
|
||||
#set row [string replace $row $i-1 $i-1 "."]
|
||||
return [count-memo $row $nums $i $left]
|
||||
} else {
|
||||
# bifurcate
|
||||
# "."
|
||||
#set row [string replace $row $i-1 $i-1 "."]
|
||||
set a [count-memo $row $nums $i $left]
|
||||
set nums [lassign $nums left]
|
||||
# "#"
|
||||
#set row [string replace $row $i-1 $i-1 "#"]
|
||||
set b [count-memo $row $nums $i $left]
|
||||
return [expr {$a + $b}]
|
||||
}
|
||||
}
|
||||
error "invalid character '$c' at position $i"
|
||||
}
|
||||
|
||||
set part1 0
|
||||
set part2 0
|
||||
while {[gets $input line] >= 0} {
|
||||
lassign $line row nums
|
||||
set row "$row?$row?$row?$row?$row"
|
||||
#set row [string trim $row "."]
|
||||
set nums [split $nums ","]
|
||||
set nums [concat $nums $nums $nums $nums $nums]
|
||||
set n [count-memo $row $nums 0 0]
|
||||
puts "$n | $row $nums"
|
||||
incr part2 $n
|
||||
}
|
||||
puts $part2
|
|
@ -12,7 +12,7 @@ proc ladd {list} {
|
|||
|
||||
proc lmul {list} {
|
||||
set p 1
|
||||
foreach x $list { set p [eval {$p * $x}] }
|
||||
foreach x $list { set p [expr {$p * $x}] }
|
||||
return $p
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue