advent2021

Advent of Code 2021 Solutions
git clone git://bsandro.tech/advent2021
Log | Files | Refs | README | LICENSE

input.txt (7670B)


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