diff --git a/day20/day20.go b/day20/day20.go new file mode 100644 index 0000000..3d779dc --- /dev/null +++ b/day20/day20.go @@ -0,0 +1,102 @@ +package main + +import ( + "AOC2022/helper" + "fmt" + "os" +) + +func main() { + args := os.Args[1:] + lines := helper.ReadTextFile(args[0]) + part1(lines) + part2(lines) + +} + +func part2(lines []string) { + numbers := helper.StringSliceToIntSlice(lines) + numbersWithOriginalIndex := make([][2]int, len(numbers)) + for i, number := range numbers { + numbersWithOriginalIndex[i] = [2]int{number * 811589153, i} + } + for j := 0; j < 10; j++ { + for i := 0; i < len(numbers); i++ { + shift(i, &numbersWithOriginalIndex) + } + } + printNumbers := []int{} + currentIndex0 := -1 + for i, number := range numbersWithOriginalIndex { + if number[0] == 0 { + currentIndex0 = i + } + printNumbers = append(printNumbers, number[0]) + } + sum := 0 + iterator := 1000 % len(printNumbers) + for i := 0; i < 3; i++ { + currentIndex0 = (currentIndex0 + iterator) % len(printNumbers) + sum += printNumbers[currentIndex0] + } + fmt.Println(sum) +} + +func part1(lines []string) { + numbers := helper.StringSliceToIntSlice(lines) + numbersWithOriginalIndex := make([][2]int, len(numbers)) + for i, number := range numbers { + numbersWithOriginalIndex[i] = [2]int{number, i} + } + for i := 0; i < len(numbers); i++ { + shift(i, &numbersWithOriginalIndex) + } + printNumbers := []int{} + currentIndex0 := -1 + for i, number := range numbersWithOriginalIndex { + if number[0] == 0 { + currentIndex0 = i + } + printNumbers = append(printNumbers, number[0]) + } + fmt.Println(printNumbers) + sum := 0 + iterator := 1000 % len(printNumbers) + for i := 0; i < 3; i++ { + currentIndex0 = (currentIndex0 + iterator) % len(printNumbers) + sum += printNumbers[currentIndex0] + } + fmt.Println(sum) +} + +func getNthElementAfterN(currentIndex, MoveForward, lengthArray int) int { + remaining := MoveForward % (lengthArray - 1) + newIndex := currentIndex + remaining + if newIndex >= lengthArray { + newIndex = newIndex % (lengthArray - 1) + } + if newIndex <= 0 { + newIndex = lengthArray - 1 + newIndex + } + return newIndex +} + +func shift(index int, numbersWithOriginalIndex *[][2]int) { + currentIndex := getNumberWithOriginalIndexN(index, numbersWithOriginalIndex) + currentValue := (*numbersWithOriginalIndex)[currentIndex][0] + move(numbersWithOriginalIndex, currentIndex, currentValue) +} + +func move[T any](numbersWithOriginalIndex *[]T, currentIndex int, currentValue int) { + newPosition := getNthElementAfterN(currentIndex, currentValue, len(*numbersWithOriginalIndex)) + helper.Move(numbersWithOriginalIndex, currentIndex, newPosition) +} + +func getNumberWithOriginalIndexN(index int, numbersWithOriginalIndex *[][2]int) int { + for i, number := range *numbersWithOriginalIndex { + if number[1] == index { + return i + } + } + return -1 +} diff --git a/day20/input b/day20/input new file mode 100644 index 0000000..eb52d11 --- /dev/null +++ b/day20/input @@ -0,0 +1,5000 @@ +-7594 +-3313 +-7404 +-8208 +-9315 +-9537 +-5293 +860 +-1368 +1984 +7865 +3261 +-8361 +7267 +8401 +9525 +-6388 +1575 +-2979 +4074 +3379 +-491 +6952 +5987 +-4809 +7905 +5893 +-7169 +-4650 +-9473 +4438 +-8592 +-2454 +-110 +7510 +-2309 +-5571 +-8966 +5781 +905 +-7638 +-7436 +8821 +6952 +954 +6194 +-9722 +4210 +4548 +2907 +2543 +-6544 +2742 +-6822 +-5556 +-8895 +-9108 +-8759 +-2341 +7076 +-5188 +-9029 +5796 +-2045 +-8804 +3794 +3121 +7085 +-8338 +-3039 +6767 +3594 +2229 +5355 +6694 +1207 +-6718 +6920 +-4092 +-8567 +-6375 +8836 +244 +7560 +-7793 +-6655 +3756 +827 +-4075 +-9189 +-6625 +-4539 +-6433 +1742 +789 +-3230 +-2575 +8755 +8471 +4736 +3170 +-8943 +-2014 +-2729 +4700 +-1357 +2496 +746 +-3807 +9860 +1990 +-7597 +7366 +1432 +-1146 +-9647 +1332 +7913 +1234 +-1091 +4381 +5096 +3837 +952 +-8199 +-6018 +-581 +-6519 +7418 +274 +8781 +6382 +393 +5342 +-2353 +3534 +726 +-1895 +8540 +-5598 +-7041 +4927 +-3962 +-9798 +-7154 +-7497 +-3902 +-5906 +-5740 +1328 +7085 +-8173 +-5962 +-1706 +-8396 +2996 +-638 +3739 +7927 +-5041 +-8804 +-6869 +9210 +5838 +6646 +6211 +-6827 +-7068 +7788 +216 +-978 +-1190 +-6966 +-9187 +8438 +-7553 +4968 +4014 +-3818 +6693 +-2275 +8672 +4148 +9654 +-5520 +-5412 +-1689 +-8991 +1932 +-897 +-292 +9181 +3229 +-8960 +5333 +3810 +3938 +-1064 +9019 +-7495 +8516 +4642 +7434 +-7404 +-1823 +-2366 +715 +-6810 +-152 +-4154 +8479 +6389 +-3301 +-5421 +3424 +1726 +-5262 +-8135 +-9021 +-5901 +-8165 +-5152 +-1371 +-7666 +-4131 +-6878 +-9000 +-2303 +2689 +-4766 +-9607 +-292 +482 +9493 +-3764 +8361 +-436 +1694 +2458 +-96 +615 +9924 +-1306 +7557 +-8585 +291 +-7185 +-5387 +9841 +-3776 +5264 +6442 +1521 +3495 +761 +-5964 +-9123 +7595 +-5991 +5053 +7909 +-8804 +6012 +-4826 +-8081 +2728 +4402 +-5020 +247 +3388 +-2765 +-355 +8225 +1670 +-5092 +-7752 +-7594 +-1463 +-1518 +7141 +1974 +7673 +-9803 +-6573 +6616 +8998 +8434 +-8549 +3370 +-6046 +-8133 +-1190 +8190 +3525 +-4387 +3787 +-165 +490 +-9642 +-1014 +1721 +-4642 +-4636 +7182 +6870 +-9609 +2273 +839 +1247 +9654 +5613 +-8030 +-7587 +-8789 +2063 +8454 +4021 +9566 +2909 +9226 +4838 +58 +-657 +-82 +6871 +-6332 +-3012 +-4320 +8514 +2623 +-9294 +-3240 +-7936 +-8287 +4794 +-8718 +5235 +-5777 +-8847 +-8229 +564 +3204 +4950 +7962 +2844 +6639 +3507 +611 +-2513 +-6433 +-5194 +-4084 +-670 +3021 +-416 +-2309 +-5005 +-7518 +7207 +1259 +4790 +7801 +-1832 +-7692 +-176 +-3061 +-911 +7319 +-3908 +3050 +-5347 +5138 +2954 +9836 +-2356 +2775 +7565 +-6447 +-6480 +-3501 +-5695 +-254 +-5353 +-2538 +-2178 +-2532 +-7486 +5363 +8176 +837 +8438 +-2778 +9526 +3239 +-5365 +6775 +-7335 +-3886 +863 +6894 +-5439 +-6083 +-6479 +-5408 +-6783 +-4390 +-7032 +-5929 +-2115 +9778 +1148 +-1973 +3612 +-6204 +-2410 +-4825 +3015 +-3737 +-7273 +-5412 +6846 +-5157 +9397 +-5681 +5253 +8843 +1708 +-4796 +5860 +4739 +6276 +7041 +2566 +3470 +-6474 +8042 +9564 +-1936 +758 +-6420 +353 +9045 +8105 +6412 +6669 +8093 +2630 +-2275 +4337 +-6287 +3896 +2800 +-9557 +6789 +5264 +2756 +-7471 +6083 +-844 +-9186 +-9550 +669 +-1007 +1084 +150 +-4160 +-2950 +2120 +3350 +-9604 +-1102 +-355 +-5644 +4298 +8620 +-9017 +729 +201 +-2148 +3537 +4922 +-3863 +1200 +-4544 +6908 +7461 +-5902 +3184 +-5718 +-8506 +4482 +4660 +-384 +-4218 +-6858 +5161 +7827 +-7856 +7894 +2120 +2280 +8997 +-4150 +1939 +-1351 +9023 +2137 +-1656 +-9698 +5096 +7001 +8104 +-9274 +-2055 +-1627 +-2866 +-5020 +1543 +-6672 +-7601 +1399 +9446 +8338 +5236 +1400 +841 +3206 +-2650 +3519 +6161 +8982 +-8454 +-342 +1666 +-662 +-9294 +-170 +966 +4453 +9225 +8444 +8591 +7846 +-125 +-8517 +-6122 +-5371 +-1149 +-8818 +-4863 +-3537 +-859 +-5860 +7434 +6293 +-4037 +-8423 +8606 +9836 +6262 +7951 +15 +7550 +2927 +1295 +5831 +-5700 +789 +1484 +-4544 +6651 +2525 +-1342 +3295 +-7558 +-4797 +-6673 +-6663 +-2566 +4791 +-4663 +5856 +-1323 +6720 +1881 +-826 +-5116 +-1653 +353 +1913 +314 +7242 +2141 +7374 +2448 +5681 +3890 +-4020 +-2877 +-3510 +6333 +1369 +424 +7192 +6552 +-9173 +4443 +1429 +-3409 +-9622 +-4117 +8389 +9664 +-4650 +-4671 +4615 +3959 +5469 +6018 +-3038 +-7793 +-4445 +3737 +-8429 +3853 +7576 +9545 +-9895 +6295 +4253 +-3848 +6841 +-601 +-8764 +5063 +-6904 +-5577 +7003 +-5905 +-5156 +-3630 +2704 +-2625 +-2386 +7213 +380 +-9481 +-2845 +2808 +4411 +7658 +-7800 +-6080 +9612 +8190 +-150 +3911 +-5114 +-161 +6172 +-9083 +-152 +-2565 +6960 +-5897 +-3307 +-9226 +6214 +-3887 +-3792 +-2222 +-8301 +-1836 +7478 +-5831 +-6303 +-6240 +8677 +-8663 +5177 +4618 +-2326 +-4829 +2392 +4848 +-3393 +9443 +8452 +5455 +-340 +-5513 +1661 +-1966 +-2009 +-9334 +3433 +58 +-1011 +-3712 +1650 +-8973 +5584 +424 +9049 +-2629 +-9269 +-8940 +9342 +-4164 +-8823 +5079 +-5897 +5121 +-2009 +232 +1195 +1014 +5405 +-2122 +-7185 +8555 +5923 +576 +-5881 +3584 +-911 +-8612 +2254 +-8461 +-8819 +-1078 +6375 +-9792 +-8759 +-4612 +5707 +-937 +-5826 +-587 +3226 +7702 +5976 +5628 +-3836 +-7803 +4199 +8262 +9546 +3424 +3156 +7342 +-3580 +8787 +-35 +7607 +9951 +-4416 +-33 +207 +4857 +9397 +-7209 +-4454 +4712 +4989 +-5817 +-461 +7827 +-1077 +-9754 +2732 +4756 +-5434 +-9048 +2840 +-6710 +-5438 +-2200 +3451 +9205 +1578 +-5702 +-4730 +-4776 +-3737 +3974 +-3230 +640 +996 +-6287 +4823 +-7087 +481 +4999 +-1236 +-8045 +-3467 +9098 +946 +-601 +7594 +9772 +1183 +1683 +-974 +-7495 +6110 +8207 +-9299 +9564 +8135 +6925 +7380 +-2282 +2554 +521 +-4996 +8978 +-780 +-5851 +9388 +2488 +-6175 +5840 +6738 +-8875 +-1999 +-7447 +9098 +8739 +4054 +3470 +-801 +-9299 +-6027 +1377 +-1062 +-9315 +-1190 +132 +-8882 +-370 +6104 +-4927 +-3240 +2875 +5937 +-714 +-9541 +-2268 +-7663 +-483 +2618 +5012 +244 +3696 +9056 +5381 +-6255 +4741 +-270 +7790 +-3317 +1709 +8322 +1566 +5079 +8960 +4428 +5446 +5851 +-4642 +-3319 +6630 +3156 +7734 +9839 +-4390 +-5005 +-8165 +1973 +4402 +6408 +3863 +4514 +4470 +6177 +1081 +-7681 +-6084 +9122 +-966 +-5781 +-5166 +-3571 +4927 +6043 +8295 +1759 +3215 +-3737 +-3956 +-1260 +2935 +6407 +7530 +-5523 +-601 +-413 +4158 +4333 +4767 +-7856 +-6840 +2085 +-8262 +3038 +-3373 +-5367 +-6280 +9070 +2106 +-3499 +-8330 +-3688 +1207 +-257 +2173 +275 +552 +8129 +-6204 +8113 +-7936 +9470 +-6598 +-814 +-2722 +4965 +4700 +5096 +607 +3050 +-337 +-3822 +-429 +7324 +-4765 +1485 +-8576 +9309 +-808 +964 +2539 +-9918 +-7195 +-7944 +7539 +-3618 +7403 +8187 +-688 +482 +7466 +-6760 +5232 +-6382 +8592 +8266 +-302 +8849 +8605 +-7127 +4453 +-8091 +-8209 +-5739 +4427 +4510 +-5887 +-1648 +4277 +-8685 +-3892 +-2400 +-1863 +-4316 +-1484 +1775 +-753 +-670 +2480 +-5153 +-3160 +3341 +-2096 +4395 +-5229 +4837 +8139 +4589 +-8821 +-4485 +-419 +-1817 +8196 +-3663 +-3127 +5560 +4940 +-495 +-3160 +2063 +-8245 +-562 +3255 +7904 +6442 +9701 +1855 +-7111 +3795 +4927 +4373 +7201 +3629 +2219 +-9338 +7806 +-1306 +2169 +6065 +-7498 +233 +7927 +-6455 +1326 +1605 +-1423 +4366 +-4301 +3411 +-3544 +-1955 +-9138 +-5752 +-3856 +-2526 +1107 +5893 +2085 +1056 +-9294 +9525 +760 +-6165 +-8742 +6424 +5330 +-4443 +-8230 +1161 +-1686 +-1607 +-6447 +-3509 +4753 +-8727 +3594 +-5262 +1949 +1151 +-987 +-1849 +-3746 +991 +8268 +-1983 +8622 +-5740 +-4868 +-2760 +220 +789 +181 +2533 +-5526 +-2718 +7401 +-3330 +-760 +4097 +-4233 +-9776 +-8171 +1817 +9953 +-6621 +-1110 +-8372 +-9226 +8484 +4960 +-6911 +-5042 +-5629 +-4662 +-458 +4851 +-3864 +-8604 +-6151 +879 +-3201 +-2573 +5186 +7268 +-8685 +2829 +536 +-9196 +1810 +9282 +9321 +4588 +-7653 +3495 +8119 +3816 +-6603 +5703 +8118 +-7078 +8510 +3926 +5072 +1195 +-8948 +4927 +-5313 +5707 +-9778 +-5460 +5787 +7070 +8882 +-5975 +4 +4411 +2928 +-9502 +402 +6740 +9506 +-3111 +8806 +5525 +-795 +4225 +1322 +-4297 +-8850 +0 +7320 +4923 +6926 +-1511 +342 +-8209 +5854 +3797 +-9798 +9328 +6209 +-2073 +-2414 +3782 +112 +-8102 +607 +7961 +2529 +-8364 +-2532 +-8066 +-468 +7574 +-6604 +4919 +3995 +-1589 +-4055 +281 +8115 +8127 +-2711 +6846 +-9396 +-4020 +9206 +7577 +1195 +4386 +-853 +4447 +-7716 +-1511 +6331 +-6591 +2333 +-1030 +1768 +6989 +-7196 +482 +-9201 +-9049 +-8934 +4339 +8035 +-8764 +1915 +-9669 +-491 +-9294 +-7967 +1913 +2516 +-2027 +-7321 +9540 +-9484 +1699 +-2199 +-7318 +-4037 +8252 +-2216 +-3142 +-5005 +-8011 +-6212 +7601 +7712 +7525 +7514 +-6844 +7267 +8576 +-647 +7654 +7303 +7863 +-1121 +615 +-2123 +413 +-7349 +-8804 +-7044 +5405 +3433 +1403 +-2178 +-2649 +-402 +5079 +-4964 +834 +4964 +-5042 +2954 +8832 +-8939 +-5493 +-58 +5116 +7899 +-5948 +9664 +-4344 +-269 +7790 +-5153 +132 +-3915 +-4106 +-764 +-8205 +-2694 +-5851 +9372 +2634 +-8384 +-7562 +-292 +5519 +7009 +8389 +-891 +-7889 +1478 +933 +5193 +-3794 +4170 +-5734 +6003 +5627 +1790 +6698 +-3588 +8474 +6289 +-1652 +-2159 +5864 +-5681 +-5089 +-78 +-2878 +-8908 +5429 +5853 +-7001 +3828 +-3698 +3541 +-9550 +2913 +626 +6868 +-1604 +8104 +-8369 +3265 +5736 +4894 +2426 +-1148 +-562 +-4030 +-6245 +-7755 +-7752 +7075 +133 +5913 +3363 +2790 +1456 +-5313 +5266 +-4187 +285 +-2980 +1995 +592 +4490 +-2845 +-3848 +-2302 +-1669 +-9166 +9095 +3991 +8000 +-1554 +8842 +5346 +9755 +2900 +-5149 +-6209 +-1881 +1113 +-4822 +576 +4981 +-8296 +-8878 +-1330 +-4730 +6803 +6825 +8238 +3959 +-2025 +-2872 +-4490 +780 +-1566 +3698 +-6252 +144 +-2573 +2341 +6569 +3727 +-1614 +7403 +69 +9855 +9250 +5787 +7283 +1456 +-9872 +-2473 +1234 +2885 +-4166 +-2988 +-626 +9031 +6893 +-8635 +5346 +3080 +-6174 +-1479 +-8869 +1089 +-7895 +-6150 +8452 +6868 +7883 +2106 +1955 +-7831 +5819 +6994 +-8253 +739 +-9396 +-2206 +7380 +-9698 +-3238 +9443 +9591 +6869 +-3143 +9070 +-3968 +-4868 +2678 +-8377 +8270 +7696 +-5902 +-6163 +4283 +8692 +5711 +9544 +-8209 +-5323 +-1609 +-4407 +5002 +-7803 +-1375 +6456 +110 +3153 +-5412 +-2326 +3159 +-1637 +6538 +-8634 +7560 +-4764 +3666 +-6653 +-9136 +6373 +-8679 +3204 +1029 +6846 +-7808 +-5192 +3911 +3454 +7013 +-2403 +253 +3018 +-9845 +-1428 +-3940 +5693 +-7075 +-4802 +-6004 +-5106 +6401 +4866 +-1292 +1351 +-4842 +7213 +-3330 +-1836 +3520 +6899 +-7138 +2089 +-4375 +-3178 +-6209 +-3325 +-6705 +-4490 +-6407 +-2384 +-9488 +1699 +4141 +-4031 +-7583 +-1694 +1913 +9700 +-9949 +1573 +-2319 +-5830 +-9735 +-5388 +-7795 +9772 +1105 +9342 +-232 +-1479 +-2638 +-5685 +-7877 +8818 +1675 +-494 +-4117 +-4145 +-6165 +3847 +-5840 +-5745 +9940 +-6162 +5196 +7654 +9368 +-869 +2899 +-7733 +-933 +-7513 +4989 +-8493 +-220 +2900 +8577 +7579 +-7698 +5041 +-9061 +-8698 +-3560 +6416 +-176 +-161 +1880 +-6298 +775 +-8490 +-8601 +6699 +1720 +-528 +7136 +7752 +8704 +-4014 +-6787 +-9044 +9355 +-2196 +5986 +8429 +1770 +2306 +1104 +4300 +174 +-8830 +6518 +-269 +-7256 +-7144 +4074 +1565 +-5260 +3196 +554 +9897 +6659 +929 +-9568 +-5561 +-850 +-418 +-7897 +4262 +4323 +-2262 +5456 +3449 +-745 +-8045 +-4188 +-3403 +-5819 +9692 +-6005 +1025 +-1825 +6914 +-7954 +-4538 +7696 +-3185 +-8742 +-6348 +5831 +-6185 +2873 +7638 +7913 +769 +-9108 +-2250 +-4678 +640 +-9406 +-6432 +-5234 +-4517 +-6713 +9566 +-4667 +-2784 +8595 +-1845 +-9895 +6302 +-9184 +7870 +2983 +6727 +-8295 +19 +-6298 +-8611 +9762 +-7596 +3993 +4923 +380 +-2302 +-1613 +5173 +-3973 +-3752 +-2595 +-909 +-2134 +1486 +-6184 +-4682 +-3882 +3853 +-7333 +1865 +1104 +1882 +-8840 +-8226 +8065 +5860 +8234 +-7910 +-346 +-5179 +6717 +-6497 +-8281 +6886 +4463 +8264 +-7253 +5405 +-4062 +820 +4237 +-5303 +-9473 +-2639 +-587 +-6110 +-3996 +1734 +-8024 +-2982 +-6783 +-4109 +4875 +-4927 +2689 +-2055 +1223 +-8445 +2698 +4757 +-8066 +4328 +-1975 +6348 +-1750 +-9311 +3345 +1708 +-2619 +-3571 +-4125 +9372 +4968 +-2077 +6988 +6752 +5780 +2319 +-1257 +-6807 +-5213 +3387 +3397 +462 +-3375 +7667 +-8537 +-1781 +9664 +4816 +-9221 +8151 +-4649 +-269 +-1282 +-539 +-7613 +-7041 +2999 +7639 +1208 +-4871 +5835 +3784 +-2440 +7537 +247 +-9592 +-6151 +-1839 +1021 +-3011 +6822 +3271 +-4387 +8170 +1430 +9075 +9098 +3544 +-3334 +-1146 +8856 +-9091 +5782 +-4021 +35 +-1134 +-3380 +-3009 +-9375 +4111 +-5380 +-7753 +-1236 +-7722 +-1653 +555 +-1304 +8037 +-134 +9025 +-1282 +-5354 +-8061 +2821 +7296 +-4560 +8145 +3292 +-6280 +3464 +-6020 +-1378 +5692 +-465 +-5032 +-9585 +305 +-3665 +-427 +9474 +-3323 +6669 +-4697 +272 +-7511 +-5464 +3541 +-5520 +1852 +-4796 +1063 +-2351 +7627 +-3590 +-7 +6758 +-2430 +7676 +8942 +-1656 +3640 +6565 +769 +7790 +9463 +-8281 +-7349 +-2450 +7136 +3454 +-8493 +5036 +2403 +-7756 +-3672 +6177 +7428 +-2483 +-9036 +1829 +3248 +-8578 +3050 +-2159 +-2123 +-4267 +-3867 +-4187 +-4096 +3229 +-458 +-8872 +7552 +2015 +2035 +-2867 +-2555 +-4018 +-201 +8727 +-3986 +-5305 +1227 +3514 +2750 +-5270 +-7326 +9120 +7896 +5173 +-475 +2465 +-10000 +8934 +-860 +807 +7077 +-190 +9711 +9403 +7374 +3583 +6785 +-8771 +2759 +5161 +7692 +-1262 +-251 +-662 +748 +-5101 +-2709 +-7857 +622 +-2020 +7087 +2713 +-2568 +3786 +-8209 +-2505 +7587 +-5804 +5913 +114 +423 +2164 +-3192 +-662 +-5149 +-2115 +-5660 +-4192 +-3102 +-6976 +4989 +7133 +-7865 +-7364 +-5883 +6934 +-5774 +6883 +4063 +6841 +-9564 +9431 +-7793 +-5266 +-7889 +8099 +-9293 +4122 +7275 +1332 +1172 +3537 +-1823 +-2732 +4158 +-339 +-2228 +4718 +7009 +9620 +4626 +1575 +-4838 +-4138 +-3202 +-6033 +7446 +-2706 +3959 +5873 +7141 +3026 +-8122 +2566 +-3616 +-2716 +-4257 +-2966 +-4151 +3786 +2655 +9571 +-580 +-3723 +8372 +-4042 +-5718 +-6297 +-6844 +-9226 +-9919 +-9201 +-4853 +-3324 +-671 +9368 +3460 +3244 +-7520 +-588 +-7349 +-5419 +-4881 +-4953 +1258 +9043 +6212 +-8426 +-5739 +-7472 +-523 +-5776 +-2522 +6755 +-8301 +271 +4828 +-8164 +3993 +-6638 +3987 +7787 +-3409 +8622 +462 +6263 +-9653 +-5850 +-7803 +1482 +-171 +6517 +-2492 +-7920 +4589 +7141 +-3294 +-8612 +7491 +4158 +-2148 +-365 +6359 +-1880 +-5878 +-165 +-3275 +6408 +8397 +-8954 +-1605 +4851 +-3180 +1908 +-4351 +568 +-1138 +3403 +-1880 +6736 +4272 +804 +9323 +-6147 +8732 +4675 +-2376 +970 +8405 +3589 +2828 +2266 +-6215 +-9598 +4589 +-6718 +3005 +7283 +1698 +1932 +-8820 +-4949 +30 +5134 +5758 +7207 +-6014 +7788 +3636 +4589 +-3571 +3619 +-8996 +-5953 +2187 +9183 +-4443 +-2703 +4589 +739 +4540 +-490 +-711 +-9948 +5453 +-2598 +-3443 +-6929 +-1791 +1699 +8563 +-9551 +6569 +5425 +-8910 +5321 +-5493 +2769 +7777 +3037 +4356 +-2787 +-2354 +-8295 +4703 +8391 +-4826 +4923 +-3441 +9650 +-7037 +-3162 +-8629 +-8950 +3428 +-9698 +-9311 +-4702 +-3863 +-9986 +-2012 +1234 +-427 +-4164 +9564 +-490 +-7762 +-5869 +3744 +7588 +5156 +-1457 +-5330 +-9653 +-4143 +7240 +1842 +-220 +9311 +-1160 +-3247 +-9041 +455 +-14 +-7594 +6883 +6431 +-5032 +-8618 +-3465 +-711 +6333 +803 +4923 +-8244 +7891 +9368 +8039 +-1518 +-7353 +-8330 +-5440 +1390 +-4955 +1345 +4985 +4589 +-1836 +2618 +870 +1168 +-9065 +4589 +-2302 +7583 +7595 +1694 +8989 +-8651 +8343 +-8862 +-7666 +-4528 +4097 +-8521 +2747 +165 +856 +996 +-7689 +-2995 +1927 +-3963 +2664 +275 +-3996 +7262 +-5014 +-1845 +-4 +-3182 +-5542 +-4891 +-797 +9801 +9534 +-7596 +-5426 +5141 +-8173 +6695 +9426 +-8450 +316 +-92 +-6312 +9218 +4335 +9288 +813 +6751 +6727 +8178 +2543 +-7583 +8824 +-150 +32 +2471 +-1359 +-8464 +-4055 +-6306 +3363 +9627 +-6733 +9604 +1634 +62 +4589 +6945 +-3114 +1116 +-6438 +1998 +-3670 +-5767 +-4139 +-1225 +2286 +-9436 +6738 +-9467 +4428 +8354 +4471 +-4890 +-8564 +5253 +-2009 +-105 +8879 +-2172 +-8685 +-1724 +-7110 +250 +4655 +2938 +1207 +2154 +2001 +7663 +-1803 +19 +-5863 +8641 +-1257 +-7378 +-3320 +-6312 +9068 +-8493 +5519 +6855 +-4940 +-302 +-3946 +6456 +-8910 +-425 +-3481 +9415 +5986 +-9291 +54 +-74 +2454 +3548 +-7991 +1409 +-3492 +2236 +552 +-2838 +-8356 +-2475 +9056 +1216 +-6020 +-3114 +-6098 +-9609 +-9258 +-6432 +-6019 +1476 +-4348 +8677 +4141 +3666 +-6932 +3548 +-3852 +-10 +6359 +-9598 +-4664 +-6741 +3457 +4675 +-146 +-974 +1084 +3064 +-3963 +-8135 +-8736 +-3931 +7423 +2250 +-3267 +167 +-6832 +1973 +-2305 +-5412 +-5997 +-7127 +159 +9506 +9825 +-1789 +-8736 +2782 +3640 +4870 +-903 +6216 +7552 +2219 +-8789 +-3220 +7374 +-3497 +-4587 +977 +-8806 +462 +2529 +-5432 +-3008 +-355 +2570 +-523 +3470 +-8390 +-5081 +7595 +-2428 +6958 +-524 +-6827 +-8117 +-8206 +2972 +-4934 +-8910 +9839 +-3761 +4663 +-7061 +6958 +8606 +2124 +-3497 +5467 +1089 +-5446 +-7981 +570 +6706 +138 +-5345 +-3243 +-6535 +-6699 +-9000 +170 +6717 +5828 +4031 +-1862 +-5856 +-2966 +-883 +-4603 +4837 +7283 +8238 +9644 +3057 +-5249 +-9568 +7800 +-8615 +1345 +-1944 +-1119 +-8616 +8564 +-3303 +-3238 +9063 +-1992 +9660 +-7582 +6217 +-4481 +9940 +-1729 +9056 +3414 +2429 +6594 +2760 +-3198 +-6340 +-6323 +-9976 +-7741 +8333 +-5330 +-3892 +3790 +7550 +-6187 +7086 +-9080 +8941 +-2276 +8355 +-1306 +249 +-4937 +6181 +-2388 +-8709 +-6556 +2187 +6759 +-1325 +-4208 +-4347 +-2471 +-2629 +-1125 +402 +8019 +3741 +3039 +-7453 +-6179 +9357 +-4707 +-2623 +3301 +-5948 +-9264 +1901 +1500 +-737 +6504 +5854 +-1527 +8606 +-3109 +4654 +4239 +7560 +-2988 +-2138 +6159 +6462 +5795 +4618 +-6877 +7143 +-6716 +-2960 +112 +8067 +2017 +9483 +-8384 +9690 +5978 +-4595 +9210 +-1726 +8143 +2808 +5175 +-1931 +-1860 +-3240 +2566 +9654 +-640 +-2452 +185 +-8671 +4932 +2333 +-3162 +-8574 +-4145 +-461 +-5156 +7450 +9523 +3819 +-1708 +-9141 +649 +-7138 +-7330 +5986 +-7357 +4100 +-8918 +-3723 +638 +1988 +8530 +264 +-6579 +3514 +1915 +1243 +-7820 +4336 +-9375 +7192 +2937 +-8627 +2468 +-9843 +-2457 +-3077 +-3831 +-745 +8190 +675 +-8684 +-9224 +-9199 +-9000 +-2275 +-688 +-9667 +-6955 +4964 +4510 +5006 +-3821 +-5483 +5892 +-9445 +257 +441 +-6923 +-4736 +-8303 +1521 +2244 +6035 +-3319 +906 +7383 +9490 +3424 +-7721 +-626 +-211 +-3764 +-8744 +-5469 +-2716 +6844 +9225 +-5460 +-9000 +-5917 +1993 +-7375 +4132 +3959 +-450 +4447 +2940 +6159 +-1972 +-8805 +-132 +-7642 +7346 +4950 +-1353 +-4707 +-1131 +-9786 +-8426 +3301 +-9802 +7525 +-9464 +3863 +7143 +-171 +2020 +-601 +6699 +6281 +-5222 +7213 +9230 +1453 +-6488 +-6752 +-4827 +-941 +-5167 +3881 +4929 +1507 +8050 +3010 +-2847 +4572 +3874 +5558 +8115 +946 +-1125 +2054 +9368 +7086 +-3756 +-1475 +-3162 +-5492 +1056 +-1310 +9221 +-1239 +5330 +-171 +-8671 +464 +4015 +-6125 +3594 +3228 +8864 +-2123 +4999 +-8356 +-8060 +5896 +3187 +7774 +2533 +6789 +-9026 +-6638 +-5290 +8704 +4851 +4380 +9477 +6731 +2873 +-2654 +1207 +-8818 +-1895 +989 +-111 +6925 +4302 +-1430 +-1551 +2063 +-495 +-8364 +-9585 +9206 +3109 +102 +3401 +-9187 +9656 +6988 +-6884 +506 +-3978 +6043 +-6194 +5613 +6452 +-1877 +7003 +1463 +-2419 +9403 +-8990 +-3450 +-7218 +-8043 +-1078 +8757 +9958 +2313 +6264 +1555 +-5981 +-9348 +-2410 +-3243 +-9792 +-9451 +8373 +5310 +6639 +2483 +-5298 +-191 +1060 +760 +-6580 +8127 +-8382 +-2439 +3615 +7525 +-1126 +-5738 +-3327 +-6632 +2460 +-6285 +27 +188 +-9941 +6821 +3057 +-1430 +8891 +-9053 +-3759 +7931 +-3127 +4028 +8128 +4900 +-9980 +-7738 +52 +2930 +-2440 +-1078 +-4938 +2174 +1071 +9860 +-1653 +-3718 +-3106 +-4634 +-2080 +-780 +6214 +-7266 +-9017 +-6673 +-9899 +3292 +-3789 +2501 +9029 +5052 +-4442 +-9279 +-9235 +-4334 +342 +-1889 +-4953 +-1279 +-4117 +-5086 +-9115 +3772 +6900 +-1508 +3764 +-6150 +6555 +-4301 +9685 +3915 +-7200 +820 +7371 +6278 +3979 +-5150 +7801 +-7227 +-3122 +-4421 +-8135 +-9944 +-3254 +-3295 +-4964 +-4695 +2761 +4283 +-2838 +4753 +1104 +-5390 +-3789 +6825 +-1965 +1683 +-6936 +-2034 +-8666 +-3089 +-9027 +9062 +-962 +-322 +6641 +-5041 +-3737 +-3822 +-6850 +8952 +6594 +5273 +-5064 +1640 +-600 +-9351 +-5211 +-6705 +-6884 +824 +-1479 +8759 +-2204 +-4434 +-9265 +-7857 +-3228 +3089 +-1920 +2382 +2355 +-8068 +-7939 +-3042 +-1671 +2988 +-6298 +-2115 +8147 +1481 +3607 +-6337 +-4381 +7044 +-3162 +-558 +5719 +8231 +8051 +-4884 +3594 +1646 +7114 +-6125 +-7994 +-1541 +-6921 +3736 +3853 +7901 +-4237 +7905 +-7413 +812 +-5506 +3367 +754 +-7027 +-626 +9383 +-1159 +4676 +1793 +1762 +-5371 +6594 +-3614 +-8493 +-8410 +-7350 +3330 +-9412 +4130 +5053 +-3863 +112 +-426 +7531 +-3180 +-5684 +3010 +3524 +5868 +-8618 +-6840 +-2066 +5670 +5838 +-1980 +-3484 +-6867 +4675 +464 +-384 +4014 +-7527 +-8352 +3406 +4122 +6382 +-5089 +5868 +-1581 +-2283 +-2809 +-7834 +-3670 +1432 +6752 +-5887 +-6972 +-4034 +-9221 +-5963 +1247 +5519 +-8087 +-4746 +-7863 +-8547 +-1757 +1671 +5279 +1799 +7764 +3350 +1172 +-2450 +6755 +-8872 +-6500 +-7012 +4031 +-2619 +1237 +-2743 +-3247 +-737 +2899 +6386 +4755 +7790 +9550 +-3697 +-3167 +4514 +5284 +526 +-1750 +542 +-521 +-3573 +2356 +7894 +-2238 +7466 +2706 +5153 +-602 +-2716 +-3537 +2098 +8262 +970 +-630 +-1724 +-9561 +-5906 +-2853 +-1372 +-4989 +1998 +-1160 +-5842 +-3313 +3059 +-2695 +-9499 +7595 +9907 +1577 +-6358 +9860 +-2706 +-9097 +-6239 +-1300 +8125 +-233 +4979 +-7597 +-7138 +-4128 +-935 +-8219 +8592 +-3205 +5367 +9996 +-4713 +-3809 +-7486 +2437 +4312 +2355 +-271 +2254 +-5794 +2756 +9432 +-9871 +-6347 +-8745 +-8716 +2434 +5216 +4630 +-9911 +3297 +7421 +9664 +8239 +3983 +-7387 +3405 +8877 +-7782 +-8983 +7150 +8212 +4579 +4097 +-5033 +3085 +-8356 +-1094 +-1412 +-4155 +3951 +8874 +-4931 +-6637 +-1071 +7169 +5716 +-4746 +1034 +-9201 +-2625 +-5131 +-3042 +8462 +-6635 +-4321 +-3872 +-780 +4218 +4837 +-2716 +2566 +4825 +4141 +-9342 +-3407 +-7721 +9880 +-6433 +-318 +3089 +-9044 +5077 +1467 +-8224 +9358 +-1893 +-2638 +9232 +4304 +-7003 +-8718 +-7270 +-4212 +3109 +4298 +3883 +-4131 +-2384 +2601 +34 +-9495 +-9634 +2790 +565 +1078 +9049 +9862 +-7372 +5905 +3137 +-775 +385 +586 +-9041 +7677 +-2728 +5670 +3234 +-2956 +5946 +359 +-7759 +-4687 +2141 +8264 +-3934 +9062 +-6580 +-3762 +-5223 +-5280 +4941 +4626 +-3815 +4724 +4999 +-4644 +2623 +8787 +2577 +-6638 +8077 +-1577 +5235 +4680 +-3126 +-1703 +1913 +-5081 +2934 +-8206 +-3025 +7380 +-7807 +9835 +1110 +-6214 +-7130 +-3996 +-4657 +5600 +-40 +-9565 +1476 +7421 +-5957 +-9604 +3969 +-5341 +9036 +-792 +3819 +7633 +2587 +-3889 +-7446 +1276 +-8287 +-6962 +1009 +8389 +5891 +-2896 +4463 +-4671 +1745 +4485 +-6428 +-4953 +6720 +934 +2254 +9880 +6095 +-6972 +-1605 +-1564 +-82 +8401 +-4840 +-541 +-3599 +-8868 +4703 +-6655 +-9496 +9205 +-6929 +1939 +-8974 +-4953 +-5906 +-2045 +54 +-5020 +894 +-6751 +2941 +-2115 +2219 +-6165 +-1931 +5917 +-5053 +-1292 +4792 +-9414 +-8814 +-1720 +-5944 +-6932 +-7640 +4897 +6693 +-808 +-6644 +-9265 +-3224 +-8847 +7275 +5990 +6727 +-2018 +-7020 +-1479 +9652 +6805 +-1075 +-4641 +-2070 +6032 +-4746 +-9009 +4782 +2402 +6251 +-9044 +-7345 +2547 +9350 +-592 +7130 +-1181 +-2708 +9375 +-843 +4254 +-6867 +-1669 +1998 +-7729 +-6325 +1288 +759 +-3612 +129 +5797 +-4291 +-7275 +2061 +4968 +-5754 +-6669 +-4763 +7731 +-6285 +8776 +5767 +-621 +1642 +1226 +3234 +1476 +8440 +-4651 +-3628 +-435 +-5488 +3687 +-143 +-7353 +-9450 +2234 +-6799 +4846 +2373 +5042 +-9448 +8853 +9581 +-3172 +-7196 +35 +-8840 +-3086 +252 +9685 +3501 +4431 +-2326 +-3831 +746 +4186 +-3275 +-3973 +-640 +8104 +-9572 +8193 +-92 +-5625 +7635 +-2215 +3300 +-977 +9091 +-4139 +1009 +-5209 +-178 +1512 +-2596 +-2934 +1155 +1652 +8777 +4343 +9731 +9760 +9070 +-5918 +2286 +-4891 +-1484 +-7404 +6362 +6068 +-5017 +-1337 +6735 +-1686 +-4770 +-8006 +-9751 +-9239 +-6312 +-9184 +675 +-6884 +-3661 +8778 +1654 +5034 +-6614 +-6087 +-6525 +-269 +-9449 +8299 +3006 +-5957 +353 +1507 +8083 +1810 +-6204 +-144 +-1027 +5795 +-4092 +-6474 +6636 +-3024 +-6071 +4651 +5732 +-6151 +-8316 +5620 +-5092 +-1427 +8252 +15 +-1859 +-7878 +-5143 +287 +-5530 +1927 +-955 +-1823 +2508 +1299 +509 +-8612 +4021 +1262 +-8791 +-3978 +759 +2641 +4333 +-4938 +-3084 +-9116 +6675 +6951 +-7593 +3258 +-2499 +-2337 +2547 +2974 +-110 +8893 +-7538 +-2151 +-5146 +-9789 +2869 +-7339 +-9980 +-4746 +-9117 +-6591 +-2376 +-9253 +-9116 +6232 +-2159 +-2838 +-4119 +-8626 +-3369 +-6568 +8479 +8524 +-1881 +-8233 +-7353 +8445 +6540 +-4390 +1274 +9545 +-8211 +-6448 +-8277 +102 +7790 +2707 +-190 +-9581 +4800 +3658 +7467 +-6889 +814 +-2206 +6281 +5405 +7374 +-3794 +190 +8479 +6531 +-1243 +2048 +-7099 +-5632 +5077 +9652 +9470 +-3661 +6516 +7933 +5560 +9973 +1155 +-8364 +-6638 +-419 +-8493 +-600 +1604 +369 +-7395 +-8612 +-4055 +-7752 +-6382 +1021 +1523 +-4825 +6629 +-3893 +8916 +-2677 +-814 +7372 +-6923 +6214 +1383 +-8273 +2187 +-6877 +7403 +673 +4989 +9095 +6180 +-2539 +-7990 +-2066 +5063 +-9021 +-1170 +2931 +5260 +-4381 +-878 +3948 +-1325 +4964 +-5394 +-4610 +-6672 +8876 +-8900 +6572 +5158 +4501 +-2623 +963 +-8626 +4486 +-3818 +-4416 +9499 +4298 +3915 +8299 +3671 +-7749 +-3414 +8093 +4131 +879 +-9189 +-5499 +-5670 +8470 +7588 +316 +-8604 +363 +-5316 +3246 +7010 +8399 +1443 +-9658 +-8206 +-9406 +9430 +-2109 +-2305 +-6454 +7720 +-4905 +-4587 +7601 +-6904 +7461 +7951 +-9675 +-191 +-3806 +841 +9171 +-4822 +-7395 +4682 +-1505 +-7880 +-7498 +9591 +-9606 +-3904 +-4237 +2410 +-3537 +-3290 +5319 +2799 +-8209 +-4008 +9068 +-3956 +2759 +-8676 +-6179 +9839 +4276 +-8068 +4329 +4630 +-4853 +1358 +151 +-1686 +-4085 +-2333 +1615 +2477 +2698 +6041 +-2092 +9365 +-5742 +3765 +3727 +2742 +6013 +9618 +6281 +4834 +-9291 +-3089 +-2940 +5039 +-2331 +-2202 +-2687 +-2148 +2829 +-7345 +8304 +7184 +-7793 +-3862 +9364 +-3202 +1771 +5063 +-1077 +-8536 +-5776 +3325 +-7701 +-8818 +6248 +9020 +8125 +4453 +1878 +1825 +-4166 +-4160 +4253 +7086 +3816 +-7689 +-2322 +7413 +1195 +977 +-8146 +8092 +-343 +6205 +4131 +-4739 +-5434 +-7495 +-4991 +-7075 +-2291 +4950 +-3160 +3039 +952 +7891 +-5861 +-893 +-8385 +3786 +-3927 +-1818 +8285 +1161 +-461 +-1097 +6163 +812 +-7700 +-4085 +-7020 +4801 +8548 +-5316 +9631 +-402 +2465 +240 +9274 +1880 +-96 +3391 +-9754 +3313 +-6179 +4438 +385 +-1170 +-5354 +7421 +5895 +-5711 +-3666 +-9756 +-1639 +14 +-4387 +1532 +8476 +3114 +-7878 +8556 +1237 +-1022 +-8157 +2927 +3722 +-6380 +-7597 +7856 +-9802 +-1412 +5285 +-6752 +5896 +-8358 +-1924 +-292 +-882 +-5493 +-804 +-6863 +-5606 +-4411 +5656 +-3822 +8327 +-1859 +2709 +-3560 +2756 +-1724 +5343 +-5320 +-7793 +-8334 +-5141 +-8330 +9957 +3244 +7311 +9181 +-2238 +-523 +-9096 +2263 +-7742 +-6601 +2252 +8193 +9393 +9863 +6558 +1909 +4988 +-4913 +-1320 +3898 +3962 +-6507 +-6904 +-5373 +262 +3038 +2049 +5740 +9568 +2759 +-6942 +6934 +9388 +9210 +6561 +-6208 +-3240 +197 +3204 +9227 +-663 +-2480 +7640 +-4083 +7529 +-1372 +-8264 +-1763 +5351 +-3594 +-1562 +7892 +951 +1843 +-366 +1762 +-3641 +3961 +-8227 +1345 +-5955 +-2305 +-7378 +4923 +-5324 +-5549 +3948 +-780 +8927 +4063 +62 +-5975 +-4044 +-2928 +-7175 +8600 +-6544 +-6248 +-9093 +5130 +7216 +-3164 +-3260 +-8780 +6135 +1880 +9609 +-7020 +-2200 +4506 +-4170 +3455 +2417 +-6670 +8080 +-8287 +8776 +3676 +9745 +-2838 +2447 +-9605 +9483 +-6979 +5289 +7136 +9462 +2615 +9113 +2441 +-3510 +-6895 +-755 +-8779 +9464 +-8064 +-6526 +7426 +-8830 +6855 +-7512 +-9136 +-9437 +-8064 +5311 +5105 +-3863 +-8560 +35 +-5826 +-6029 +-1292 +4110 +2181 +-4303 +6918 +-2277 +7246 +1975 +-8727 +-3357 +604 +3698 +-637 +6489 +-2104 +1071 +-5287 +-7567 +-9022 +2900 +4309 +9622 +-4281 +9347 +6683 +6307 +-323 +-1170 +2800 +-5961 +5913 +54 +3009 +2410 +-7178 +-1980 +9486 +-8338 +-396 +709 +882 +4964 +982 +-4351 +-5989 +-3855 +1578 +1518 +5412 +2474 +-2020 +-5795 +-3922 +505 +-305 +-2202 +2017 +-8940 +-8764 +6594 +9313 +-7501 +2272 +4551 +6671 +5782 +-5542 +3583 +-8919 +9692 +3702 +-2558 +-2188 +5067 +6752 +8876 +2468 +-6358 +7197 +1575 +4726 +-1193 +4965 +-969 +-2204 +5552 +1881 +4520 +-7677 +-1511 +-8690 +6579 +5236 +-4977 +-3059 +-2014 +-806 +-2970 +8071 +-8791 +-5483 +5462 +6892 +-926 +-8334 +7607 +784 +5429 +-9949 +-8377 +2806 +6782 +2400 +-4223 +-1446 +-3697 +7506 +8803 +-9161 +2531 +-6474 +-692 +-7222 +4482 +5351 +-4504 +-418 +-4844 +-1337 +6885 +6722 +6177 +1622 +-4536 +-159 +-2445 +8713 +-828 +-1237 +5036 +6767 +-8036 +5395 +1727 +6760 +81 +-2540 +-2606 +-688 +6449 +-4371 +-5845 +5725 +-9975 +9922 +-4977 +-2499 +-9394 +-4930 +8499 +-5368 +-7931 +8893 +-4588 +6045 +-4390 +-1951 +2749 +2305 +-7442 +9260 +3461 +7777 +-3209 +-1412 +-3348 +-3219 +9518 +-8176 +4650 +-6827 +-3234 +9320 +-3067 +4490 +-3024 +-8428 +380 +-232 +4919 +5145 +6452 +-5380 +1345 +6710 +7143 +4262 +2373 +6591 +4474 +305 +-3943 +-6019 +2089 +-5304 +-3956 +-3752 +-4106 +5663 +-9121 +-7638 +-1904 +-1130 +-2292 +3117 +4898 +3755 +9049 +-4644 +-585 +-9754 +8533 +-4014 +-11 +129 +-4348 +9738 +353 +3271 +-7004 +7565 +3031 +-8847 +-5381 +8434 +3363 +-2009 +3989 +-7183 +5480 +5779 +-4907 +552 +9821 +-780 +8916 +8527 +-1685 +9838 +-1525 +6706 +-304 +-6923 +359 +1320 +-1266 +4333 +-2443 +-8381 +-9605 +-2657 +3257 +4473 +4761 +-9422 +2954 +3336 +4790 +4850 +383 +6424 +-3931 +-9892 +5860 +-4588 +-2587 +752 +4558 +2612 +-387 +-7969 +-5141 +3837 +-2080 +-6515 +924 +3354 +9297 +-502 +-8795 +-9449 +5839 +6229 +7554 +-1542 +-8838 +-4973 +1422 +4390 +-8157 +-8429 +4959 +-9276 +-9814 +-6580 +-9311 +9388 +-1479 +-6632 +8279 +-6977 +-8133 +-8152 +8080 +-2156 +4682 +-7486 +-6225 +-9322 +6424 +2864 +8267 +5060 +-9299 +2556 +-371 +-6573 +3258 +1413 +-6103 +-5381 +-4301 +-1999 +570 +-8615 +6043 +8538 +6569 +-8454 +-3185 +-5513 +9432 +2725 +-1474 +-662 +-7020 +3096 +8703 +-2680 +8622 +-8946 +-1372 +-7497 +-130 +-4119 +9940 +-8358 +-9635 +3455 +-9723 +-621 +-2956 +9992 +-2009 +5679 +-3617 +7305 +8592 +2423 +692 +4959 +-9565 +5617 +-6667 +-9364 +5868 +9534 +-775 +4077 +-4229 +5069 +-3667 +-2539 +8344 +6815 +7371 +-4021 +1820 +114 +-8103 +-7700 +-935 +-4381 +8274 +-909 +1853 +-1216 +7438 +-4695 +4439 +-6151 +9226 +3922 +2285 +-5625 +8945 +6402 +2224 +-740 +7583 +-8356 +1789 +8285 +6810 +6182 +6076 +-7736 +-759 +-9606 +5333 +8163 +-3145 +-3749 +-9215 +5026 +8553 +4619 +-9116 +-6184 +-4884 +2930 +-3413 +4512 +1476 +5234 +946 +-3583 +5781 +-4569 +1854 +-1342 +7626 +-8950 +-3061 +2426 +9909 +-5489 +-7803 +-8493 +7825 +5469 +6394 +8333 +9830 +1668 +1386 +2058 +3904 +8129 +-903 +7003 +185 +1018 +-7863 +4252 +-1697 +-4429 +8389 +6295 +4731 +2702 +6009 +2024 +-8086 +-2364 +769 +-9689 +1576 +6009 +114 +-9211 +380 +6323 +-7223 +2014 +-5343 +-146 +-6798 +-8612 +5063 +-6781 +-962 +-1390 +-6201 +4566 +7421 +-3993 +-6697 +6212 +9818 +-5200 +3717 +4074 +-2022 +-4645 +1873 +3033 +-4042 +-9975 +-2595 +7670 +-2074 +8396 +5072 +-1671 +-2169 +3139 +-9786 +-490 +-1501 +-2055 +-8894 +-6125 +9062 +6344 +9743 +-410 +-3956 +4999 +-6384 +-6405 +5509 +-8896 +7206 +-9297 +2400 +-2956 +3910 +7892 +-5369 +9499 +-9713 +8397 +5346 +-1807 +-5065 +-1685 +-134 +-1378 +2124 +2782 +-4277 +-2912 +69 +-6877 +-933 +7918 +5266 +2927 +-134 +9688 +-7874 +31 +-8406 +-7939 +-6581 +-775 +-2073 +-9949 +570 +8958 +3078 +3727 +4233 +-4529 +-8923 +-3253 +-8441 +-3195 +-4897 +-7587 +6104 +4291 +5077 +-3409 +-9128 +5460 +464 +-35 +1880 +-2331 +-3915 +6727 +6194 +-8075 +-7629 +769 +9904 +9743 +-5414 +-4416 +5258 +-1372 +-6996 +-750 +4408 +-3930 +9755 +6059 +4097 +3089 +9019 +2792 +-7495 +-8372 +6104 +-9342 +4724 +-6447 +1999 +2089 +300 +-8334 +-8801 +6544 +9317 +-6445 +-4342 +7702 +6668 +1476 +6159 +-4085 +-7 +8282 +6382 +626 +-7931 +9786 +960 +-6396 +-2743 +6086 +-8611 +-4538 +-7434 +9887 +-8642 +-8806 +7183 +2280 +2595 +-2706 +-79 +5324 +666 +475 +1723 +-6768 +-366 +6140 +-7466 +8426 +-7037 +-4443 +1820 +7428 +-4579 +-527 +9897 +8852 +6841 +6518 +-7205 +-6704 +-6036 +-6626 +803 +-5219 +3371 +789 +-8454 +7471 +5728 +9019 +5627 +-4441 +4373 +-2224 +-1559 +7588 +-8173 +6699 +-4375 +-7663 +7830 +4548 +-7353 +-2144 +5707 +-3496 +-3492 +-6969 +4029 +5693 +2704 +-5860 +8818 +-7120 +9336 +-859 +-4029 +7539 +413 +-3783 +423 +-9159 +2470 +-5370 +-9267 +-5403 +-9079 +-9153 +3047 +2981 +-4008 +-5207 +-9912 +5858 +-4782 +7515 +-6663 +-1934 +-1369 +-7012 +2161 +-9647 +6914 +-8135 +-5381 +5818 +-251 +4447 +-6701 +-8801 +-5423 +-3718 +3226 +3110 +-773 +70 +3669 +-6403 +-502 +-4825 +7087 +3745 +-2301 +1235 +5839 +6176 +3133 +745 +-3202 +5795 +-4438 +-8206 +-241 +7535 +1207 +8004 +-3289 +-4838 +5291 +-2624 +-6398 +934 +8736 +-4528 +9953 +1860 +-2826 +-3706 +-6736 +5279 +-4645 +7584 +4324 +-795 +-8990 +2084 +5648 +9914 +1498 +157 +-5094 +9321 +-6491 +4090 +4989 +6304 +240 +2785 +-6335 +1084 +6658 +-5321 +-1142 +8724 +-4059 +775 +1415 +-7555 +-8224 +1503 +14 +5067 +-6427 +-631 +-4116 +6157 +-1940 +-3324 +-1305 +305 +-9592 +9259 +7667 +-486 +-7349 +-3363 +626 +-7453 +-4746 +5285 +-1837 +3253 +5962 +9945 +1058 +-6884 +-584 +7701 +-7853 +-1907 +8054 +-4529 +-5538 +8824 +-45 +4613 +2417 +104 +-9083 +8564 +-1499 +-6339 +-8900 +-6019 +2811 +4049 +8648 +-8864 +-7889 +5480 +-631 +-6055 +2934 +4937 +9332 +8925 +7796 +-7563 +5132 +-2638 +-9100 +-6966 +-3235 +8891 +-7130 +5740 +-5792 +-5345 +9332 +7539 +5691 +8204 +19 +-4517 +2694 +5173 +-7130 +5289 +-6323 +1296 +5288 +-2064 +9839 +4332 +-5145 +7723 +-588 +5753 +-7666 +7287 +-4356 +-794 +-6259 +-8718 +-8230 +8479 +-5029 +1274 +-4582 +-8266 +-1692 +-9199 +-3848 +-7688 +3466 +769 +6532 +498 +-2027 +9023 +5343 +7255 +8474 +5383 +7328 +5723 +3722 +-7257 +-6808 +3879 +-4593 +-8424 +9211 +-3735 +-7326 +-8493 +7555 +-9798 +-3213 +6024 +3579 +-2061 +6106 +-5489 +8576 +-3725 +3704 +1854 +-9157 +9678 +7814 +9505 +34 +-621 +9321 +4272 +7409 +-9116 +-7977 +-2693 +-2606 +-3821 +-1649 +2623 +1678 +8462 +3594 +2156 +-6396 +-493 +7656 +6172 +1880 +6297 +-5156 +970 +-6433 +-9173 +-8181 +-2156 +-2787 +-7115 +-2607 \ No newline at end of file diff --git a/day20/testinput b/day20/testinput new file mode 100644 index 0000000..5cbf3d9 --- /dev/null +++ b/day20/testinput @@ -0,0 +1,7 @@ +1 +2 +-3 +3 +-2 +0 +4 \ No newline at end of file diff --git a/helper/helper.go b/helper/helper.go index ca555fb..2e941b1 100644 --- a/helper/helper.go +++ b/helper/helper.go @@ -104,6 +104,20 @@ func Remove[T any](s *[]T, i int) { *s = (*s)[:len(*s)-1] } +func RemoveOrder[T any](s *[]T, i int) { + *s = append((*s)[:i], (*s)[i+1:]...) +} + +func Insert[T any](s *[]T, v T, i int) { + *s = append((*s)[:i], append([]T{v}, (*s)[i:]...)...) +} + +func Move[T any](s *[]T, srcIndex int, dstIndex int) { + value := (*s)[srcIndex] + RemoveOrder(s, srcIndex) + Insert(s, value, dstIndex) +} + func RemoveElement[T constraints.Ordered](s []T, i T) []T { newS := []T{} for _, val := range s {