From c9808224eca1579efa3efee5dd092ea04682d87b Mon Sep 17 00:00:00 2001 From: JonOfUs Date: Tue, 20 Dec 2022 17:35:25 +0100 Subject: [PATCH] Day 20 --- res/20/input.txt | 5000 +++++++++++++++++++++++++++++++++++++++++ res/20/test-input.txt | 7 + src/days/d17.rs | 131 +- src/days/d18.rs | 107 +- src/days/d19.rs | 18 +- src/days/d20.rs | 102 + src/main.rs | 2 +- 7 files changed, 5254 insertions(+), 113 deletions(-) create mode 100644 res/20/input.txt create mode 100644 res/20/test-input.txt create mode 100644 src/days/d20.rs diff --git a/res/20/input.txt b/res/20/input.txt new file mode 100644 index 0000000..1bdc858 --- /dev/null +++ b/res/20/input.txt @@ -0,0 +1,5000 @@ +8185 +4357 +-6137 +8196 +3432 +-8755 +-1532 +4068 +-7123 +-9669 +3375 +-402 +4662 +4189 +6393 +6955 +9610 +9170 +2212 +8337 +1947 +7163 +-3271 +-5541 +-1926 +6316 +-3772 +919 +-8629 +-9325 +7558 +1833 +-3427 +-7281 +-7289 +7762 +2980 +5341 +-6347 +8876 +8097 +-1978 +3261 +-7868 +-9685 +9133 +-567 +-9072 +-7036 +-5239 +4042 +3415 +-2794 +8689 +3008 +-3328 +4980 +-8805 +3454 +477 +-7957 +499 +-7003 +9181 +1300 +-3292 +786 +6979 +-551 +-8047 +-1177 +5457 +1254 +-1752 +-1767 +-9238 +3290 +-2628 +-1586 +9528 +-4564 +2121 +3415 +1488 +-5160 +-107 +-4658 +312 +3788 +-6785 +3954 +9642 +9108 +1311 +-7627 +4466 +-6524 +-3863 +9836 +7151 +-419 +8220 +1382 +1289 +-5787 +3673 +1403 +1552 +-5315 +3874 +2872 +-3141 +5836 +7770 +9617 +-6404 +3260 +-2174 +-6156 +3517 +-9265 +-8913 +3472 +5269 +-6695 +-6370 +-2869 +-4611 +-6144 +8524 +-1044 +-6117 +6461 +-2255 +-320 +131 +3397 +-9203 +-5097 +-9241 +7264 +9573 +-9651 +-8678 +7052 +-4336 +-7670 +6228 +-7630 +-1054 +-4601 +-4171 +5438 +9352 +-2837 +5111 +917 +-584 +-6210 +3826 +-628 +6333 +-2705 +-1926 +4909 +6755 +6864 +4211 +-5644 +-8536 +-7448 +-5644 +2182 +-790 +1822 +-2548 +1121 +9481 +-457 +4318 +-2977 +9162 +-7691 +7001 +-8514 +36 +-1784 +-8746 +-4449 +747 +6786 +716 +9056 +-6088 +2606 +5085 +-3434 +3807 +-7208 +-9488 +5823 +3477 +9112 +-1139 +-1742 +8507 +5943 +-7087 +4545 +-2981 +9840 +-683 +-1697 +-5465 +-1364 +-3862 +-8246 +7292 +4942 +-2374 +3122 +1962 +-7600 +2650 +6102 +-4391 +-8963 +5668 +-9803 +-9046 +-2469 +2357 +5438 +-5628 +-2837 +-4992 +-6856 +-662 +6280 +-8256 +5905 +2217 +3874 +-8820 +9289 +-5631 +9527 +4023 +1029 +8037 +8206 +-2535 +-5234 +-9936 +5473 +-1387 +-553 +-9765 +2376 +-5084 +-5825 +3039 +-3388 +-8124 +-4315 +-1584 +-6739 +-8224 +3624 +8389 +7731 +4292 +-9072 +-3994 +-7976 +459 +5033 +6514 +4783 +-9842 +-5839 +6046 +-3855 +9647 +-1149 +-1827 +1366 +-5777 +5880 +931 +274 +-2707 +-2424 +-5207 +4730 +-2160 +2099 +7042 +-9557 +-1421 +-2664 +-431 +2388 +8349 +-4624 +600 +-5760 +-9716 +-7245 +-1645 +-4858 +1697 +-3942 +-4084 +-3202 +6261 +-2745 +-6067 +-58 +-2184 +-5953 +7513 +-6949 +1375 +1799 +4069 +1115 +-7837 +8009 +8626 +-2754 +-2712 +-5142 +2092 +853 +9749 +-3057 +548 +-6919 +6080 +-5006 +9078 +8433 +2524 +6881 +-8635 +-1584 +-8030 +-2377 +364 +-1866 +8876 +-1111 +-4904 +-2753 +5726 +-7372 +2175 +3654 +-2291 +-1351 +769 +-9489 +-3278 +-9409 +1319 +-670 +-6969 +-7204 +-7116 +1079 +-2902 +-6495 +-9690 +-4002 +5455 +-5069 +7198 +4338 +-879 +-1044 +1124 +-6770 +-2968 +3329 +5770 +-694 +5955 +4187 +1837 +-8839 +7539 +-6458 +515 +8069 +-2016 +-7633 +5944 +1595 +-2715 +7582 +-2081 +-2243 +1643 +2851 +3260 +8344 +8420 +9792 +-2532 +-2479 +3036 +5667 +441 +8290 +-8519 +-8844 +9315 +-6953 +-8100 +-8322 +7373 +-9773 +-9317 +-8407 +9836 +-2629 +9392 +6447 +-1178 +-6456 +-3307 +-8845 +8507 +-6043 +6979 +-1452 +7267 +1045 +9015 +2085 +3583 +6444 +6256 +-2081 +-879 +-5493 +4985 +7510 +6417 +-2642 +8206 +6424 +7550 +-6973 +5188 +50 +6451 +4014 +5226 +5007 +-4325 +5778 +9464 +-3326 +822 +3949 +8302 +-904 +-988 +-1645 +2395 +1301 +2244 +8402 +1728 +2210 +-69 +7799 +-5811 +8157 +-7521 +1106 +231 +4863 +-427 +6733 +-3555 +-8713 +9080 +8290 +-6283 +-1036 +8014 +-7939 +8301 +4568 +-31 +2872 +-4767 +7804 +1409 +-9671 +-5155 +-3645 +4302 +-8641 +8801 +3898 +-4553 +-6159 +920 +-1408 +-3332 +-8032 +-3653 +-3480 +-3768 +3342 +3456 +-7317 +7861 +3359 +-3099 +3369 +5341 +5420 +-7594 +5197 +9304 +852 +-9504 +9939 +-6355 +-2916 +-2762 +-1940 +5511 +3316 +-9988 +-1565 +-6953 +-5642 +-5989 +4313 +-1075 +1601 +6684 +-4840 +3418 +-9651 +3666 +4168 +4502 +-7639 +-9851 +-5103 +1759 +-4166 +480 +6355 +9051 +-4621 +8530 +7468 +9256 +6369 +-1281 +6841 +1708 +-2589 +-360 +6916 +-9078 +5055 +-6277 +1452 +1221 +-6696 +-4868 +-3518 +2517 +-3292 +-518 +-65 +2840 +-5167 +3898 +-3946 +8247 +-6800 +-6288 +-6739 +-1806 +-814 +-6548 +2999 +752 +-2009 +-9465 +-7449 +-6299 +2730 +-6233 +-7517 +-8995 +7919 +2359 +2677 +9792 +3391 +4246 +4804 +9617 +9080 +7235 +-7048 +5966 +539 +3477 +-9601 +-9348 +8019 +-7239 +7938 +6424 +4238 +-2523 +2986 +2978 +-1882 +1033 +-87 +3369 +1248 +-6617 +441 +8421 +-6602 +6134 +-2705 +3281 +-4235 +9404 +-3273 +-8106 +-7818 +-8445 +8389 +-2810 +-544 +-5192 +-1032 +730 +1683 +-6124 +5975 +3469 +1297 +9095 +-3374 +-6220 +-595 +1090 +-890 +1482 +-4578 +8473 +3668 +7048 +3778 +-3328 +5949 +-6700 +-7078 +-7100 +9302 +2231 +-8558 +-8629 +8520 +7774 +2065 +1367 +6033 +-6191 +-3186 +965 +3561 +72 +2004 +-6382 +1606 +-429 +5940 +-8315 +7562 +-1359 +5885 +-8847 +-5857 +-9429 +-2194 +-5006 +-6301 +3655 +-7521 +8903 +3437 +7203 +-2724 +2659 +5518 +4217 +-712 +2427 +-8087 +-8630 +5120 +-5124 +-379 +-456 +3905 +5643 +4528 +7158 +9528 +-8407 +-5781 +5551 +-8767 +8582 +7287 +5633 +-1511 +1668 +-3301 +-6587 +-1464 +-6593 +6674 +9974 +2315 +-2985 +-5520 +-4606 +-9519 +-2664 +-9630 +4876 +3874 +6461 +-7668 +8394 +6016 +-1862 +6071 +5907 +1475 +6071 +3309 +7086 +1988 +-5816 +-2985 +7804 +8511 +-3230 +-9806 +-9252 +3391 +-3946 +-5466 +416 +-9107 +-8192 +-777 +-712 +1135 +4284 +7009 +5946 +-1013 +-959 +-7674 +-8444 +-143 +-986 +6947 +-2160 +9973 +9295 +-5609 +5824 +-1452 +-700 +-8959 +-2160 +7053 +-4372 +2664 +-2539 +-6555 +8421 +-4740 +-5783 +2446 +-1827 +-6299 +8365 +-6341 +-9554 +5187 +395 +8473 +-4079 +8182 +-4601 +-1697 +-1870 +-8246 +-8691 +-7511 +-2509 +769 +-3359 +5009 +6952 +7339 +-2673 +3599 +9056 +8488 +-4866 +8193 +-3149 +-7558 +-8729 +4585 +5177 +-222 +4614 +7268 +6138 +9970 +-2701 +-8476 +3102 +-3590 +4107 +-6975 +2394 +-3344 +5880 +4712 +7734 +-1304 +-2563 +-4707 +-6308 +-5383 +6733 +-2487 +302 +6673 +-7722 +-3696 +-2460 +8239 +7371 +1521 +-6611 +-1827 +4558 +6888 +2528 +-3271 +-2721 +1763 +5438 +-419 +2786 +5431 +-9080 +-7625 +-1667 +-4193 +-3845 +-7173 +-31 +-7792 +-8779 +-3514 +9263 +3741 +7671 +-596 +2900 +8666 +8432 +-4166 +8014 +7510 +-8079 +690 +-2322 +-9715 +2008 +-2980 +6336 +-2631 +5 +9370 +-3409 +509 +3042 +5515 +653 +-3737 +-7535 +-4998 +596 +6705 +1932 +-3086 +5319 +4413 +8475 +-4013 +-6862 +6846 +7620 +-62 +-6389 +1866 +9755 +1656 +278 +-8082 +-1359 +-276 +2800 +-4482 +9099 +-6860 +-3269 +2794 +-6938 +-3669 +-1491 +-4421 +-5303 +5848 +8394 +856 +7539 +4311 +8563 +2174 +6674 +-5829 +-2971 +6329 +4991 +-896 +-4526 +1173 +-2916 +-4114 +6967 +5703 +7448 +-7043 +5330 +915 +2634 +-4850 +4647 +-2857 +-9407 +4637 +952 +-7056 +-7116 +4037 +-9628 +6056 +2646 +-2200 +-7818 +-8103 +6381 +-2705 +6580 +3316 +3605 +-8635 +-5786 +9507 +8279 +-6205 +1113 +-9079 +378 +-4931 +3210 +-612 +674 +-750 +4420 +-8638 +1642 +-1043 +6261 +425 +58 +-2552 +-4677 +-3505 +-7516 +-6724 +-8830 +8488 +-3855 +-3126 +7477 +-6850 +-700 +-3307 +8675 +-2431 +8608 +-2087 +1344 +30 +-4065 +-6912 +-7358 +-9690 +-9958 +5831 +8108 +8164 +-6257 +-8205 +9227 +6780 +4363 +7785 +-6656 +1534 +8040 +5955 +-3754 +-5579 +8741 +1209 +-4153 +-1534 +-1096 +7925 +-410 +-7517 +-5935 +-2875 +-2500 +4761 +847 +-3328 +2494 +-5194 +6390 +-6015 +5944 +-9026 +342 +3454 +-1160 +-5171 +4901 +7823 +-2985 +7569 +7157 +1483 +1655 +4582 +-9842 +8196 +2670 +-3946 +-673 +8501 +4067 +-36 +-3091 +-677 +9172 +9540 +-1449 +-7083 +9050 +8448 +-7479 +-1101 +2814 +8708 +8725 +-1648 +1763 +-4191 +-1170 +2851 +5979 +-6471 +-9224 +6204 +8812 +-6929 +-1505 +-4772 +-7103 +2568 +8193 +107 +3705 +-1640 +-7578 +6640 +-1031 +5763 +4843 +-4840 +4578 +2440 +-5653 +-9876 +-7585 +-679 +-9180 +-7341 +1226 +-2953 +1510 +-306 +-6936 +-4263 +-9678 +5333 +5163 +9280 +2227 +-6277 +-8811 +-6977 +2744 +1168 +5454 +-8032 +-722 +-2809 +-5872 +-4250 +5952 +-5594 +-4374 +-9749 +-379 +312 +-3507 +7762 +8153 +1407 +-7430 +4503 +4535 +-3952 +-9384 +-2473 +-1645 +2471 +368 +5406 +-845 +-495 +-8852 +-1969 +-7497 +3678 +6378 +9371 +8244 +-4444 +9421 +-9734 +2326 +1626 +1388 +-1722 +6589 +-3117 +-5919 +8594 +-5574 +196 +-5767 +-1615 +-204 +-9722 +2609 +-8794 +-8917 +-2775 +-6118 +6268 +2108 +-3056 +-9085 +-4140 +7244 +9600 +8293 +1708 +6363 +-4840 +9581 +7196 +4317 +3566 +9252 +9506 +8196 +4154 +-3942 +6726 +-9521 +7271 +-1718 +-4575 +-358 +4143 +-3916 +8689 +-9506 +-1003 +-1742 +8792 +6248 +-4491 +-5569 +-1031 +6151 +575 +-8753 +7387 +-5643 +4297 +7762 +7224 +-6110 +3515 +-6200 +1837 +-1413 +3098 +6072 +4187 +7916 +-8247 +-1108 +-3717 +6543 +9411 +-2044 +1890 +6534 +522 +2552 +-9308 +-1830 +9796 +-2928 +8879 +-518 +-2325 +1798 +-5435 +-2664 +5680 +-3480 +1426 +949 +526 +-2988 +-8082 +-9154 +8608 +-9539 +8294 +-7669 +-1048 +3122 +167 +8279 +-2840 +-2103 +1480 +-6647 +6849 +2430 +8904 +7815 +1885 +-5479 +6117 +8694 +3760 +4205 +-9721 +166 +8918 +-9840 +2957 +6618 +8818 +2408 +7323 +-8750 +-2969 +4106 +3514 +-7013 +-89 +6780 +2252 +-5458 +4430 +-5812 +9527 +-4089 +-872 +1190 +-2074 +4590 +7224 +1254 +7186 +-7257 +-9364 +-9169 +-96 +9504 +4773 +4956 +4509 +1962 +-1449 +-55 +-5458 +-8539 +-8829 +1120 +9096 +7784 +5055 +1233 +-47 +9929 +8793 +-916 +1138 +4246 +-1568 +-9042 +7760 +347 +-9071 +-6996 +-8107 +-3307 +-3386 +-6862 +-8643 +5819 +6028 +6028 +9781 +-8469 +1089 +-1127 +8954 +-5636 +58 +-7669 +-3230 +5169 +-3708 +9883 +-8151 +-5839 +7462 +1691 +6648 +9545 +-3339 +8557 +-4471 +-7007 +-1857 +2390 +2436 +-6965 +2644 +-3716 +-4203 +-5310 +7840 +3355 +6859 +-3268 +8249 +8223 +-256 +3959 +-7282 +6076 +-1061 +-6491 +-5216 +8875 +5842 +-5301 +896 +2440 +-4211 +201 +-89 +1004 +8389 +-494 +827 +-2587 +-644 +-9078 +-3494 +5815 +-5541 +-5858 +-5710 +-2732 +8007 +9250 +-598 +8663 +-992 +-1108 +869 +763 +7587 +-5894 +-3920 +-5221 +-2883 +1344 +4405 +-4483 +-3073 +8424 +-9408 +7916 +3639 +-8995 +-5947 +-9990 +8039 +8310 +9788 +-1940 +1494 +2252 +5511 +8896 +9020 +-4805 +5035 +4892 +9664 +4883 +-5890 +239 +350 +-4242 +2089 +7078 +-3505 +-585 +-9904 +-2484 +999 +3863 +9223 +-7287 +-2811 +3200 +554 +6852 +1087 +-6035 +-2532 +-1664 +5295 +640 +2136 +1606 +9411 +-2787 +2252 +-8152 +1609 +1925 +-7639 +3388 +9969 +-1278 +-6941 +356 +4467 +6136 +-9123 +-7422 +-3320 +8436 +5805 +9379 +-7866 +3841 +6974 +-2971 +8681 +8884 +6466 +3502 +-419 +7294 +2268 +-8778 +-8606 +-691 +8344 +1595 +1351 +6532 +-6346 +-5447 +-5083 +3269 +-335 +-71 +2918 +-5919 +6745 +-8863 +-7767 +5864 +-796 +1269 +-304 +421 +-7619 +-7398 +302 +4947 +-3940 +7360 +-3874 +-8861 +-4032 +-1919 +-8778 +588 +6796 +2103 +-347 +-3644 +7371 +-8162 +7847 +6497 +2511 +972 +-1422 +-6263 +-4583 +838 +2469 +7203 +733 +2249 +-5531 +9187 +3742 +8827 +9568 +5811 +-4289 +1395 +1587 +-96 +2638 +5414 +9199 +-5070 +2974 +3342 +1094 +7240 +-5314 +8098 +1646 +7531 +-1367 +9155 +2152 +434 +7286 +6565 +-375 +5751 +-9855 +-3732 +-906 +225 +3587 +1651 +7395 +-6341 +640 +3614 +9017 +-2365 +-4630 +6585 +-4242 +441 +8617 +-863 +5648 +6316 +-8334 +3329 +7132 +-9058 +-4023 +5111 +9173 +1396 +8396 +-3603 +5774 +-6800 +7012 +-5512 +6673 +1763 +2707 +-9000 +1488 +6095 +6821 +2656 +-8196 +8926 +-3993 +3101 +4599 +1378 +9136 +9821 +9234 +-2630 +7639 +-5982 +-9133 +1935 +-593 +-6899 +8481 +-8865 +-8881 +1572 +4214 +9315 +-3880 +8182 +2644 +9940 +-6945 +-7116 +8193 +-6019 +3011 +3018 +1362 +2878 +-7018 +814 +-6287 +2028 +-4725 +8763 +-6856 +-2954 +-552 +9247 +7874 +8473 +5409 +-3264 +-35 +3822 +8064 +2592 +-5277 +7645 +7048 +1799 +-5374 +5475 +-6618 +-2074 +8896 +3634 +-8178 +6869 +3456 +2378 +-1490 +-3002 +-2353 +-4641 +7105 +-3126 +-7341 +8364 +-8253 +3011 +-9265 +2948 +-9685 +-597 +-9211 +7289 +2587 +-10000 +67 +-553 +-104 +-6748 +2072 +9644 +-1741 +-4265 +9573 +-3906 +4991 +4761 +-6694 +-2243 +9433 +-412 +2142 +4886 +-2666 +8012 +9778 +2986 +570 +1601 +9037 +-2810 +8398 +2427 +-7521 +6252 +9666 +-8526 +-7709 +8328 +-8262 +4479 +-4202 +-2098 +-1373 +-1524 +-8334 +9795 +-7603 +5596 +8319 +-7198 +-7408 +8759 +-5848 +-8649 +6791 +-1160 +6223 +7642 +-3945 +-712 +-9997 +3234 +-6809 +-3670 +1248 +-3376 +-3252 +-4589 +-745 +-7508 +3724 +-4298 +400 +-7429 +-9560 +7815 +-6023 +-3874 +6432 +-8418 +9790 +4467 +-6578 +2159 +-596 +5224 +-7943 +3184 +-9093 +1821 +2660 +-8053 +3283 +-2509 +8324 +-6938 +-9738 +2337 +-55 +-5583 +-6639 +7515 +-1996 +-3678 +-6999 +5277 +-5081 +-8893 +-8881 +9263 +4857 +5448 +7339 +-930 +802 +8396 +-741 +4876 +6432 +-2525 +833 +-7329 +-3214 +-910 +-5087 +-9501 +9967 +-2959 +-6285 +-4243 +-5905 +4394 +8148 +-2766 +-1108 +4614 +2552 +-2243 +-5380 +5514 +1029 +475 +5731 +288 +6800 +8143 +-3141 +-4153 +-6768 +-6536 +8750 +6375 +391 +7610 +973 +-3009 +-8699 +-8900 +-9690 +-4311 +-2760 +-1421 +-6422 +3377 +292 +8692 +-4646 +4948 +-5816 +1436 +3826 +-3816 +4379 +128 +9323 +8757 +4344 +-4638 +-405 +6796 +-4099 +-8584 +-8262 +-8652 +2160 +9673 +3142 +-624 +2390 +6990 +-6732 +-7348 +-4498 +-3146 +6723 +-6280 +8570 +-8822 +7219 +-9250 +2375 +-3328 +-2374 +7690 +5673 +2178 +-2349 +-8139 +-8622 +-1408 +-8246 +7060 +-4739 +-9865 +-4260 +-5095 +2176 +3220 +-7632 +4980 +-6609 +-537 +-455 +8969 +2310 +-9196 +4418 +5879 +-2827 +5133 +-3466 +8065 +1513 +923 +-4866 +-6355 +-8852 +-6521 +7920 +2638 +617 +-6577 +-5684 +-6623 +7124 +-8755 +1128 +-7738 +-7998 +-3245 +815 +1137 +2346 +5086 +-7669 +-2128 +1659 +-7494 +8497 +6218 +7068 +-2575 +7371 +4021 +751 +-2811 +-6251 +6633 +-173 +8694 +402 +-6480 +8543 +-9239 +3454 +3566 +-4086 +-5644 +4767 +-3182 +9734 +1595 +-4743 +6906 +2852 +-9865 +-8881 +2111 +-6043 +5140 +-658 +9611 +-5751 +-5934 +-5628 +-5615 +6897 +5551 +8773 +-7281 +1860 +5224 +1363 +531 +-3945 +6413 +451 +189 +-3141 +7869 +-777 +7557 +7271 +1988 +-1370 +-2276 +-6078 +8143 +-7169 +-3521 +-4453 +2140 +3831 +-5890 +-7323 +-9074 +8557 +6572 +7535 +-3992 +5793 +8358 +1697 +8468 +7955 +2167 +-385 +-4698 +1152 +5880 +-2359 +-2460 +-4622 +-643 +-1510 +-3483 +-3675 +-3309 +-5451 +-694 +-2862 +5699 +-5159 +2650 +-4935 +6673 +1010 +-9651 +-6919 +-4058 +-1926 +9923 +-1565 +-7794 +3862 +4467 +-1736 +6860 +4338 +-7719 +-1357 +2732 +254 +3639 +-5041 +-6560 +8944 +-7995 +-8847 +429 +4503 +-47 +3853 +8194 +-1571 +-5251 +-9552 +2376 +-2705 +1500 +8920 +-4555 +8110 +8945 +5082 +5495 +2396 +7393 +2683 +9315 +-9875 +2752 +6722 +-5777 +-3022 +2110 +4323 +4897 +949 +-2663 +-3862 +5796 +110 +-6341 +-2348 +-4622 +9762 +-66 +4286 +8482 +-6938 +2004 +-2480 +-3502 +-8793 +4467 +4175 +-770 +7552 +8398 +-5584 +-6850 +-2132 +2539 +-89 +-9557 +324 +6246 +2670 +6705 +1688 +-9878 +-4298 +3706 +2513 +5737 +6561 +4985 +-4336 +8649 +-890 +225 +3875 +-9137 +7785 +7444 +-1804 +3750 +379 +702 +4762 +-6329 +-9250 +-7353 +2999 +9837 +3560 +2089 +-7512 +5505 +7345 +-8139 +7222 +-5989 +-4226 +2540 +8486 +6960 +-8392 +1988 +8193 +2993 +-5627 +-5036 +-997 +-9767 +5328 +-9759 +1769 +-1416 +6268 +-4577 +3910 +2508 +-2664 +-2243 +131 +1971 +-5523 +-9015 +-2725 +4393 +7968 +8389 +-5069 +7420 +9098 +7917 +-4758 +-6283 +9314 +8996 +7862 +3280 +-8779 +1513 +7492 +6856 +9692 +-3009 +-7049 +-3386 +-5631 +6798 +6147 +-9424 +7295 +-5924 +-5775 +4133 +7919 +-5469 +9187 +6924 +-3165 +-6650 +5842 +-7846 +-6370 +3280 +-2645 +7625 +-4505 +4435 +7137 +-7783 +3409 +-187 +8548 +6361 +7932 +5215 +-7162 +2179 +-2910 +8207 +5480 +-5521 +-4801 +7901 +-937 +9734 +8764 +7982 +-9631 +-2623 +-6821 +6941 +7550 +8944 +-4906 +1575 +8763 +8553 +-6924 +1432 +-2977 +1588 +-1061 +3744 +-8842 +1530 +511 +-3730 +9251 +-9966 +5078 +-4908 +-8053 +-4425 +9736 +-4180 +-6389 +-8975 +-2178 +-6529 +-4527 +7086 +6419 +-1364 +7186 +-1061 +2901 +5667 +-1756 +9416 +-9385 +6432 +1045 +3342 +-764 +-7048 +3208 +-2464 +-262 +4267 +7753 +-9561 +509 +-5348 +8585 +-7367 +7307 +885 +-3996 +2036 +9200 +8016 +-7921 +-9854 +4762 +8251 +493 +5096 +7558 +-2990 +8293 +-2913 +9678 +-2171 +1367 +-5628 +-1664 +2539 +-544 +-3291 +-6382 +9644 +-9561 +-2787 +-2141 +9 +-5411 +-5492 +7158 +2706 +1652 +2122 +8510 +5929 +-2847 +2390 +8251 +-9025 +4784 +-5084 +7666 +1701 +7468 +8354 +-267 +3760 +9428 +-3149 +-3543 +7728 +9363 +-7108 +-8192 +-6656 +-9549 +-1781 +-9895 +3611 +-411 +-1516 +1293 +-5631 +3672 +1346 +7346 +-3973 +1083 +156 +-8525 +-1340 +-5979 +1606 +8310 +1822 +1063 +-9847 +7785 +36 +7672 +-4788 +7323 +-28 +-1557 +2308 +4901 +-1947 +-5284 +8046 +-1409 +-8568 +-8554 +1221 +-3493 +2784 +7438 +-5579 +-3785 +-2377 +-3734 +8348 +4979 +3469 +-7620 +-4772 +6385 +-6788 +-959 +1808 +-8399 +4471 +6103 +-7855 +-9990 +-5781 +6678 +1488 +8448 +2345 +2565 +-7372 +1521 +-4779 +-9064 +2770 +-4900 +-9081 +7916 +-4492 +6633 +-3085 +-1557 +6654 +7659 +-9465 +4973 +-6949 +515 +-5695 +-5779 +-4939 +-1721 +-3335 +-3034 +-3735 +6691 +9371 +6419 +4409 +-6577 +-5287 +6345 +7397 +-1483 +7796 +-2705 +5191 +7987 +-2419 +2915 +-2446 +-9372 +-3530 +9417 +-4496 +-9045 +-3380 +-3945 +8929 +-6786 +7095 +-4289 +4582 +7471 +-2444 +-8322 +-6903 +-662 +-3658 +-399 +8948 +5346 +-9936 +-9297 +7497 +6158 +-2156 +2366 +4297 +7735 +7286 +3874 +295 +-6055 +-3229 +-3143 +-827 +-2965 +467 +2838 +7032 +7244 +4677 +-3466 +4463 +-7332 +-2161 +6742 +-467 +3154 +8633 +9611 +7931 +9964 +-9689 +9581 +-2174 +7689 +-7281 +-5419 +-8518 +3014 +-8316 +1498 +7796 +-30 +-5965 +1401 +2146 +-9256 +-3728 +5916 +9212 +-3035 +6825 +-6934 +7458 +5917 +-56 +425 +9521 +2205 +4884 +-300 +5009 +-4164 +6579 +-6004 +-796 +5551 +-405 +3485 +8242 +5149 +-9078 +8449 +-8257 +-6937 +-7030 +1516 +7209 +137 +7339 +2308 +-5505 +5973 +-563 +-1127 +6901 +-8053 +8264 +7454 +-8519 +-3946 +6749 +5555 +1393 +-9558 +8014 +-6655 +7449 +5684 +-6524 +3102 +2092 +391 +-9062 +-3862 +3514 +3263 +-2545 +-5070 +1799 +-7150 +-670 +-9799 +3841 +-3732 +8905 +1128 +2667 +-9538 +8418 +-2419 +9374 +1367 +1426 +5370 +653 +-3388 +-3054 +4354 +822 +-5197 +-4592 +4966 +5158 +-1640 +3059 +-3537 +9664 +6158 +9792 +-9093 +2248 +402 +9797 +2446 +8742 +859 +-6302 +-1865 +8801 +-4589 +-193 +3504 +-4100 +-2806 +4221 +465 +-867 +-2024 +590 +-149 +-2097 +8928 +-2666 +4236 +-5155 +-1791 +-861 +5187 +8989 +-7372 +-1177 +-6049 +3122 +-8611 +1409 +-7706 +-6953 +7387 +3435 +-9851 +3126 +8400 +1393 +725 +-7049 +4509 +-8534 +-6696 +-6812 +5874 +-3748 +5730 +4994 +-1092 +762 +-8679 +9582 +-4801 +1626 +4578 +2918 +-1175 +2703 +-3319 +9095 +-5349 +-8451 +6591 +-8192 +-4589 +7077 +-3699 +-6551 +-7532 +-8230 +4221 +-7812 +-2752 +5565 +8026 +7484 +2660 +7762 +8663 +9784 +2176 +8511 +-9275 +5103 +-5644 +-636 +-9064 +-7141 +5712 +-8558 +1763 +-7198 +-856 +8763 +-3969 +1113 +8230 +1998 +6470 +7202 +-4533 +-2957 +9070 +1128 +-8291 +-1644 +-8507 +-3069 +-4645 +2296 +-3365 +-4601 +-6496 +4421 +8645 +2747 +5871 +8619 +4805 +9371 +-1852 +-5226 +2404 +-5905 +-51 +6675 +-8110 +9726 +4001 +7123 +-9554 +-4816 +2800 +-1878 +5666 +866 +-5518 +1462 +7420 +2997 +6952 +-6800 +-7517 +-2770 +2640 +-8536 +-2667 +-8784 +9519 +-6574 +-1667 +-8082 +9678 +-171 +-9027 +5434 +6881 +9133 +-3005 +9429 +2248 +-7021 +9788 +-5190 +4791 +-2847 +-9109 +5886 +8945 +-6260 +6103 +1172 +-5129 +7922 +3747 +-4182 +6818 +5700 +1904 +7762 +-2939 +9726 +-9296 +-7348 +-9666 +-3179 +4679 +-8641 +8170 +-2097 +341 +5724 +-2353 +-136 +-9816 +2608 +9003 +8530 +-6022 +-2264 +-3120 +-475 +-9972 +-3468 +-7475 +7938 +843 +6949 +1029 +-6382 +2241 +-1267 +-8779 +5518 +-1929 +9583 +5208 +3105 +5785 +-102 +2791 +451 +-9085 +36 +6103 +-6805 +-4320 +6027 +5327 +3869 +605 +7105 +1401 +2660 +9015 +4147 +-5033 +-7149 +-2830 +5164 +4985 +-5508 +-7345 +-4308 +4001 +4012 +7758 +6121 +-8598 +1297 +145 +-790 +8940 +-3179 +8515 +3934 +-2873 +9469 +323 +-3316 +-716 +-4592 +-7302 +1053 +295 +400 +-7589 +391 +-5947 +-7627 +-2001 +-6752 +1576 +-553 +-8344 +519 +9614 +-3755 +2296 +6375 +-7851 +-670 +-7149 +9675 +6718 +-9583 +725 +-5339 +-9716 +5941 +2916 +762 +-2705 +7360 +4421 +-3069 +6378 +-4089 +-1827 +-3636 +8699 +-56 +-2365 +-2469 +1027 +7324 +-3949 +9444 +8477 +658 +-9244 +7667 +6742 +9836 +-3288 +7484 +-9632 +-1351 +4947 +8783 +-1821 +8332 +2299 +3200 +-3505 +3445 +-5668 +3323 +6561 +-4501 +-3380 +-9667 +8041 +-5644 +3689 +-6530 +-9951 +-6191 +5149 +-6877 +9107 +6796 +-2163 +-7306 +-9196 +-1760 +-6323 +-742 +1574 +-7946 +-4444 +-252 +-4508 +-3892 +7587 +6720 +3087 +-5204 +-6220 +-8970 +-7818 +-8298 +-5594 +-7139 +2671 +4012 +8635 +5093 +-3285 +9263 +-1568 +-4157 +6934 +143 +2140 +-8139 +2047 +-9501 +7277 +1172 +3951 +-8267 +-3096 +8014 +-5084 +-7036 +-2040 +-1664 +-6911 +-3946 +1697 +1047 +-1823 +3608 +8165 +2318 +5017 +-6067 +1006 +7244 +7338 +-5930 +9416 +-7512 +-6577 +732 +-6555 +-2535 +326 +7569 +666 +5551 +8945 +1004 +3925 +454 +6338 +5714 +3724 +-8019 +9969 +40 +4861 +-5132 +-6907 +5554 +-2613 +-2994 +-8630 +5528 +-8119 +8858 +8196 +-678 +2517 +-6255 +1301 +-4328 +7545 +-2911 +4164 +-6095 +-2293 +-2645 +9859 +-4525 +-876 +3608 +-1593 +5080 +-7180 +-4559 +6052 +85 +7015 +-2982 +-175 +8547 +8238 +-7386 +-7243 +7611 +1758 +8984 +9613 +7360 +8153 +-679 +4463 +2429 +1252 +4306 +-9573 +7896 +-952 +-6253 +4854 +6762 +-6118 +-7651 +-4840 +-7488 +1634 +-2412 +-9397 +-2547 +8757 +-8608 +9678 +8047 +6669 +-9574 +-9995 +-4935 +1980 +-4592 +5864 +1233 +1300 +3972 +-7478 +-1037 +-2325 +-7812 +-8975 +-7277 +-9029 +-7616 +1701 +6148 +-2160 +2661 +-824 +6704 +-9402 +207 +-9601 +4980 +-3717 +-3572 +6625 +-5816 +25 +3913 +-9698 +3666 +-4182 +-2790 +-3657 +-8598 +8692 +8812 +441 +4072 +7954 +3784 +-6157 +4221 +-2972 +3692 +-6357 +-4504 +-7955 +-1890 +-3638 +8626 +4919 +-6022 +7187 +5295 +1925 +1976 +-2629 +-4211 +-2894 +7287 +-2658 +-3945 +-1846 +5371 +-3206 +6683 +220 +-5812 +-6639 +-6399 +8101 +2659 +-7286 +-4273 +1085 +8061 +3911 +-8230 +3940 +-1356 +-5092 +0 +-6781 +1500 +-6498 +3736 +7785 +2929 +9929 +6476 +-8649 +-3055 +-9052 +-9239 +6478 +-369 +-2060 +-1192 +1872 +-7589 +-9299 +-6210 +-5021 +-6963 +-6041 +4716 +5276 +9929 +2018 +-3315 +9158 +542 +9678 +-2097 +4288 +8488 +-7911 +-8598 +-9443 +-2056 +-5192 +4067 +9227 +3154 +-9498 +2667 +-8312 +-3315 +2134 +1557 +3561 +-4139 +894 +-3945 +-7381 +-9755 +-6390 +4940 +447 +-4485 +-6302 +-7655 +6253 +-5081 +-9579 +2758 +-952 +8014 +-2211 +-7998 +4575 +3649 +-878 +802 +695 +4213 +-2001 +-2408 +-6277 +7269 +-4058 +9489 +-8029 +3260 +7296 +-7668 +7259 +5390 +3705 +-5097 +730 +1165 +-7616 +-1750 +-3942 +-3264 +-4094 +5104 +-5084 +-3532 +-6950 +-6746 +-8670 +400 +-359 +5419 +5757 +2288 +1570 +-750 +6080 +-9303 +-3398 +-5533 +-988 +4832 +-9275 +-5323 +6968 +-6978 +-8284 +-5611 +-3632 +185 +-8077 +-1702 +-5953 +-4719 +-4739 +-6228 +-7501 +5373 +6078 +-3890 +1550 +6476 +7158 +-5246 +-1781 +2672 +-3945 +5619 +-480 +-2563 +-9165 +1087 +7158 +-5574 +3916 +8585 +8230 +-1279 +-8451 +7220 +-2051 +-6649 +1300 +7280 +775 +-3619 +-4656 +5833 +163 +-1408 +1703 +4022 +-2723 +-5014 +-1704 +-153 +-419 +-5063 +6058 +6888 +8143 +6633 +-1525 +8019 +-1330 +-7420 +5480 +-9259 +5782 +-4089 +-6978 +-6007 +6316 +-7337 +-9936 +3405 +-95 +3614 +-2698 +-5105 +-651 +-7660 +-5380 +6600 +2796 +4626 +-9264 +3284 +5848 +7694 +4379 +-2364 +1875 +-6316 +-4242 +-7083 +-6257 +-6577 +5836 +-3386 +-3558 +5782 +4503 +4782 +3660 +4773 +-1044 +850 +6904 +2659 +-865 +1326 +-5155 +-6695 +-1340 +7266 +-3252 +-7277 +-2751 +353 +-2484 +6955 +-6623 +3871 +2082 +-5364 +-4905 +-3256 +1960 +-8995 +-9513 +4043 +-5594 +-3993 +3769 +-8284 +-6355 +5276 +7123 +6073 +9210 +9965 +4664 +1610 +3373 +-9074 +4407 +-5992 +-7149 +1884 +-5953 +6485 +5870 +2146 +9022 +-996 +1697 +-6898 +-6862 +-7171 +1904 +8019 +3161 +7595 +-1065 +-7252 +-5978 +-5295 +3534 +-7437 +-8936 +105 +9699 +2469 +-5924 +-3035 +-1629 +1567 +-7272 +7878 +-6031 +9981 +7046 +8917 +-5154 +3102 +1431 +3924 +-548 +-6015 +846 +-2655 +564 +8157 +-4037 +8681 +-3817 +9756 +8488 +9047 +7339 +-3607 +539 +-3600 +-4492 +8403 +-7070 +5195 +-7783 +6418 +1087 +3050 +-7133 +-4003 +-2809 +3895 +2920 +-3734 +1687 +2988 +1063 +-837 +-4672 +-9538 +-2261 +3061 +4471 +-9280 +-951 +-6103 +7919 +-7475 +-4569 +-2531 +8626 +-6439 +937 +7856 +3469 +-6332 +8642 +-1061 +-3024 +2667 +4212 +-7879 +4245 +1063 +6749 +-6946 +2762 +2680 +-2146 +1034 +-1926 +5497 +-1666 +-4630 +4818 +-9064 +-7353 +9331 +6246 +6531 +-6323 +7760 +5591 +-8837 +8902 +1675 +-348 +9459 +-6680 +937 +-2149 +-1409 +-1645 +2367 +2738 +-7103 +-5084 +1911 +-8476 +2915 +-4876 +4168 +1344 +1293 +-1589 +1574 +-2151 +-6413 +1374 +-3307 +6268 +2440 +-2009 +-1635 +610 +-1160 +-187 +6698 +-8304 +3697 +-8734 +-1002 +8196 +9811 +5297 +1087 +-4796 +4455 +-7506 +-2666 +7880 +2391 +-9995 +-1823 +-3320 +-4968 +-7983 +-5274 +-6131 +-5465 +2777 +5157 +-8847 +8238 +9582 +-6797 +-6530 +-7198 +40 +6049 +5393 +-9573 +-4769 +3043 +5750 +-9543 +7766 +-2150 +-8507 +8358 +6348 +-5639 +-7430 +1437 +-1395 +-28 +-6063 +-9428 +9140 +4676 +-9351 +7757 +8240 +3246 +9022 +5017 +-6450 +9655 +-2696 +-1809 +-546 +-7086 +-1315 +-5822 +-9613 +-8017 +2665 +-8952 +469 +5189 +866 +9184 +-2959 +3316 +1181 +4081 +-2564 +-9552 +-622 +6134 +8242 +-4235 +2473 +-9630 +-1965 +6692 +-5919 +972 +-6724 +-8451 +8515 +769 +-796 +-7283 +-6700 +-4020 +6070 +3877 +3601 +1520 +7640 +4747 +-8036 +3867 +-468 +-8912 +-8999 +-6301 +-9094 +4012 +8876 +-8852 +2899 +-6156 +1224 +1626 +7066 +637 +-3731 +-4866 +6330 +-7122 +-5204 +-4281 +6782 +8194 +7975 +4784 +-2275 +5227 +888 +250 +3862 +-7540 +-6301 +3832 +7155 +4323 +3260 +-3271 +2525 +-3847 +209 +9273 +2793 +481 +4282 +-1333 +-1347 +3761 +5737 +-175 +-5863 +-6466 +-8407 +-6279 +-6797 +-5859 +-2664 +345 +1035 +8557 +-6623 +3881 +4068 +-694 +317 +5413 +6112 +-4744 +3706 +-5543 +-2790 +-7043 +2446 +-5014 +-8262 +3639 +2807 +4973 +-8778 +-9489 +-578 +-4935 +3391 +4524 +-8759 +-24 +-6965 +6039 +7164 +-1866 +8089 +4017 +7319 +-8477 +-5358 +4742 +1049 +-8793 +6134 +5414 +6115 +3771 +-5831 +-9921 +4210 +-4630 +-4020 +5262 +9148 +-8245 +-7302 +-693 +4890 +421 +-929 +-5973 +-8081 +2824 +-6332 +226 +9966 +4782 +5987 +-5428 +6749 +-1177 +-9317 +1834 +-3059 +7988 +-3054 +7387 +-8476 +-5965 +3391 +-5124 +3041 +-1362 +-7014 +-6953 +-3772 +-7398 +-5170 +3416 +-8562 +-2322 +9964 +-8183 +-6781 +6588 +5737 +1014 +4783 +5807 +-1894 +4233 +8927 +891 +7217 +4710 +1893 +-2068 +9762 +536 +1177 +2525 +2175 +7987 +-9165 +-3022 +-910 +-6796 +1500 +-2029 +9719 +7040 +5371 +9306 +-3994 +-4731 +9096 +6514 +-8100 +-6162 +3040 +9635 +5858 +-2787 +4503 +526 +-9812 +-2257 +-4697 +3377 +-2766 +9015 +-9252 +-9300 +3217 +1594 +6146 +9509 +-6302 +-279 +4842 +3017 +6204 +166 +6333 +-3914 +-2346 +-7738 +7563 +-8808 +-5643 +1595 +-1875 +1898 +1699 +564 +-3694 +3329 +7795 +-2026 +9836 +-3151 +4642 +6329 +-742 +2528 +2373 +-1792 +1172 +-3126 +-9258 +649 +8704 +-3696 +7265 +-2113 +-7979 +5263 +-1666 +-7556 +1254 +1106 +-3231 +-2038 +-2341 +3469 +932 +3976 +-3945 +-6887 +-9562 +-5583 +-8637 +5150 +-8639 +-6953 +-9381 +3179 +-3214 +765 +-7681 +-9049 +-8444 +-7100 +9048 +7106 +-7670 +-64 +-692 +2358 +5088 +-2832 +-6046 +-4848 +4394 +-1885 +6888 +-9250 +-9419 +-4843 +-8867 +9332 +4811 +-9107 +-872 +8802 +-2359 +2929 +9571 +-410 +7287 +4833 +1615 +-2083 +-9810 +9495 +1480 +-2234 +1319 +-4589 +9237 +6479 +-3183 +6027 +2612 +451 +8557 +9787 +6285 +5367 +-12 +9315 +6450 +4804 +-5905 +8846 +7799 +-8811 +8476 +2513 +8617 +-2997 +-5996 +9262 +-5594 +-422 +-6422 +7431 +4467 +-4311 +-9204 +7531 +1241 +8012 +6369 +-651 +1680 +7898 +4168 +-2411 +-3933 +-1381 +-7150 +1588 +-3174 +2640 +8823 +-2706 +7554 +-419 +6475 +5359 +2608 +59 +-5579 +-5777 +-1968 +8102 +1550 +2454 +-719 +-5299 +8549 +8792 +979 +-2385 +6860 +5195 +8530 +-3819 +-8691 +1898 +5328 +-2589 +156 +-4871 +-2239 +-1099 +-3847 +9564 +2519 +-6724 +-6298 +-5895 +3246 +-4411 +558 +-2419 +-4360 +361 +9049 +9962 +430 +-2185 +-2028 +7174 +5335 +5745 +-9821 +284 +-6965 +5527 +-8906 +888 +-3307 +-9552 +-793 +4983 +-8046 +-67 +-5644 +2288 +-2171 +-7947 +4755 +6052 +5268 +-7944 +-8088 +5502 +8376 +2379 +-6548 +-679 +-8819 +8251 +-6769 +-130 +-6012 +-8611 +-3847 +7593 +9809 +-8424 +-2249 +802 +1646 +1848 +-8760 +-9036 +4530 +-9392 +-1028 +-3772 +-6466 +-1781 +-814 +5786 +-5992 +731 +175 +-1802 +-9865 +-3174 +360 +-5295 +4245 +8650 +-8521 +7471 +4477 +-5544 +-3311 +-5999 +-161 +9090 +-3005 +-9573 +-6195 +763 +1709 +-1510 +-5304 +6979 +-5932 +-3224 +-4875 +-3056 +-5866 +-9132 +5297 +3208 +-5525 +2732 +-4884 +-9803 +-8989 +-2261 +1445 +2638 +-5206 +5813 +-7169 +-9107 +-2716 +3234 +1794 +-1922 +8488 +6039 +1473 +-4187 +137 +-6739 +-2416 +8011 +-4008 +-7481 +-2954 +-667 +8263 +-3728 +-1049 +-4504 +5649 +-4721 +6195 +390 +-2847 +-938 +-6027 +-4432 +-8584 +-9895 +8773 +6424 +-9792 +-7575 +9095 +9506 +-8867 +-4777 +-9423 +9216 +9185 +7131 +3290 +-8232 +-5523 +7339 +-440 +-6785 +-7588 +2984 +-468 +6315 +8178 +-4031 +-9064 +-5954 +6722 +-3786 +-5525 +-8134 +-3786 +653 +-8361 +4068 +-4587 +8293 +4861 +-5234 +4477 +-4087 +5087 +2468 +-7099 +6852 +-7669 +4619 +8448 +3985 +-3751 +-4866 +1857 +-8536 +-3315 +-2968 +-6471 +-358 +-3266 +2020 +4826 +8969 +2272 +-8189 +-5081 +4143 +-6355 +-9955 +-8913 +6394 +1524 +8920 +-9299 +-1150 +-6921 +-7422 +9371 +2982 +-7465 +9015 +-8053 +8733 +8549 +226 +3402 +7762 +2219 +-2346 +-4242 +-6437 +-2171 +1248 +1057 +-149 +9910 +-7729 +2187 +-2847 +1375 +3237 +-6162 +5833 +-803 +6147 +-7298 +904 +4420 +3853 +7498 +3579 +-2046 +9200 +6272 +-7286 +-3296 +-963 +-2322 +-9244 +-5065 +5319 +5346 +4093 +2248 +4502 +1964 +1351 +-8897 +-5767 +-6664 +-5628 +6260 +-9079 +4642 +6992 +4311 +7862 +6640 +-8004 +862 +5462 +3339 +-7013 +2630 +5940 +-3571 +8525 +3568 +5400 +1933 +5511 +-8476 +4791 +467 +3715 +-20 +-3715 +75 +-8805 +6268 +-5081 +3490 +4942 +-7924 +1282 +-9134 +-4235 +-8926 +-5138 +3568 +5511 +8721 +1165 +-2300 +9153 +-1018 +-6925 +-6067 +-9671 +-6702 +-4831 +-8679 +400 +2491 +9537 +-1803 +6830 +-2088 +1344 +564 +-9078 +9443 +-2098 +-362 +-6330 +8662 +6864 +-9952 +2619 +-3480 +9112 +1626 +-8262 +-1639 +3634 +2612 +5294 +4543 +5961 +1574 +7151 +5341 +-4577 +-9203 +-2875 +9749 +-7717 +-8861 +-5277 +1094 +9346 +8427 +-6561 +-6242 +-1172 +8286 +-9042 +5297 +6859 +2179 +-5595 +-478 +9840 +-4428 +5327 +-7739 +-1092 +-7013 +-8322 +-3339 +667 +8251 +2758 +738 +2883 +8115 +-4020 +-8139 +4862 +-6639 +9111 +6078 +9537 +8337 +1224 +-1364 +8019 +-5641 +9423 +4593 +-651 +246 +1779 +-4156 +-6015 +-5323 +-7448 +7869 +7848 +-3279 +-6767 +6537 +-974 +-8129 +-9930 +-9997 +5400 +1630 +-6031 +1004 +-9557 +9332 +7025 +-6433 +-2725 +8511 +4579 +-4468 +156 +6673 +674 +7063 +467 +-5081 +-4495 +-6951 +1655 +1286 +-1370 +-9511 +-55 +3368 +7552 +361 +4288 +-1906 +1932 +-4214 +-9570 +7186 +-8053 +5975 +2268 +-614 +-8356 +-7926 +7647 +-6064 +-5901 +-524 +-5176 +2310 +-6423 +4302 +2789 +-1218 +-3635 +-6539 +-9821 +-7812 +2379 +-1344 +4503 +3050 +9101 +5009 +3296 +-5207 +4502 +-574 +-2239 +2108 +-59 +-3994 +4726 +9273 +4989 +-6069 +-2673 +231 +-1740 +-3146 +730 +-815 +-8282 +-7335 +-7512 +6207 +2054 +-4197 +-6399 +-567 +-9347 +-7818 +6411 +3511 +5226 +-9288 +-7521 +5714 +9086 +-2667 +6901 +675 +8464 +8418 +4098 +8566 +-8746 +-8524 +4642 +-8936 +-4739 +-1619 +4520 +-3547 +6261 +-1408 +8249 +-9558 +-9749 +-2026 +6565 +-9537 +-8690 +5961 +-187 +9162 +-2424 +-3056 +-2570 +1470 +-632 +-1003 +4791 +3444 +-1345 +9795 +5907 +-3299 +4122 +5387 +2401 +6290 +9611 +6195 +-6095 +8663 +9743 +-8593 +-9774 +4879 +753 +-2413 +-5597 +-7332 +-457 +-3657 +-2071 +-4936 +9931 +3445 +8364 +-2051 +6419 +-432 +-8404 +-853 +-4000 +341 +-7329 +9250 +-7902 +-3126 +6556 +-2832 +-6897 +-8995 +3831 +7157 +-3791 +-6485 +-3425 +-9803 +6619 +-8023 +-9276 +-2613 +-5200 +-8585 +8744 +-5627 +-7728 +-468 +-9027 +3924 +8929 +-4551 +4165 +5085 +-7632 +-2365 +9098 +-5105 +7669 +-1074 +-403 +1546 +8239 +3161 +319 +-1597 +3861 +7669 +3877 +6561 +5474 +-298 +-9582 +5593 +9510 +-8095 +7640 +7314 +-9054 +4424 +6984 +7647 +8019 +-4739 +9079 +-3802 +-8166 +-1548 +-2699 +145 +968 +3351 +-4958 +1759 +-6896 +-1494 +156 +-6205 +814 +1826 +649 +1887 +3432 +-1586 +-4940 +-370 +5336 +-3053 +-7540 +-7738 +-3141 +9964 +4019 +-6868 +-4096 +7836 +-6698 +4068 +3285 +-3559 +5619 +591 +6836 +-7775 +-5942 +4523 +4214 +6504 +-2804 +2541 +1527 +4479 +8358 +9624 +3264 +3368 +9424 +-3417 +7015 +7774 +-5135 +9521 +1346 +-1044 +-1361 +5448 +3531 +5297 +6902 +-5631 +-952 +-7804 +2659 +4413 +4829 +5480 +-3451 +2829 +1570 +1633 +1386 +-6626 +-6407 +3456 +9966 +-6769 +1507 +-3908 +6156 +-2185 +-8422 +-362 +9739 +-7659 +-3208 +-5047 +2204 +-8843 +-6683 +7796 +-3316 +-295 +-4578 +-8734 +7662 +-8891 +8799 +9350 +4965 +-1978 +-1565 +1691 +3842 +-7481 +-3564 +9510 +9654 +3877 +2048 +7578 +6373 +9089 +402 +220 +3351 +6565 +-54 +9015 +-7407 +-1362 +552 +8821 +-6301 +-6095 +-5858 +9363 +8974 +9095 +137 +-3292 +6079 +5786 +-8304 +-1557 +4751 +-6277 +-256 +-3301 +4023 +1009 +-7281 +7498 +-4191 +-1072 +-8201 +-4555 +-2126 +-331 +8486 +9140 +-6041 +2401 +-5011 +8377 +-9821 +9610 +-7085 +9910 +2296 +-6835 +-3987 +1971 +-5644 +7360 +-4953 +7394 +7914 +-3089 +-938 diff --git a/res/20/test-input.txt b/res/20/test-input.txt new file mode 100644 index 0000000..5cbf3d9 --- /dev/null +++ b/res/20/test-input.txt @@ -0,0 +1,7 @@ +1 +2 +-3 +3 +-2 +0 +4 \ No newline at end of file diff --git a/src/days/d17.rs b/src/days/d17.rs index bee55a3..a026d69 100644 --- a/src/days/d17.rs +++ b/src/days/d17.rs @@ -9,12 +9,12 @@ pub fn solve() { let contents = fs::read_to_string(path).expect("I/O error, wrong path?"); // constant definition of rocks, from bottom to top - let rocks: Vec> = vec![ - vec![(0,0),(0,1),(0,2),(0,3)], - vec![(0,1),(1,0),(1,1),(1,2),(2,1)], - vec![(0,0),(0,1),(0,2),(1,2),(2,2)], - vec![(0,0),(1,0),(2,0),(3,0)], - vec![(0,0),(0,1),(1,0),(1,1)] + let rocks: Vec> = vec![ + vec![(0, 0), (0, 1), (0, 2), (0, 3)], + vec![(0, 1), (1, 0), (1, 1), (1, 2), (2, 1)], + vec![(0, 0), (0, 1), (0, 2), (1, 2), (2, 2)], + vec![(0, 0), (1, 0), (2, 0), (3, 0)], + vec![(0, 0), (0, 1), (1, 0), (1, 1)], ]; let directions: Vec = contents @@ -28,7 +28,7 @@ pub fn solve() { .collect(); // [height][width] - let mut chamber = vec![vec![false;WIDTH];4]; + let mut chamber = vec![vec![false; WIDTH]; 4]; let mut highest_rock = -1; // floor @@ -36,34 +36,30 @@ pub fn solve() { let mut heights = Vec::::new(); - /* - 51 rocks - + 51 rocks + heights[50] - heights[15] - + (1_000_000_000_000 - 16) = 999_999_999_984 % */ - - for i in 0..2344 { // spawn new rock let r_index = i as usize % rocks.len(); // get current rock index let mut rock = Rock::new(&rocks[r_index], highest_rock); - while chamber.iter().filter(|row| !row.contains(&true)).count() < 7 { - chamber.push(vec![false;WIDTH]) + chamber.push(vec![false; WIDTH]) } loop { // move to left or right let next_dir = dir_iter.next(); let dir = match next_dir { - Some(x) => { x }, + Some(x) => x, None => { dir_iter = directions.iter(); dir_iter.next().unwrap() @@ -75,7 +71,7 @@ pub fn solve() { if rock.left().valid_pos(&chamber) { rock = rock.left() } - }, + } Dir::Right => { if rock.right().valid_pos(&chamber) { rock = rock.right() @@ -86,17 +82,18 @@ pub fn solve() { if rock.down().valid_pos(&chamber) { rock = rock.down(); } else { - rock.pos.iter().for_each(|coord| { - chamber[coord.0 as usize][coord.1 as usize] = true - }); + rock.pos + .iter() + .for_each(|coord| chamber[coord.0 as usize][coord.1 as usize] = true); highest_rock = match chamber .iter() .enumerate() .filter(|row| row.1.contains(&true)) - .last() { - Some(x) => x.0 as i64, - None => -1 - }; + .last() + { + Some(x) => x.0 as i64, + None => -1, + }; // find recurring patterns in amount of rocks and height heights.push(highest_rock); //for i in 2..heights.len() { @@ -106,27 +103,38 @@ pub fn solve() { } } } - println!("Result 1: {}", highest_rock+1); + println!("Result 1: {}", highest_rock + 1); } fn _test(n: usize, heights: &Vec) { if heights.len() % n == 0 - && heights[heights.len()/n-1]*n as i64+n as i64 == heights[heights.len()-1]+1 { - println!("{}: {}", n, heights.len()/n) + && heights[heights.len() / n - 1] * n as i64 + n as i64 == heights[heights.len() - 1] + 1 + { + println!("{}: {}", n, heights.len() / n) } } fn _print_chamber(chamber: &Vec>, curr_rock: &Rock) { - let mut str_chamber: Vec> = chamber.iter().map(|line| line.iter().map(|elem| - match *elem { - true => '#', - false => '.' - } - ).collect()).collect(); + let mut str_chamber: Vec> = chamber + .iter() + .map(|line| { + line.iter() + .map(|elem| match *elem { + true => '#', + false => '.', + }) + .collect() + }) + .collect(); - curr_rock.pos.iter().for_each(|pos| { str_chamber[pos.0 as usize][pos.1 as usize] = '@'; }); + curr_rock.pos.iter().for_each(|pos| { + str_chamber[pos.0 as usize][pos.1 as usize] = '@'; + }); - str_chamber.iter().rev().for_each(|str| println!("{}",str.iter().collect::())) + str_chamber + .iter() + .rev() + .for_each(|str| println!("{}", str.iter().collect::())) } #[derive(Clone, Debug)] @@ -137,15 +145,18 @@ enum Dir { #[derive(Clone, Debug)] struct Rock { - pos: Vec<(i64,i64)> + pos: Vec<(i64, i64)>, } impl Rock { - pub fn new(rock: &Vec<(u8,u8)>, highest_rock: i64) -> Self{ - let pos: Vec<(i64,i64)> = rock + pub fn new(rock: &Vec<(u8, u8)>, highest_rock: i64) -> Self { + let pos: Vec<(i64, i64)> = rock .iter() .map(|coord| { - (coord.0 as i64 + (highest_rock + 4) as i64, coord.1 as i64 + 2) + ( + coord.0 as i64 + (highest_rock + 4) as i64, + coord.1 as i64 + 2, + ) }) .collect(); Rock { pos } @@ -153,48 +164,60 @@ impl Rock { pub fn right(&self) -> Self { for coord in self.pos.iter() { - if coord.1 >= (WIDTH-1) as i64 { - return self.clone() + if coord.1 >= (WIDTH - 1) as i64 { + return self.clone(); } } Rock { - pos: self.pos.iter().map(|coord| { - (coord.0, coord.1 + 1) // move right, only check for wall ! - }).collect() + pos: self + .pos + .iter() + .map(|coord| { + (coord.0, coord.1 + 1) // move right, only check for wall ! + }) + .collect(), } } pub fn left(&self) -> Self { for coord in self.pos.iter() { if coord.1 <= 0 { - return self.clone() + return self.clone(); } } Rock { - pos: self.pos.iter().map(|coord| { - (coord.0, coord.1 - 1) // move left, only check for wall ! - }).collect() + pos: self + .pos + .iter() + .map(|coord| { + (coord.0, coord.1 - 1) // move left, only check for wall ! + }) + .collect(), } } pub fn down(&self) -> Self { Rock { - pos: self.pos.iter().map(|coord| { - (coord.0 - 1, coord.1) // move down - }).collect() + pos: self + .pos + .iter() + .map(|coord| { + (coord.0 - 1, coord.1) // move down + }) + .collect(), } } pub fn valid_pos(&self, chamber: &Vec>) -> bool { for coord in &self.pos { if coord.0 < 0 || coord.1 < 0 { - return false + return false; } if chamber[coord.0 as usize][coord.1 as usize] { - return false + return false; } } true } -} \ No newline at end of file +} diff --git a/src/days/d18.rs b/src/days/d18.rs index c3260d0..58c8cf4 100644 --- a/src/days/d18.rs +++ b/src/days/d18.rs @@ -1,11 +1,14 @@ -use std::{fs, collections::{HashMap, HashSet, VecDeque}}; +use std::{ + collections::{HashMap, HashSet, VecDeque}, + fs, +}; pub fn solve() { let path = "res/18/input.txt"; let contents = fs::read_to_string(path).expect("I/O error, wrong path?"); - let coords: Vec<(usize,usize,usize)> = contents + let coords: Vec<(usize, usize, usize)> = contents .lines() .filter(|line| *line != "") .map(|line| { @@ -13,25 +16,21 @@ pub fn solve() { ( vals[0].parse::().unwrap(), vals[1].parse::().unwrap(), - vals[2].parse::().unwrap() + vals[2].parse::().unwrap(), ) }) .collect(); - + let max: usize = coords .iter() - .map(|coord| - coord.0.max( - coord.1.max(coord.2) - ) - ) + .map(|coord| coord.0.max(coord.1.max(coord.2))) .max() .unwrap(); - + let world_size = max as usize + 2; - + // [x][y][z] - let mut world = vec![vec![vec![false;world_size];world_size];world_size]; + let mut world = vec![vec![vec![false; world_size]; world_size]; world_size]; for coord in coords.iter() { world[coord.0 as usize][coord.1 as usize][coord.2 as usize] = true @@ -40,46 +39,52 @@ pub fn solve() { // task 1 - count surfaces let mut surfaces: u32 = 0; - let mut surface_blocks = HashMap::<(usize,usize,usize), usize>::new(); + let mut surface_blocks = HashMap::<(usize, usize, usize), usize>::new(); - for (x1,y1,z1) in coords.iter() { - let (x,y,z) = (*x1 as usize, *y1 as usize, *z1 as usize); + for (x1, y1, z1) in coords.iter() { + let (x, y, z) = (*x1 as usize, *y1 as usize, *z1 as usize); // x-1 - if x == 0 || !world[x-1][y][z] { + if x == 0 || !world[x - 1][y][z] { surfaces += 1; - if x != 0 { insert_or_increase((x-1,y,z), &mut surface_blocks) } + if x != 0 { + insert_or_increase((x - 1, y, z), &mut surface_blocks) + } } // x+1 - if !world[x+1][y][z] { + if !world[x + 1][y][z] { surfaces += 1; - insert_or_increase((x+1,y,z), &mut surface_blocks) + insert_or_increase((x + 1, y, z), &mut surface_blocks) } // y-1 - if y == 0 || !world[x][y-1][z] { + if y == 0 || !world[x][y - 1][z] { surfaces += 1; - if y != 0 { insert_or_increase((x,y-1,z), &mut surface_blocks) } + if y != 0 { + insert_or_increase((x, y - 1, z), &mut surface_blocks) + } } // y+1 - if !world[x][y+1][z] { + if !world[x][y + 1][z] { surfaces += 1; - insert_or_increase((x,y+1,z), &mut surface_blocks) + insert_or_increase((x, y + 1, z), &mut surface_blocks) } // z-1 - if z == 0 || !world[x][y][z-1] { + if z == 0 || !world[x][y][z - 1] { surfaces += 1; - if z != 0 { insert_or_increase((x,y,z-1), &mut surface_blocks) } + if z != 0 { + insert_or_increase((x, y, z - 1), &mut surface_blocks) + } } // z+1 - if !world[x][y][z+1] { + if !world[x][y][z + 1] { surfaces += 1; - insert_or_increase((x,y,z+1), &mut surface_blocks) + insert_or_increase((x, y, z + 1), &mut surface_blocks) } } println!("Result 1: {surfaces}"); // task 2 - find air bubbles by checking reachability between each surface block and a reference block outside with bfs - let reference_block: (usize, usize, usize) = (world_size-1, world_size-1, world_size-1); + let reference_block: (usize, usize, usize) = (world_size - 1, world_size - 1, world_size - 1); for (block, block_surfaces) in surface_blocks.iter() { if !bfs_reachable(*block, reference_block, &world) { surfaces -= *block_surfaces as u32 @@ -87,10 +92,9 @@ pub fn solve() { } println!("Result 2: {surfaces}"); - } -fn insert_or_increase(p: (usize,usize,usize), map: &mut HashMap::<(usize,usize,usize), usize>) { +fn insert_or_increase(p: (usize, usize, usize), map: &mut HashMap<(usize, usize, usize), usize>) { if map.contains_key(&p) { *map.get_mut(&p).unwrap() += 1; } else { @@ -98,7 +102,11 @@ fn insert_or_increase(p: (usize,usize,usize), map: &mut HashMap::<(usize,usize,u } } -fn bfs_reachable(s: (usize, usize, usize), e: (usize, usize, usize), world: &Vec>>) -> bool { +fn bfs_reachable( + s: (usize, usize, usize), + e: (usize, usize, usize), + world: &Vec>>, +) -> bool { let mut queue = VecDeque::<(usize, usize, usize)>::new(); let mut seen_nodes = HashSet::<(usize, usize, usize)>::new(); @@ -121,33 +129,36 @@ fn bfs_reachable(s: (usize, usize, usize), e: (usize, usize, usize), world: &Vec false } -fn get_adjacents(p: (usize, usize, usize), world: &Vec>>) -> Vec<(usize,usize,usize)> { - let mut adj = Vec::<(usize,usize,usize)>::new(); - let (x,y,z) = p; - - if x > 0 && !world[x-1][y][z] { - adj.push((x-1,y,z)) +fn get_adjacents( + p: (usize, usize, usize), + world: &Vec>>, +) -> Vec<(usize, usize, usize)> { + let mut adj = Vec::<(usize, usize, usize)>::new(); + let (x, y, z) = p; + + if x > 0 && !world[x - 1][y][z] { + adj.push((x - 1, y, z)) } // x+1 - if x < world.len()-1 && !world[x+1][y][z] { - adj.push((x+1,y,z)) + if x < world.len() - 1 && !world[x + 1][y][z] { + adj.push((x + 1, y, z)) } // y-1 - if y > 0 && !world[x][y-1][z] { - adj.push((x,y-1,z)) + if y > 0 && !world[x][y - 1][z] { + adj.push((x, y - 1, z)) } // y+1 - if y < world.len()-1 && !world[x][y+1][z] { - adj.push((x,y+1,z)) + if y < world.len() - 1 && !world[x][y + 1][z] { + adj.push((x, y + 1, z)) } // z-1 - if z > 0 && !world[x][y][z-1] { - adj.push((x,y,z-1)) + if z > 0 && !world[x][y][z - 1] { + adj.push((x, y, z - 1)) } // z+1 - if z < world.len()-1 && !world[x][y][z+1] { - adj.push((x,y,z+1)) + if z < world.len() - 1 && !world[x][y][z + 1] { + adj.push((x, y, z + 1)) } adj -} \ No newline at end of file +} diff --git a/src/days/d19.rs b/src/days/d19.rs index 378a179..172004d 100644 --- a/src/days/d19.rs +++ b/src/days/d19.rs @@ -1,16 +1,17 @@ -use std::{fs, collections::{HashMap, HashSet, VecDeque}}; +use std::fs; use scan_fmt::scan_fmt; - +#[allow(dead_code)] const MINUTES: u32 = 24; +#[allow(dead_code)] pub fn solve() { let path = "res/19/input.txt"; let contents = fs::read_to_string(path).expect("I/O error, wrong path?"); // parse blueprints - let blueprints: Vec = contents + let _blueprints: Vec = contents .lines() .filter(|line| *line != "") .map(|line| { @@ -30,26 +31,23 @@ pub fn solve() { }) .collect(); - - - } +#[allow(dead_code)] #[derive(Debug)] struct Blueprint { id: u32, ore_bot: u32, clay_bot: u32, obsidian_bot: (u32, u32), // (ore, clay) - geode_bot: (u32, u32), // (ore, obsidian) + geode_bot: (u32, u32), // (ore, obsidian) } +#[allow(dead_code)] impl Blueprint { pub fn quality_level(&self) -> u32 { - // TODO dynamic programming? - return self.id * 1; // TODO largest number of geodes that can be opened } -} \ No newline at end of file +} diff --git a/src/days/d20.rs b/src/days/d20.rs new file mode 100644 index 0000000..6d374c1 --- /dev/null +++ b/src/days/d20.rs @@ -0,0 +1,102 @@ +use std::fs; + +const DECRYPTION_KEY: i64 = 811_589_153; + +pub fn solve() { + let path = "res/20/input.txt"; + + let contents = fs::read_to_string(path).expect("I/O error, wrong path?"); + + let initial_arrangement: Vec = contents + .lines() + .filter(|line| *line != "") + .map(|line| line.parse::().unwrap()) + .collect(); + + let size = initial_arrangement.len(); + + // list of indices + let mut work_arrangement: Vec = initial_arrangement + .iter() + .enumerate() + .map(|(i, _)| i) + .collect(); + + for (i, &n) in initial_arrangement.iter().enumerate() { + // position in current state + let work_i = work_arrangement.iter().position(|&elem| elem == i).unwrap(); + mv(work_i, n, &mut work_arrangement); + //println!("{}\n", work_arrangement.iter().map(|i| initial_arrangement[*i].to_string()).collect::>().join(", ")); + } + + let offset = work_arrangement + .iter() + .position(|i| initial_arrangement[*i] == 0) + .unwrap(); + let coord_1 = initial_arrangement[work_arrangement[(1000 + offset) % size]]; + let coord_2 = initial_arrangement[work_arrangement[(2000 + offset) % size]]; + let coord_3 = initial_arrangement[work_arrangement[(3000 + offset) % size]]; + + println!("Result 1: {}", coord_1 + coord_2 + coord_3); + + // task 2 + let decrypted_arrangement: Vec = initial_arrangement + .iter() + .map(|i| i * DECRYPTION_KEY) + .collect(); + + // list of indices + let mut work_arrangement: Vec = decrypted_arrangement + .iter() + .enumerate() + .map(|(i, _)| i) + .collect(); + + // do the whole thing 10x + for _ in 0..10 { + for (i, &n) in decrypted_arrangement.iter().enumerate() { + // position in current state + let work_i = work_arrangement.iter().position(|&elem| elem == i).unwrap(); + mv(work_i, n, &mut work_arrangement); + //println!("{}\n", work_arrangement.iter().map(|i| decrypted_arrangement[*i].to_string()).collect::>().join(", ")); + } + } + + let offset = work_arrangement + .iter() + .position(|i| initial_arrangement[*i] == 0) + .unwrap(); + let coord_1 = decrypted_arrangement[work_arrangement[(1000 + offset) % size]]; + let coord_2 = decrypted_arrangement[work_arrangement[(2000 + offset) % size]]; + let coord_3 = decrypted_arrangement[work_arrangement[(3000 + offset) % size]]; + + println!("Result 2: {}", coord_1 + coord_2 + coord_3); +} + +fn mv(pos: usize, move_by: i64, arr: &mut Vec) { + // reduce move_by to modulo + let move_by = if move_by < 0 { + (move_by.abs() % (arr.len() as i64 - 1)) * -1 + } else { + move_by % (arr.len() as i64 - 1) + }; + + let move_by = if pos as i64 + move_by <= 0 { + move_by + arr.len() as i64 - 1 + } else if pos as i64 + move_by >= arr.len() as i64 - 1 { + move_by - arr.len() as i64 + 1 + } else { + move_by + }; + + let mut curr_pos = pos; + let change = if move_by < 0 { -1 } else { 1 }; + + for _ in 0..move_by.abs() { + let other_pos = ((curr_pos + arr.len()) as i64 + change) as usize % arr.len(); + let val = arr[curr_pos]; + arr[curr_pos] = arr[other_pos]; + arr[other_pos] = val; + curr_pos = other_pos; + } +} diff --git a/src/main.rs b/src/main.rs index 9e0980a..3f6cf55 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ pub mod days; fn main() { - days::d19::solve() + days::d20::solve() //_all_days() }