From d5886e292a750a6b1826e5584abc54c2de252e6d Mon Sep 17 00:00:00 2001 From: Brett Date: Tue, 3 Dec 2024 00:54:55 -0500 Subject: [PATCH] ugh bad code wish i pushed yesterday --- .idea/.gitignore | 8 + .idea/Advent-Of-Code-2024.iml | 2 + .idea/editor.xml | 244 ++++++++ .idea/misc.xml | 7 + .idea/modules.xml | 8 + .idea/vcs.xml | 8 + CMakeLists.txt | 6 +- commit.py | 2 +- include/day1.h | 24 + include/day2.h | 24 + include/day3.h | 24 + problems/day1/input | 1000 +++++++++++++++++++++++++++++++++ problems/day2/input | 1000 +++++++++++++++++++++++++++++++++ problems/day3/input | 6 + src/day1.cpp | 31 + src/day2.cpp | 113 ++++ src/day3.cpp | 225 ++++++++ src/main.cpp | 38 +- 18 files changed, 2763 insertions(+), 7 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/Advent-Of-Code-2024.iml create mode 100644 .idea/editor.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 include/day1.h create mode 100644 include/day2.h create mode 100644 include/day3.h create mode 100644 problems/day1/input create mode 100644 problems/day2/input create mode 100644 problems/day3/input create mode 100644 src/day1.cpp create mode 100644 src/day2.cpp create mode 100644 src/day3.cpp diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/Advent-Of-Code-2024.iml b/.idea/Advent-Of-Code-2024.iml new file mode 100644 index 0000000..f08604b --- /dev/null +++ b/.idea/Advent-Of-Code-2024.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/.idea/editor.xml b/.idea/editor.xml new file mode 100644 index 0000000..822bae1 --- /dev/null +++ b/.idea/editor.xml @@ -0,0 +1,244 @@ + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..879a475 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..0a294a1 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index d1aee2b..56bdc98 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.29) -project(Advent-Of-Code-2024 VERSION 0.0.2) +project(Advent-Of-Code-2024 VERSION 0.0.3) option(ENABLE_ADDRSAN "Enable the address sanitizer" OFF) option(ENABLE_UBSAN "Enable the ub sanitizer" OFF) @@ -14,8 +14,8 @@ file(GLOB_RECURSE PROJECT_BUILD_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp") add_executable(Advent-Of-Code-2024 ${PROJECT_BUILD_FILES}) -target_compile_options(Advent-Of-Code-2024 PRIVATE -Wall -Wextra -Weverything -Wpedantic -Wno-comment) -target_link_options(Advent-Of-Code-2024 PRIVATE -Wall -Wextra -Weverything -Wpedantic -Wno-comment) +target_compile_options(Advent-Of-Code-2024 PRIVATE -Wall -Wextra -Wpedantic -Wno-comment) +target_link_options(Advent-Of-Code-2024 PRIVATE -Wall -Wextra -Wpedantic -Wno-comment) target_link_libraries(Advent-Of-Code-2024 PRIVATE BLT) diff --git a/commit.py b/commit.py index fb9d5cc..440e164 100755 --- a/commit.py +++ b/commit.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!python3 import subprocess import argparse diff --git a/include/day1.h b/include/day1.h new file mode 100644 index 0000000..8b2c95d --- /dev/null +++ b/include/day1.h @@ -0,0 +1,24 @@ +#pragma once +/* + * Copyright (C) 2024 Brett Terpstra + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef DAY1_H +#define DAY1_H + +void run_day1(); + +#endif //DAY1_H diff --git a/include/day2.h b/include/day2.h new file mode 100644 index 0000000..a82b26a --- /dev/null +++ b/include/day2.h @@ -0,0 +1,24 @@ +#pragma once +/* + * Copyright (C) 2024 Brett Terpstra + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef DAY2_H +#define DAY2_H + +void run_day2(); + +#endif //DAY2_H diff --git a/include/day3.h b/include/day3.h new file mode 100644 index 0000000..76e753e --- /dev/null +++ b/include/day3.h @@ -0,0 +1,24 @@ +#pragma once +/* + * Copyright (C) 2024 Brett Terpstra + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef DAY3_H +#define DAY3_H + +void run_day3(); + +#endif //DAY3_H diff --git a/problems/day1/input b/problems/day1/input new file mode 100644 index 0000000..cb6af3c --- /dev/null +++ b/problems/day1/input @@ -0,0 +1,1000 @@ +14764 28773 +59598 86587 +63147 83451 +40514 98156 +87534 16479 +45973 70030 +54965 61736 +74648 96398 +74806 54303 +59928 90661 +20699 66537 +78761 92340 +98940 65476 +80802 95605 +60992 14776 +50682 24755 +50058 93707 +94284 24755 +12156 11378 +12570 11246 +80932 42425 +43285 34499 +12178 60368 +42769 14776 +84125 76989 +96147 56013 +59913 97498 +96516 73501 +50544 14989 +61563 30781 +77558 24755 +42975 16439 +15144 48888 +58682 54556 +26702 28773 +70122 84904 +63011 21879 +35169 61029 +24755 17273 +82821 84904 +72828 31150 +79206 14776 +33200 20410 +60784 31612 +83670 47240 +34804 33091 +60626 38038 +86976 14776 +52742 73610 +14475 89997 +38361 86278 +13676 47791 +55862 38300 +49359 88343 +65399 50107 +37680 70002 +18748 70030 +18194 60295 +47721 87961 +88751 81703 +43668 87575 +98122 81412 +40374 59406 +10728 70002 +16342 87961 +39219 60134 +49679 38882 +60516 42195 +24012 66048 +25680 58634 +43100 28773 +25474 63592 +96520 14989 +57777 48481 +79027 93493 +11616 31094 +78378 70069 +84632 41501 +56086 13252 +42233 14000 +91310 34109 +30039 70635 +51428 33091 +74252 27409 +47188 50437 +67840 82887 +51822 38041 +61288 11754 +28673 95998 +84464 18379 +19745 14989 +76538 69263 +48693 48158 +25824 26564 +47422 26702 +63260 55162 +50610 20088 +11246 14776 +36616 96398 +48715 37866 +40501 87961 +84018 11246 +11235 95605 +60766 84099 +56833 10632 +26052 24115 +86850 63187 +96807 97498 +36028 14776 +28835 44350 +80413 14989 +23361 94328 +73994 70570 +95782 14989 +50992 96398 +16452 24559 +23476 26026 +48928 20088 +65743 30914 +23934 97498 +44641 85863 +19631 73108 +95142 58795 +98765 54626 +63049 20977 +18870 96398 +39312 32124 +19723 24115 +75131 99521 +15390 25186 +73207 10585 +14040 51560 +29954 68086 +38712 70030 +85468 86587 +95155 85042 +67412 98156 +41035 94284 +83320 48158 +90483 86587 +56827 49101 +75118 26702 +41487 57022 +46320 14776 +66537 87961 +52715 83100 +38882 26936 +70814 43122 +70750 64345 +29589 44580 +37398 26936 +40837 70002 +16771 11659 +94208 28773 +87906 97482 +74664 86587 +90116 87961 +99992 14989 +34113 81703 +89349 24115 +98148 62403 +42448 66537 +96296 28773 +57152 68961 +11277 42577 +36095 95605 +74684 28773 +33845 70570 +38158 14989 +15582 49424 +43600 11804 +63053 13761 +24342 76970 +92512 70030 +54252 30763 +73129 84904 +28773 12682 +32819 91123 +49835 86136 +16933 48639 +33213 12919 +10645 57366 +98251 65105 +52576 92477 +69406 30133 +67892 97797 +72483 26702 +17769 33091 +56789 53884 +14989 98156 +24140 97478 +18359 90471 +12073 91310 +38574 55162 +33091 74847 +89381 14213 +49449 91310 +64091 70030 +39247 42425 +25923 14989 +71251 68086 +24345 96398 +51558 79525 +96411 47119 +89958 70570 +76933 62218 +55949 70002 +43038 17285 +28551 26702 +95390 18863 +14866 46054 +88996 66537 +26075 21233 +39333 24115 +76335 97498 +99707 53061 +42177 90193 +14331 14776 +50227 38217 +78702 65884 +68910 87030 +46977 11246 +48214 96398 +51071 63952 +10391 33023 +46218 70030 +87713 79687 +57826 54282 +39480 97498 +64702 58553 +30861 51958 +22562 20088 +87627 28773 +68916 98156 +57407 88060 +29689 23857 +65454 98968 +15700 37327 +26803 95605 +15017 29068 +40380 60403 +69860 26248 +66059 88561 +58318 38541 +17839 28773 +79014 14989 +33520 24755 +81719 99646 +97850 30945 +89786 33091 +38928 38882 +93407 94284 +69408 48928 +37881 70002 +32254 43523 +68247 28773 +54752 89267 +29214 20088 +98248 98156 +58405 14989 +19932 93969 +95299 11246 +34948 70635 +35574 70002 +61738 80387 +98156 84904 +70128 66075 +44319 37979 +24280 27624 +36470 47223 +62315 42425 +32292 56201 +52245 45780 +70839 32043 +34787 78810 +67967 21147 +47767 86498 +88861 60623 +81588 82803 +57939 81703 +31732 94284 +46639 74596 +39121 76377 +10454 94284 +46701 27665 +80935 48158 +93418 99233 +86078 49136 +55356 72518 +51235 48158 +94312 89985 +18379 76636 +82631 46202 +73383 72296 +30654 74007 +82162 80836 +81614 56019 +26936 14776 +64866 64944 +10826 89173 +85362 73676 +39371 46554 +68384 28773 +87889 38587 +14856 56658 +99573 51530 +91777 78669 +95150 97498 +49111 26038 +60208 97704 +69664 24755 +27678 84904 +48916 78231 +15557 89973 +90782 20088 +87961 84904 +42368 26702 +40844 81703 +40750 66537 +13745 87961 +20088 24115 +31234 63276 +17198 25020 +67865 53558 +16266 19730 +64250 15511 +34405 95190 +69368 81775 +90053 31704 +65374 97498 +91614 69998 +70733 62921 +48158 92224 +99303 26702 +51318 20088 +24507 70570 +21139 24682 +62476 16854 +35217 94943 +38613 85127 +65794 23397 +43762 98156 +38914 26702 +93827 95605 +18121 83482 +44552 70570 +94358 70635 +44248 87279 +93340 91862 +47094 80019 +12115 22286 +61446 66475 +22034 81703 +13882 64607 +42845 56734 +14983 98703 +42881 38664 +69071 58912 +84078 87961 +77528 28773 +65018 26702 +80503 27258 +40534 98156 +97419 27317 +61450 61386 +44217 78513 +35342 55289 +60439 70002 +72059 70570 +76006 70570 +86878 40854 +58404 38860 +49034 23075 +55592 38032 +38344 16697 +53897 33091 +72649 18979 +59214 18944 +92474 69727 +56370 36522 +20573 20088 +26285 11559 +15809 43925 +56727 92121 +84539 96398 +55090 41104 +77753 83370 +78169 44330 +62175 84776 +61410 67693 +26872 94284 +80145 33677 +63895 27014 +54436 94284 +27551 52234 +70275 97498 +83218 84328 +76355 42630 +47953 29593 +40172 70635 +29988 57720 +84694 45868 +14741 84904 +78418 32122 +19787 96398 +97191 75785 +62241 14110 +38111 49908 +16878 95565 +65882 87961 +27528 30687 +24926 66537 +66319 86032 +71326 82785 +33060 79631 +80025 17963 +73714 96398 +33135 74777 +68453 48928 +97498 24115 +86671 18667 +71089 40231 +88441 26416 +69505 18247 +84654 87513 +68724 98903 +89841 28773 +56212 21616 +17426 80476 +44666 38523 +91211 26702 +26105 70635 +21759 14776 +98944 26362 +71236 38797 +42913 58775 +88578 14776 +72715 43283 +28967 20088 +84103 76725 +99695 48928 +64085 28773 +73316 33493 +72198 48928 +49559 70002 +38910 48928 +17599 42425 +84904 78946 +22276 55162 +58705 96924 +49033 55841 +57127 69408 +14022 70002 +64371 26702 +97436 54477 +30953 95848 +52677 10733 +62159 48928 +88481 55753 +81171 66537 +57638 46475 +61383 79886 +88427 24420 +96594 50213 +11462 90266 +67963 73678 +17744 66537 +79612 95605 +93100 30264 +32749 20088 +94436 75277 +45034 39394 +51810 84904 +43770 87961 +59487 84904 +73654 20088 +76244 39669 +93096 41969 +61078 18532 +64038 68086 +80823 20926 +24219 33166 +64789 47154 +45656 59480 +96245 26702 +46975 96398 +21791 21720 +36832 25932 +40413 90256 +35647 56771 +85109 69081 +96428 95605 +63398 98448 +86469 81278 +34738 54568 +58332 69690 +29366 38882 +43612 26582 +20715 13081 +13296 22608 +73338 65201 +39693 75574 +55258 87961 +72724 68868 +78654 50140 +85411 31891 +60178 64075 +67363 80960 +37379 96429 +40440 52965 +82070 48657 +22042 17036 +77928 49874 +16662 96398 +39080 72090 +36754 90110 +52253 13816 +63630 48928 +68957 70819 +45100 25633 +82085 27847 +17126 28773 +37291 97173 +57062 11246 +12567 71707 +51113 75861 +89899 26702 +99628 26702 +75520 81811 +93558 13940 +49113 62910 +20958 87961 +77841 87019 +75297 48928 +57790 48928 +32002 77033 +42282 94284 +43678 84904 +31604 49493 +74565 28773 +22599 31143 +82887 59506 +39004 54574 +78978 79120 +90292 39855 +95502 99786 +21111 70626 +56784 92396 +13139 80974 +92819 25441 +73536 87961 +29862 24755 +99684 73955 +72968 89889 +13389 24733 +11304 81703 +21283 96196 +29316 10170 +39855 52810 +87865 93597 +97638 24115 +65813 70719 +60400 31888 +28931 32564 +39635 69408 +53198 87575 +26868 87575 +76903 38317 +65814 97018 +30920 33091 +17272 86587 +36064 40874 +60497 86587 +52751 94284 +98146 20555 +82591 71240 +80940 94284 +58866 60084 +19528 96398 +50171 42425 +83139 14776 +54987 84299 +86114 91310 +95215 20088 +33676 91776 +33258 84904 +94339 14989 +93998 30882 +12128 48129 +70002 20088 +17360 55991 +53459 95355 +86002 70002 +82138 79394 +77891 97498 +97857 56980 +80792 63735 +25421 58294 +35922 12614 +81854 32809 +53275 35517 +57944 58635 +87461 63921 +18830 65741 +71991 21238 +20578 14989 +30318 93736 +47800 78875 +70513 70570 +19497 23690 +85084 95631 +22048 86587 +81414 55666 +80731 69207 +18973 59682 +94485 48928 +77316 13319 +12204 51966 +70689 33091 +34924 22911 +96610 19455 +55203 24115 +75093 48158 +87356 14999 +18221 33578 +73385 48928 +81742 58221 +99442 82887 +28678 80624 +35197 87961 +35467 94284 +18508 51523 +14264 54207 +31053 40807 +64587 56579 +31857 72079 +80498 95581 +73182 87575 +38534 55162 +19889 76201 +62987 35692 +28009 48158 +62366 13329 +67690 14228 +87575 13596 +75924 66537 +43917 48158 +85815 28141 +12195 66537 +28926 26936 +28067 11246 +10649 83782 +90300 37607 +26829 33091 +97237 61393 +28274 87961 +81949 69715 +10148 86587 +20782 82454 +65121 86587 +35048 25761 +42425 98156 +49562 26702 +62240 64020 +97292 25754 +77339 95190 +96171 69408 +78515 44047 +23269 81703 +86257 11890 +53795 31884 +47860 69457 +27030 81703 +95995 46031 +88330 14776 +36227 95605 +71611 49839 +41787 68086 +98937 95605 +15634 78884 +38019 25226 +40301 68031 +64868 55162 +20353 28773 +52004 20088 +33605 36752 +52954 97498 +22677 92974 +35007 86399 +16229 14776 +92840 67007 +53192 70030 +14342 89825 +83874 20965 +67836 23984 +13168 89395 +45532 99100 +28527 26702 +11652 24115 +65046 72711 +24115 22371 +15313 14989 +46692 26702 +55036 14776 +47509 96398 +79999 58058 +75429 27911 +86289 83776 +40994 86587 +23698 49671 +60630 70567 +39923 14340 +41480 56160 +50015 85965 +20119 27795 +54647 79989 +32724 20334 +34408 48928 +13854 58826 +75114 43950 +45654 66537 +35904 14776 +97510 94203 +94288 70002 +62816 86587 +52333 95190 +56575 33091 +16125 96398 +72085 22071 +79557 70570 +88132 51844 +13717 72028 +59557 48158 +21409 10973 +84192 80904 +55868 24115 +84432 44699 +36959 87575 +76847 55162 +22567 24115 +67194 20088 +10465 86045 +30706 90300 +90253 64531 +75677 70115 +90677 80124 +16022 37893 +35712 73458 +49005 66248 +63561 62138 +39451 26233 +23062 75780 +88457 16642 +60392 76302 +10273 86587 +21677 70570 +36650 95605 +99569 14989 +70030 94284 +17260 81703 +26866 97440 +96514 96034 +96398 85529 +28702 79102 +79651 61560 +94067 31196 +71869 73932 +57996 50145 +35350 89987 +74905 77610 +42941 11246 +87385 28773 +32235 86698 +33758 84904 +75879 56926 +22019 92584 +21649 37986 +55926 84525 +74822 21112 +37702 70635 +62444 94284 +17072 12964 +80776 14776 +86143 84904 +90967 59199 +82007 95190 +61344 94380 +23060 62759 +71836 29181 +16696 86051 +23602 70030 +61274 61768 +35327 94433 +48285 55162 +19775 18482 +79268 18379 +66437 24755 +66155 44810 +54687 47121 +47590 10505 +49604 87575 +39448 14989 +70866 91310 +40876 88016 +38356 82887 +78821 87795 +60336 84904 +95020 18379 +92719 38882 +44432 70635 +55162 20864 +20330 57239 +68086 28020 +27630 63281 +86610 69601 +11026 90977 +88395 58295 +51282 39771 +27597 95605 +92765 48928 +75775 87961 +70635 94284 +24241 87961 +61618 20088 +16337 50458 +98080 39551 +28091 48158 +65880 66493 +24832 48928 +32253 27393 +27035 41482 +34239 96262 +31294 26702 +10102 12198 +36743 78333 +23284 75787 +87169 75720 +84151 87961 +26666 79650 +89818 40672 +70570 65623 +81552 84522 +56875 78429 +15373 28773 +77993 34110 +36591 96398 +61768 42887 +71478 68504 +25433 96100 +98896 81958 +93352 28773 +43847 93400 +60150 66441 +80559 70002 +45453 60573 +11057 26011 +40296 63705 +30537 95605 +95190 10399 +58593 11246 +23634 58654 +19831 48928 +60897 52279 +98886 87961 +18897 52942 +53785 10405 +58898 24115 +58346 24755 +42098 31963 +83994 80991 +22205 55162 +74702 66537 +95807 26702 +23781 92776 +49996 66296 +72776 81703 +31849 70570 +52068 87294 +98819 59638 +32585 48158 +51597 85464 +85824 75556 +27722 57980 +71157 14989 +43341 46516 +45946 45375 +20545 48928 +73393 32160 +13910 97316 +79218 96398 +44035 88007 +15597 79600 +15662 70002 +34269 49123 +37898 98156 +40216 26702 +92831 87961 +77463 70570 +89751 84904 +56728 88267 +55828 45038 +99410 96962 +27691 22801 +10416 70570 +47279 91310 +50204 14776 +56597 40834 +77705 43023 +72403 33091 +36921 51477 +62196 36387 +39460 42518 +86502 37844 +88097 38882 +62899 57280 +63482 20088 +51582 24115 +82873 70570 +81897 84904 +70932 24115 +47617 78694 +17894 48126 +66191 20440 +11809 14989 +28873 70002 +26808 98156 +57387 79775 +54906 33091 +51853 14776 +48424 84904 +62763 27546 +73121 54587 +95605 48158 +61687 86587 +31005 97498 +78477 78372 +35623 84904 +20589 77307 +78283 40059 +94194 43725 +44078 67834 +81703 31282 +99920 59468 +22742 37828 +55795 12750 +27345 14989 +91944 45458 +30545 19535 +20030 70570 +25018 69169 +12044 13251 +91516 82887 +91683 16178 +27731 86587 +80834 21540 +56421 26695 +60139 70002 +28612 95499 +75264 11246 +64380 66537 +56560 26702 +18126 47523 +71350 31211 +25426 65619 +24228 83125 +45887 70570 +10621 11246 +89105 70570 +53390 49454 +57017 81703 +76370 94284 +60258 85023 +51705 96398 +15492 37504 +55450 96398 +65708 91167 +37078 83486 +14776 10500 +99794 86587 +50029 87365 +47006 35798 +87658 85900 +80839 90300 +88943 94078 +33451 28773 +91207 86587 +33560 48158 +80832 43682 +86587 16558 +34637 42425 +40252 22905 +94463 63284 +13247 72402 +14825 48158 +60196 91310 +45730 14776 +85407 18493 +19771 50847 +30506 24755 +32174 68086 diff --git a/problems/day2/input b/problems/day2/input new file mode 100644 index 0000000..f5116f0 --- /dev/null +++ b/problems/day2/input @@ -0,0 +1,1000 @@ +45 47 48 50 51 52 54 51 +23 26 27 30 30 +40 41 44 47 49 51 55 +12 15 18 19 26 +78 81 83 84 83 84 +5 7 10 7 4 +28 30 32 29 29 +65 68 70 73 76 78 75 79 +5 7 8 6 9 10 12 17 +63 64 64 67 68 71 +34 37 38 39 39 40 37 +72 74 74 75 76 77 77 +57 60 61 62 62 64 68 +12 14 15 16 16 23 +82 83 87 90 91 93 95 96 +25 27 31 32 29 +20 21 23 26 30 30 +34 37 38 42 45 47 51 +24 27 30 34 40 +10 13 15 16 18 20 26 27 +76 78 83 86 83 +49 51 56 59 60 62 62 +27 28 29 32 39 43 +55 56 62 63 66 73 +21 20 23 25 28 29 30 +79 77 80 83 85 86 87 86 +29 26 28 30 30 +48 47 50 53 55 57 59 63 +12 10 13 15 16 17 19 26 +50 49 51 52 50 52 +87 86 87 86 83 +60 59 60 59 61 61 +32 30 33 30 34 +44 41 39 40 41 48 +27 26 28 28 31 33 +16 13 16 16 17 19 21 19 +39 38 38 40 42 44 46 46 +57 56 58 59 61 64 64 68 +47 44 46 48 48 55 +16 15 19 22 23 25 +11 8 9 13 15 16 13 +4 2 6 8 9 9 +15 14 16 17 21 25 +37 34 38 39 41 46 +88 85 92 93 94 +83 81 83 85 91 93 91 +40 37 40 42 47 48 48 +72 69 70 72 74 80 81 85 +18 17 19 21 26 28 33 +39 39 42 43 46 +53 53 54 56 58 59 57 +80 80 81 84 84 +73 73 75 78 80 83 86 90 +74 74 77 79 80 86 +78 78 81 83 82 85 +24 24 22 24 22 +28 28 31 29 30 30 +62 62 65 63 64 68 +49 49 52 49 52 55 61 +85 85 85 87 89 90 92 95 +6 6 6 8 6 +75 75 75 78 81 84 85 85 +74 74 75 77 77 79 83 +21 21 22 22 28 +80 80 83 87 88 89 +66 66 68 72 74 72 +86 86 87 91 94 95 95 +62 62 65 68 71 75 76 80 +41 41 44 45 46 49 53 58 +31 31 34 35 36 38 44 46 +83 83 86 87 89 95 98 96 +31 31 32 35 41 41 +79 79 81 84 85 90 92 96 +69 69 75 77 78 85 +55 59 60 61 62 65 +81 85 86 88 87 +57 61 63 65 67 68 70 70 +3 7 9 12 16 +36 40 43 45 52 +2 6 7 9 10 9 11 +69 73 76 73 72 +54 58 61 64 62 63 63 +18 22 20 21 25 +55 59 57 60 67 +51 55 56 56 57 +6 10 13 13 12 +26 30 32 32 35 38 40 40 +54 58 58 59 63 +14 18 19 22 23 23 26 33 +45 49 52 55 59 60 63 66 +52 56 58 61 65 68 65 +1 5 7 11 12 12 +61 65 66 67 71 75 +62 66 70 73 78 +21 25 32 33 34 36 38 +56 60 61 64 70 73 71 +25 29 34 35 35 +31 35 41 44 47 51 +2 6 8 15 22 +53 60 61 63 66 67 68 +70 76 77 80 83 81 +10 17 19 21 23 25 25 +8 14 15 16 18 20 24 +42 47 49 52 54 55 57 62 +9 15 14 17 19 20 22 +14 21 20 22 20 +70 75 73 74 74 +86 91 90 92 96 +33 38 39 38 44 +73 79 80 80 82 +81 87 89 89 91 94 91 +63 70 70 72 72 +72 78 78 79 83 +8 15 15 17 19 25 +60 66 69 70 74 75 77 79 +19 24 25 29 28 +28 34 38 40 42 42 +24 31 34 35 39 43 +11 17 18 21 25 28 34 +63 69 76 77 78 +28 35 37 43 41 +71 78 79 84 85 87 90 90 +25 31 32 33 36 41 45 +36 41 42 43 48 53 +37 36 35 32 29 32 +25 23 20 17 16 13 13 +33 31 30 27 25 22 20 16 +47 45 43 41 39 33 +15 12 11 8 11 10 +63 60 58 59 58 57 56 57 +5 4 3 2 1 4 4 +58 56 53 50 49 51 50 46 +88 85 84 86 80 +47 46 45 45 43 41 39 +45 42 39 37 36 36 37 +69 68 67 66 65 62 62 62 +83 80 80 78 75 71 +37 35 32 29 29 28 23 +34 33 29 28 25 +51 48 46 42 40 42 +65 64 61 57 56 54 54 +52 49 45 44 41 37 +48 46 44 41 37 32 +59 56 55 52 51 44 42 40 +40 38 36 34 31 25 23 26 +93 91 88 83 83 +44 43 42 40 34 31 30 26 +86 84 83 77 72 +83 84 81 80 77 76 74 73 +14 15 14 13 11 8 7 9 +74 75 74 73 71 68 68 +52 53 52 49 47 46 42 +20 21 19 18 17 16 11 +63 65 64 61 64 63 +62 64 63 60 62 64 +36 37 35 36 33 31 31 +70 72 73 72 70 68 65 61 +30 31 33 32 26 +14 17 17 15 14 13 11 +28 31 31 29 28 31 +33 36 36 35 33 32 32 +79 81 81 78 75 74 73 69 +78 80 80 79 78 72 +71 72 71 67 64 63 60 +81 82 81 80 76 79 +62 63 59 58 57 57 +82 84 83 81 78 77 73 69 +76 78 74 71 65 +56 57 50 48 46 44 43 40 +96 97 95 92 90 84 81 84 +70 73 66 65 64 61 58 58 +34 35 28 27 26 25 21 +47 49 46 44 41 34 33 27 +97 97 95 92 90 88 87 +47 47 45 42 44 +70 70 69 68 65 64 64 +13 13 10 7 3 +83 83 80 78 77 72 +14 14 17 16 13 11 10 +76 76 74 77 74 72 71 73 +31 31 29 28 26 27 27 +80 80 77 79 76 73 71 67 +19 19 17 20 19 12 +28 28 25 23 23 20 18 17 +86 86 84 81 78 78 79 +36 36 34 34 31 30 30 +75 75 75 74 72 71 67 +55 55 55 52 47 +64 64 60 57 56 +80 80 76 75 74 72 73 +56 56 52 49 49 +31 31 28 24 20 +68 68 67 63 61 60 53 +43 43 38 36 33 32 +72 72 70 64 66 +40 40 38 32 30 30 +37 37 34 33 31 25 24 20 +62 62 60 55 50 +30 26 23 22 19 17 +94 90 87 85 83 81 78 81 +62 58 55 53 52 52 +90 86 84 83 80 76 +98 94 92 90 85 +47 43 40 38 37 40 39 +39 35 37 36 37 +76 72 69 68 65 64 65 65 +26 22 19 17 19 18 16 12 +42 38 36 39 34 +93 89 86 86 85 82 81 +47 43 40 38 37 34 34 36 +63 59 59 56 56 +70 66 65 63 63 60 56 +95 91 88 86 86 85 78 +43 39 36 32 30 +22 18 15 12 8 7 8 +78 74 73 70 66 64 61 61 +37 33 32 28 27 24 23 19 +30 26 25 22 18 16 9 +75 71 66 64 62 59 56 55 +50 46 45 44 38 35 32 35 +82 78 77 76 69 67 67 +64 60 53 50 48 47 45 41 +90 86 84 83 82 77 76 69 +54 49 48 45 42 40 39 38 +76 70 69 66 65 64 62 64 +12 5 4 3 2 2 +49 43 41 38 37 34 30 +95 90 89 86 85 80 +82 77 74 72 71 73 70 68 +50 44 43 42 40 38 40 42 +51 44 42 45 45 +22 15 17 15 11 +32 26 25 27 26 23 17 +32 27 27 25 22 +43 36 36 33 35 +74 68 66 63 63 60 57 57 +45 40 38 38 35 31 +64 57 56 53 53 50 49 42 +92 87 83 82 79 +55 49 47 44 40 43 +34 27 26 24 22 18 18 +95 88 85 84 80 76 +76 71 67 64 62 56 +68 62 60 59 52 50 47 +28 22 19 13 10 13 +90 85 84 77 74 72 72 +81 75 70 69 66 63 62 58 +68 62 57 56 55 54 52 46 +73 76 79 77 76 73 72 72 +97 97 95 94 94 93 90 +67 68 62 60 57 56 58 +41 45 47 50 51 54 56 60 +75 75 75 76 73 +84 84 81 83 86 90 +11 11 6 5 1 +27 27 30 32 36 38 43 +57 53 51 50 48 44 44 +39 32 31 30 29 30 31 +89 93 94 94 96 +56 63 70 73 75 78 75 +48 46 48 52 52 +31 35 35 38 41 44 47 51 +96 92 89 92 88 +23 27 26 29 34 +45 41 40 39 40 38 32 +36 36 38 42 44 46 +66 65 66 69 70 72 77 +13 13 16 15 15 +78 76 78 79 86 87 85 +10 10 7 3 1 +52 49 51 56 60 +3 5 8 9 16 19 23 +13 18 22 23 23 +45 45 43 42 45 42 +73 66 65 63 66 63 57 +26 27 26 25 21 18 14 +28 28 29 31 33 39 +91 92 89 87 82 81 78 74 +88 88 91 91 94 95 95 +66 65 64 62 61 58 58 57 +50 45 44 38 36 39 +22 15 13 11 7 +39 38 37 40 45 +74 70 65 63 60 57 57 +26 22 21 21 20 19 19 +55 52 50 46 43 36 +77 76 74 75 71 +27 25 25 28 30 33 36 36 +67 67 68 70 71 72 75 75 +95 91 88 87 89 86 84 83 +6 5 9 11 13 14 15 +25 25 22 20 19 22 +80 76 74 73 72 72 67 +51 51 48 47 47 47 +23 16 13 11 10 10 7 9 +27 31 34 36 37 42 +72 73 76 79 81 80 84 +7 4 6 7 8 10 13 15 +19 21 19 15 18 +75 73 68 67 64 65 +85 81 78 77 76 72 71 69 +66 68 70 69 71 74 75 74 +28 27 24 26 29 +78 74 72 70 68 65 58 +91 84 82 78 77 +49 53 52 55 55 +52 54 57 60 63 62 64 +33 33 30 28 25 22 18 14 +99 98 94 91 88 85 83 83 +62 64 70 72 79 +28 28 30 31 31 32 36 +83 79 74 73 72 69 +49 53 57 60 61 62 63 +50 56 57 63 65 67 68 72 +77 84 81 84 81 +40 43 45 42 38 +58 61 64 71 73 +54 58 61 62 65 68 68 74 +7 8 11 14 18 21 23 +13 10 9 8 7 6 6 +38 41 39 37 34 30 29 26 +49 55 57 54 55 55 +78 75 76 75 75 +4 8 10 13 14 15 15 +79 84 85 88 89 89 86 +91 90 93 90 93 97 +33 32 33 38 40 41 +13 15 12 14 9 +48 46 48 49 54 54 +34 35 35 33 29 +38 40 41 45 50 +51 55 56 60 63 67 +30 33 35 38 39 42 42 48 +70 74 77 80 81 +14 12 14 11 13 +53 58 61 62 63 +13 13 12 9 6 5 5 +56 59 60 63 65 66 68 +16 14 11 9 7 4 1 +82 80 78 77 76 75 73 +33 32 30 28 26 24 23 21 +40 41 44 47 50 51 53 +22 25 26 27 28 +73 71 70 67 65 +37 36 35 34 32 31 +72 70 67 64 61 60 59 +6 9 11 12 15 18 20 22 +81 83 84 86 88 90 +12 13 16 19 20 23 +62 64 67 69 72 75 +19 17 16 14 12 +76 74 73 70 68 67 66 63 +90 89 86 85 83 81 +13 16 19 21 22 25 26 29 +22 23 24 26 27 30 31 +28 26 25 23 21 20 17 14 +65 64 61 60 57 +20 23 24 26 27 28 30 +65 63 60 59 57 55 +57 56 55 54 53 +13 16 18 21 24 27 +58 55 53 51 50 +36 34 32 29 26 24 +82 79 77 76 73 +43 46 49 51 54 55 +29 28 25 24 21 20 19 +56 59 62 64 66 +48 45 42 41 38 35 +35 34 31 28 26 23 +44 43 41 40 37 34 31 30 +43 46 49 52 53 54 55 57 +63 64 66 68 71 +92 90 88 87 85 84 81 80 +62 64 65 68 70 72 74 77 +48 50 51 52 54 57 58 +21 24 26 29 32 33 36 39 +83 81 79 78 75 +6 9 10 11 14 16 17 +22 21 18 17 15 +18 17 14 11 10 8 +83 84 85 88 91 +32 31 30 28 25 23 +28 30 33 36 38 39 40 +21 19 16 15 12 10 7 +13 15 16 19 21 24 27 +17 15 13 12 9 +61 62 65 66 68 +32 30 29 26 25 23 +69 68 65 64 62 +66 68 69 70 72 +69 66 65 63 60 57 54 +50 48 45 42 39 +12 15 18 19 20 21 24 +87 85 83 82 81 78 +56 57 60 61 64 66 +58 60 61 63 64 +23 26 28 29 31 34 +6 7 8 9 12 14 +66 69 70 73 76 +68 71 72 74 75 78 81 +27 26 23 21 19 +25 26 29 31 33 36 38 +4 6 8 11 14 17 18 21 +41 43 45 46 47 50 53 54 +16 18 21 24 26 28 29 +59 56 55 53 50 48 47 +88 85 84 81 80 77 +8 9 12 14 17 19 +9 10 12 15 17 18 +69 67 66 63 60 58 55 +61 63 66 67 69 +74 73 71 68 65 +4 5 8 10 13 +47 45 42 41 39 +11 13 15 17 20 23 25 +69 70 72 73 75 76 +89 90 91 93 94 97 +32 29 28 27 26 25 +13 11 8 5 4 2 +32 33 36 39 42 45 47 +54 52 50 48 46 44 43 +17 16 15 13 10 7 4 3 +52 49 48 47 46 44 41 +18 21 23 24 27 +80 81 83 84 85 +76 74 71 68 67 +32 34 35 37 40 +10 13 15 18 20 21 +52 55 57 60 63 65 +30 31 33 35 38 +52 50 47 46 44 43 +19 22 25 28 30 33 36 38 +76 79 81 82 84 85 88 +67 65 63 62 60 59 57 54 +26 23 20 19 18 17 +83 84 85 87 89 +16 17 19 22 24 26 27 +53 54 56 58 60 63 64 65 +42 44 47 48 49 51 52 +31 28 27 25 22 +21 18 17 16 15 12 10 8 +41 43 44 46 47 48 49 52 +40 42 45 48 49 50 51 +31 29 26 23 21 18 16 +9 11 13 14 16 18 20 +21 18 15 13 10 +91 90 88 87 85 84 +57 60 63 66 68 69 +30 31 33 34 35 +62 61 60 58 57 55 +41 44 45 46 49 51 +66 68 70 73 75 76 79 +60 61 63 64 66 68 71 +35 32 30 29 27 24 +21 22 24 25 26 27 28 +53 54 56 58 59 +14 17 18 20 21 24 26 27 +13 12 9 8 7 +65 66 67 68 71 72 75 +50 52 54 55 57 59 +15 13 11 9 8 5 +9 10 12 13 16 +21 19 17 16 13 10 7 6 +84 83 80 77 75 72 70 68 +41 40 37 34 32 30 +19 16 15 12 9 8 +42 45 47 50 52 55 57 +65 64 61 60 59 +93 91 90 89 88 +4 5 7 8 9 11 13 +75 74 72 70 68 67 65 +36 37 38 39 41 +29 32 35 38 41 44 47 +50 51 54 56 58 61 +76 75 72 69 67 65 63 +75 78 81 83 85 +60 62 63 65 67 70 71 +88 86 83 80 79 78 +63 62 59 56 53 52 +14 16 18 19 21 22 23 +50 52 55 58 60 61 64 65 +50 49 48 47 45 43 41 40 +37 39 41 42 43 45 47 48 +93 90 88 86 84 81 +44 46 48 50 53 +18 20 23 24 26 29 31 +31 33 34 37 40 41 44 47 +26 29 30 32 34 36 +68 70 71 74 76 77 +65 64 63 62 60 59 57 56 +3 5 8 11 13 16 +37 36 34 33 32 30 29 +85 82 80 78 75 73 71 69 +91 90 88 86 83 +65 62 61 58 57 55 53 51 +56 57 60 62 64 +2 3 5 6 7 10 13 +63 62 61 60 58 55 +7 9 11 13 14 +58 55 52 51 50 +30 31 32 34 37 40 43 44 +57 58 59 62 64 66 68 +65 64 62 60 57 +65 62 61 59 57 55 53 +21 18 16 13 12 +48 47 46 45 42 41 38 36 +40 39 37 36 34 31 28 +84 85 87 88 90 91 92 94 +58 57 55 54 51 49 47 44 +41 43 46 49 51 54 +84 85 88 91 92 93 95 96 +16 15 12 11 8 7 4 +52 54 57 58 60 +48 45 43 40 38 37 36 33 +91 88 87 84 82 79 +88 85 82 81 80 79 76 +45 46 48 51 53 56 57 +43 44 45 47 50 51 52 53 +61 60 57 54 52 50 48 +89 88 86 85 82 79 76 +81 79 76 73 70 68 66 63 +84 87 88 90 91 93 +42 41 38 36 33 30 27 +49 50 53 54 57 58 59 62 +39 41 43 46 47 48 51 53 +85 86 88 91 92 93 95 98 +90 87 84 81 80 77 +64 63 62 59 57 +71 72 73 76 78 79 81 +43 41 38 37 36 +56 57 59 60 62 65 68 71 +45 43 40 39 37 34 31 29 +30 32 35 36 38 40 +90 87 85 84 83 +1 3 6 8 9 10 12 13 +52 54 56 57 58 61 64 65 +69 66 64 62 61 58 57 +89 91 92 94 96 98 +69 72 73 75 77 +76 73 70 69 66 +54 56 58 59 61 64 67 +34 33 31 30 29 28 27 26 +48 47 45 42 40 37 +69 72 74 75 78 81 83 85 +31 33 36 37 38 +43 45 46 49 52 +38 41 42 43 45 +76 79 82 83 85 +55 53 51 50 49 48 +17 18 21 24 27 30 33 35 +42 40 39 38 35 32 30 +33 30 28 26 25 22 +34 32 29 27 25 23 +12 13 15 18 19 21 23 +33 35 36 38 41 44 46 +42 43 44 45 47 +18 20 21 23 25 +27 30 33 34 35 36 38 +28 26 23 22 20 17 15 14 +84 83 82 80 78 75 72 69 +17 18 19 20 22 25 27 +68 71 73 74 75 78 81 84 +69 66 65 63 60 +50 52 54 55 56 57 60 +10 12 14 16 17 18 21 24 +72 74 75 78 79 81 84 87 +77 74 73 71 68 66 64 +75 72 69 66 65 64 62 59 +90 87 84 83 80 79 +60 63 66 68 69 72 +35 37 40 42 44 46 48 50 +61 60 57 54 51 +12 11 8 7 4 1 +15 18 20 21 22 24 25 28 +4 5 7 9 10 11 13 16 +98 97 94 93 91 90 +34 35 37 40 42 43 46 48 +14 16 18 19 21 22 24 +71 72 75 78 80 82 +49 47 45 44 41 40 +85 86 88 89 90 93 94 96 +81 78 76 74 73 72 +63 65 68 70 71 +62 63 64 67 70 71 74 +78 76 73 70 67 +59 58 55 53 52 51 +52 50 49 46 45 44 41 +81 78 75 74 72 70 +28 31 33 35 37 +50 53 56 58 59 60 +36 33 30 28 27 24 +92 89 86 83 82 81 78 75 +35 33 32 30 27 +2 3 6 7 10 11 14 15 +21 22 23 26 29 31 +31 28 27 24 21 18 +17 14 12 11 8 6 +71 70 69 66 65 62 61 59 +90 89 88 86 85 83 82 80 +9 12 14 16 18 21 23 +46 48 51 53 54 +71 69 66 63 61 60 57 +85 82 80 77 75 74 73 +51 52 55 57 59 62 64 65 +66 65 64 63 60 +54 57 59 62 63 +10 9 8 7 4 2 +53 50 48 47 46 43 41 +77 80 83 84 87 88 91 +78 81 84 85 86 88 91 94 +31 29 28 27 25 23 21 +6 8 10 13 14 +27 24 21 20 19 +16 14 12 9 7 +18 19 20 23 25 26 29 +26 28 29 32 34 35 38 +26 25 23 22 20 18 +28 31 32 35 36 37 38 +1 4 6 9 12 13 15 16 +52 49 48 46 43 40 +76 77 80 82 85 87 90 91 +41 44 47 48 51 53 55 +56 55 53 51 49 47 +75 72 70 69 67 +78 81 82 83 85 87 89 90 +20 17 14 12 10 7 6 +80 79 77 76 74 73 +32 33 36 39 42 +59 62 64 66 67 70 +33 36 37 38 39 40 +1 2 4 6 8 9 12 +25 27 30 32 33 34 36 +17 18 19 21 23 24 26 +33 36 39 42 43 44 46 48 +12 10 9 7 4 +79 76 74 71 70 69 +87 84 83 81 80 +36 35 34 33 31 30 27 24 +42 41 40 39 37 36 33 32 +43 41 40 39 38 37 36 33 +50 51 53 54 57 +64 67 68 69 71 +75 76 79 81 83 +62 65 66 67 70 72 73 +53 52 50 47 45 +26 23 21 20 19 16 15 13 +59 61 64 65 68 70 72 +69 72 73 76 79 +54 55 57 59 60 +38 39 40 42 43 46 49 +76 77 79 81 82 84 86 89 +83 86 87 90 93 94 96 98 +29 31 34 37 40 42 44 46 +64 63 60 57 55 52 +1 4 6 8 11 14 17 20 +39 40 42 43 46 +70 72 73 74 75 77 80 82 +18 19 20 22 25 28 31 +1 3 5 6 8 10 11 13 +55 53 50 47 44 43 40 37 +92 90 87 86 85 82 81 78 +73 72 70 67 64 63 61 +82 81 79 78 77 +37 35 34 32 31 28 27 26 +85 88 89 92 94 97 +87 84 83 80 78 75 +18 15 13 10 8 5 2 +3 6 7 10 13 15 18 21 +96 94 92 89 87 +48 46 45 44 41 40 38 +1 2 3 4 7 8 +25 27 28 30 31 34 35 +97 94 92 89 86 +79 76 74 73 70 +58 55 52 51 48 46 44 42 +85 84 83 81 78 75 74 +57 59 60 63 66 +75 78 79 82 84 87 +90 89 86 84 81 78 76 +60 62 64 65 67 +28 29 31 33 36 38 40 +78 75 72 71 68 66 64 +76 74 73 71 68 67 +57 55 54 53 51 49 47 44 +73 75 78 80 81 84 85 86 +82 84 87 88 91 94 95 97 +74 76 77 80 81 84 85 86 +20 21 23 25 28 29 31 +10 13 15 17 20 23 25 28 +38 41 42 45 48 51 +22 21 19 17 16 15 12 +60 59 56 53 50 48 47 45 +54 56 58 60 61 63 +37 38 39 41 43 44 46 +97 95 92 89 87 +75 78 80 83 85 87 +68 71 74 76 78 79 80 +55 54 53 51 48 +52 55 58 60 62 +40 41 44 46 49 52 55 +39 41 43 44 46 +36 34 33 31 30 28 +44 47 48 51 52 +38 35 34 33 31 30 +49 48 45 44 41 40 +23 26 27 28 31 33 35 +58 57 55 53 50 +39 41 43 44 47 50 52 +74 72 70 68 67 +8 9 12 15 16 19 22 24 +44 45 48 51 52 54 56 58 +25 22 19 18 17 14 +51 53 56 57 58 +21 19 18 15 14 12 9 7 +57 55 54 53 50 +22 21 18 16 13 11 8 +84 83 80 78 76 75 72 +32 30 29 27 24 21 18 17 +28 29 30 32 35 38 39 +69 71 74 76 77 79 80 81 +74 71 68 66 64 +70 69 68 66 65 +39 37 34 33 30 +85 86 88 89 90 91 92 94 +75 72 69 67 64 61 58 +56 59 61 63 64 66 +88 85 84 81 78 75 73 71 +54 57 58 60 62 63 64 +56 54 52 51 48 +36 38 40 41 44 +74 71 69 66 63 +85 86 88 89 91 +38 37 36 35 34 +40 39 38 37 34 32 30 +72 69 67 66 63 60 59 57 +38 35 34 32 29 28 25 22 +30 32 33 36 39 40 +62 65 66 69 70 72 75 77 +41 40 38 37 34 33 30 +14 11 9 8 7 4 3 2 +40 38 37 35 34 31 +93 92 90 88 85 82 79 78 +80 79 76 74 71 68 65 +56 58 60 61 63 66 +10 13 16 18 20 22 +6 7 9 11 13 14 +97 96 95 93 90 +17 19 22 24 26 29 30 +74 73 70 69 66 +39 41 42 44 46 +47 44 41 40 38 36 33 +77 78 81 82 85 87 88 +85 82 81 78 77 74 +60 57 55 54 53 +59 60 61 64 67 70 +65 67 68 70 73 76 77 +99 98 97 96 93 90 +97 94 91 88 85 83 +74 72 69 67 65 62 61 59 +23 24 26 27 30 32 +39 36 35 34 31 +16 13 11 8 6 +34 36 39 42 44 +81 78 75 73 71 68 +14 11 9 8 7 6 +89 90 91 93 96 97 +45 47 49 50 53 56 58 +8 11 12 15 16 19 20 +74 77 79 80 83 84 +55 54 53 52 51 +36 33 32 30 29 28 +77 76 73 70 68 66 +74 75 78 81 84 +34 32 31 30 27 26 25 24 +11 9 6 3 1 +74 71 68 67 64 63 60 +62 65 67 68 71 +52 53 55 56 58 61 +11 13 16 17 18 +77 76 74 73 71 70 67 65 +54 51 49 48 47 45 43 40 +17 14 12 11 9 +74 73 70 68 66 +36 39 40 43 46 47 50 52 +92 91 89 87 86 +79 76 75 72 71 +98 95 93 92 89 87 85 83 +7 8 9 12 15 17 +39 40 43 44 45 47 48 +60 59 57 56 53 52 50 +28 27 26 23 21 19 18 +40 42 44 46 48 50 51 54 +15 14 11 10 7 6 3 +23 26 28 30 33 36 37 +15 16 17 19 20 21 24 27 +43 42 41 38 37 34 +52 55 58 61 63 64 +76 75 72 71 68 65 63 60 +52 50 49 48 47 45 +68 70 71 74 77 +58 59 60 63 65 +56 54 53 51 49 48 46 +62 65 66 67 68 69 70 73 +11 10 9 8 7 5 2 1 +43 40 38 35 33 30 +77 79 80 83 85 87 88 91 +16 14 11 10 7 +69 68 66 65 62 +76 77 79 82 85 86 87 +17 15 13 10 8 +81 83 86 88 91 +42 40 39 36 33 30 +38 36 35 32 31 +47 46 45 43 41 +95 94 91 90 88 +5 6 7 10 13 +41 40 39 36 35 +65 62 61 58 57 56 +13 10 7 5 4 +69 72 73 76 78 +15 17 20 22 25 26 27 29 +5 7 8 9 11 +39 36 33 30 27 25 23 21 +73 70 69 67 64 63 62 +32 35 38 41 42 44 +79 80 83 86 89 92 93 96 +43 41 38 36 35 32 30 27 +48 49 50 53 54 57 59 +32 29 27 26 23 +92 91 90 89 87 85 82 +22 24 25 27 28 29 30 33 +20 22 23 25 27 +71 69 66 65 63 +43 41 38 35 32 29 +71 69 67 64 62 59 58 56 +61 59 57 55 52 50 48 +57 56 53 50 49 48 +78 77 75 74 73 71 68 67 +85 82 80 78 77 74 73 +18 20 22 25 27 28 +40 41 42 45 46 49 51 54 +23 20 17 16 13 +72 74 75 78 79 82 85 88 +39 42 45 47 50 51 53 54 +31 32 33 36 38 41 44 46 +30 29 27 26 24 23 22 19 +45 42 39 36 35 +76 74 73 71 68 +44 47 48 51 53 54 55 +48 46 43 41 38 37 +90 89 86 83 82 +59 57 56 55 52 51 +34 31 30 28 27 +39 36 35 32 31 28 27 +84 86 87 90 93 95 98 +95 92 91 88 85 84 81 +23 25 28 30 31 34 36 39 +7 8 11 13 15 18 +80 77 74 71 68 66 64 63 +36 33 30 27 26 25 24 23 +96 94 93 90 89 87 85 82 +18 16 13 11 10 8 +80 77 75 74 71 +82 80 79 78 77 74 73 +18 17 16 13 12 +91 88 87 85 83 +41 43 46 48 49 +74 72 69 68 66 65 +59 62 65 68 69 71 +44 46 47 50 51 +59 60 63 66 69 70 +26 25 24 21 18 15 +40 38 35 34 31 30 +84 87 90 93 96 98 +39 42 44 46 47 +22 25 26 27 30 +14 11 9 8 7 4 +81 84 85 87 90 91 +98 97 96 94 92 +79 76 73 70 67 64 62 61 +80 81 83 85 88 91 +91 88 87 86 83 82 80 +51 54 57 60 62 64 67 +34 32 29 27 25 23 22 21 +62 60 58 57 54 53 52 +16 19 22 24 27 29 32 35 +26 23 21 20 18 16 +15 14 11 8 6 3 2 1 +49 46 43 42 41 40 +52 54 57 59 61 62 +87 85 84 81 78 75 72 +77 76 74 71 70 69 67 65 +77 74 71 70 69 67 +66 68 70 73 74 +15 13 11 10 9 7 6 5 +52 55 56 58 60 62 65 66 +80 78 75 73 70 +88 89 90 93 95 +76 74 71 70 68 67 66 64 +87 84 82 80 78 +76 75 74 73 72 +73 74 76 79 80 83 +41 38 37 34 31 28 27 26 +17 18 20 22 24 25 +9 11 12 15 18 +29 31 33 35 38 +99 97 95 93 90 87 85 +91 88 85 82 80 79 +9 12 13 14 16 18 20 21 +84 81 79 78 77 75 74 +21 19 17 16 15 12 +67 65 64 62 59 57 56 +68 71 73 75 76 78 79 +68 70 72 73 74 76 +33 30 27 24 23 +22 25 28 30 32 34 +15 18 21 23 26 29 30 32 +73 70 69 66 64 61 58 +83 82 79 78 75 74 71 70 +76 75 73 70 67 +49 52 55 58 60 63 64 +33 34 35 38 41 43 44 +52 51 48 45 44 42 39 37 +91 92 93 95 97 +8 9 11 12 13 15 18 19 +64 63 60 59 56 54 52 51 +63 61 58 56 54 +18 16 13 11 10 +69 66 63 62 59 58 55 +19 18 15 13 12 +58 59 61 63 66 68 69 72 +23 26 29 32 34 37 +28 26 24 22 19 17 16 +66 69 72 74 75 76 +20 23 25 26 28 +3 4 5 8 10 +60 57 55 52 51 +15 18 19 20 21 22 25 +46 49 51 53 56 +58 56 54 51 50 47 46 43 +60 63 64 67 68 71 74 76 +4 7 9 12 14 15 18 20 +29 32 34 35 38 40 43 +21 19 18 16 14 12 +83 82 80 78 76 73 72 +64 66 69 71 74 75 +12 14 15 17 20 22 +76 75 73 70 67 64 63 62 +32 31 30 27 26 23 22 +61 64 66 67 69 +98 96 94 91 88 +44 42 40 38 36 35 33 31 +37 36 34 33 32 30 28 +25 27 29 31 33 36 +78 75 72 70 69 66 +47 44 42 41 40 37 35 32 +71 69 66 64 61 +16 15 14 12 11 9 8 +93 90 89 87 85 84 +49 52 53 56 58 +40 38 37 34 32 29 +97 95 94 91 90 88 87 85 +67 68 70 72 75 76 +35 32 31 28 25 +85 86 87 90 93 95 96 +41 40 38 37 35 32 29 28 +6 7 10 12 15 18 +86 89 90 91 94 96 99 +50 52 53 56 59 62 65 68 +50 51 54 55 58 60 62 +73 72 70 67 64 +7 9 11 12 14 17 18 19 +24 26 27 28 29 32 +78 75 73 70 68 66 64 62 +79 82 84 87 89 90 91 +46 44 41 38 37 35 33 31 +25 23 21 18 15 14 13 12 +4 6 9 12 15 +94 91 88 85 82 79 78 +15 13 12 9 7 4 +69 68 66 64 61 59 58 +40 43 46 47 49 +80 83 84 86 88 90 91 +53 50 49 48 47 44 43 41 +68 69 70 72 73 +56 55 54 52 49 +35 38 39 40 41 +44 41 38 35 33 30 29 +32 35 37 39 40 43 46 48 +16 15 14 11 10 9 6 +10 11 13 15 18 19 20 +37 40 42 45 48 49 +21 19 18 15 12 9 7 +68 70 73 76 79 80 +70 67 64 61 60 57 +49 52 54 56 58 61 63 +91 88 85 82 81 +23 22 21 19 17 15 13 +72 73 75 77 78 80 81 +73 72 71 70 68 66 diff --git a/problems/day3/input b/problems/day3/input new file mode 100644 index 0000000..3762ef9 --- /dev/null +++ b/problems/day3/input @@ -0,0 +1,6 @@ +why()}''(!how()$~mul(420,484) ]}}mul(218,461),]/select()mul(93,56)';$-;*#$mul(162,415)mul(556,374)when()~when()<[select()^<(@mul(561,946);mul(97,699)select()+%when()~who():mul(387,15)>mul(927,207)~>~when()*who()'do()mul(454,740)when()%from(),~@%]from()mul(54,688)mul(338,694)what()select()~!< <;+/mul(373,536)&+mul(505,931)why()[mul(457,381) >/ mul(800,67)why()~what()[mul(807,815)&$who()mul(667,529)&how(843,372)what()mul(636,823)?*who()mul(960,331)where()?mul(648,668)how()/who()why()!'mul(649,819)[~:how()&what()]{mul(857,238)%-mul(603,559)mul(511,89):mul(888,328)*how()$/}]mul(177,966)who(777,724)why();:;mul(211,756)]:}+mul(297,394)>^how();$[mul(603,264)mul(794,883)when()why()~&select()from())mul(446,859) & ;:>?*what()/mul(388,763);},?when()do()where())<->what()mul(974,397)+why()select()#@mul(137,814)@when()why()when(697,786)mul(897,431)^}}&mul(74,810)?<&~] '&$]mul(49,565)(>where())]/mul(926,812)mul(842,573) how()-mul(126,526) @mul(818,934)?select()}^what()who()from()}mul(240,118)!from()^@?what()mul(77,983)+$what()mul(736,950)$&%?why()select();mul(213,409)where()*&*what():>~when()when()mul(87,245)$^ what()]&#select()mul(558,637)why()!mul(695,929[;*)+??mul(896,494)when())who()select()^>+how(641,113)mul(374,932);^?:where()>mul(780,265)^#;+when()}}mul(218,272)@$#mul(892,55)[what()?~{'when()}mul(527,984) {>?-'+-:-don't()select()#;/?]''!mul(56,714)/why()>mul(819,178)*~[+}],mul(793,717)from(75,849)~-,+($/,mul(719,587)where()#:@;*$+#?mul(919,859)who()+what(), @;>mul(89,488)where()?from()#$mul(680,657)mul(619,642)?[+don't()$:]{select()$what()@mul(619,164)}!select()mul(528,754)mul(199,830)how()where()+from()/~$who()(mul(49,273(mul(32,974)do()*select()]mul(42,960)%@?:[##::mul(802,384)]{##where())what()[mul(610,271)how()#@>what()where()don't()'&)>mul%?mul(449,76)when()%[<{^mul(944,356)what()(*;<{$<~mul(476,918){who(){-mul(124,698);?who()who(610,775)what()'&mul(579,336)why()<{'mul(953,943):%mul(651,439)/who(870,472)from()select()( -] $mul(16,267)mul(865,452)!select()who(){)$%$mul(888,41)],when(737,918)[#@#'mul(655,759)}/$(?#do()when()how()mul(160,406)]$mul(392,433)([;!##^from()mul(56,722)what()*#%select()(>#mul(554,881)'mul(355,774)&/mul!~*)mul(32,426)where()[how()how()mul(160,991)(where()when()who()^{/why()mul(638,720)how()]]when()mul(617,160select()mul(728,694)+{why()mul(173,600)mul(846,617)?mul(630,82)select(450,31)mul(443,274){; ]when()-(#mul(274,844));];mul(69,98)how()(>#-select()%mul(121,360)!^! :<~why()#'mul(662,319):&%%%/;where(58,840)how()mul(140,256)#<$!when()how() <!(who()do()}!&?#(>why()~mul(914,702);who(222,816)how(){(&('^;mul(881,879)who()mul(930,525)when(),when()mul(882what()&from():where()select(){>?&mul(535,202)/[~'[?#<^mul(195,514)#!mul(69,391)!,why()[,#~!,select()mul(732,760'[^?-^]>mul(52,825)when()(^where()]select()@do()#why()mul(287,62),who() &why()mul(24,517)#) from()what()mul(411,475)what()who()~$&mul(963}*&^,what()mul(162,897)!@~~@mul(985,450):%}-$where())when()mul(164,716)mul(211,564);mul(886,158)where()% '~select()@select())mul(215,209)%from(){select()who()mul(310,717/^$why(414,216)#&,why()select()@mul(765,613)where()^#}#@when()who()@why()mul(320,608)*mul(572,911)do())>:&%;mul(172how())%when()+@%@<%[mul(279,942)%#*;('#mul(838,154)/?what()when()&;@%^mul(65,418)why(307,491)mul(252,964)#mul(428,463)@from()mul(463,946){&where(649,23)+&who()$?),mul(545,536)#how()$?do()?mul(799,451)->%@what()!~mul(685,980)why()<<{!,)[mul(542,862)?),]>mul(702,259)who()^@mul(563,554)}%:}]}-$how()mul(819,791)#do()#:[:(what()how()}&mul(753,669)<{] do() /where()~where()%*(mul(561,517)~@where(82,621)~&mul(21,397)%mul(585,719)]!$where())!^when()who()who(587,725)mul(694,254)'-[+>{:;mul(650,398)select()%mul(549,891)$: #-how())}}from()don't()what()#mul(90,910)mul(903,233)mul(547,208)[-:mul(368,116)what()>*{}select()mul(579,530)&?!/^mul(982,408))~;how()&mul(68,361)when()where() %)from()mul(830,253how(),mul(316,679)('/mul(147,773))what()')^+?mul(365,155)#}(who()mul(141,657,]@mul(437,176)where()':*%'')mul(420,497) +?)why(473,359)mul(550,773)why()who()%why()>;;)mul(47]{?mul(686,382)]&]%-)+&mul(540,547)how()mul(21,121)$[-/@mul(894,561)^why()~!''mul(76,341)&#why() mul(867,180)]@[@select()&why()^)mul(328,567)why()mul(500,955)mul(602,93)! #who()*~mul(395,822)?when()~[when():&what()from()mul(26,996)how()?from()[who()[how();,what()mul(127,564)+how()]>*)mul(326,149)}*mul(741,743)what()/-,where()select()$-mul(571,104)~mul(557,104)from()/]^&>how(){[don't()>#mul(243,161)what()mul(784,800)when()>%%^?]mul(969,40)what()$#why(201,806)+mul(287,102)mul(581,311)select()'who()@{^+why()mul(598,245))/?;${who(972,431)mul(766,217)select():}from()/when()/mul(746,688)?}@(<*what()mul{%#;from())from()why()mul(723,608)*]@{who()what()how():where()*mul(726,41)select();:what()~'how();~how()mul(352,571)>);from()]%don't())how()what()*]])who()what()mul(104,291)}:'why()where()what()<)!mul(294,381)[!~!@'mul(617,169)select()mul(597,322)@+:'<%@select()?from()mul(751,110)$^what(),?('who(375,411)mul(487,642)!$mul(602%?who()who()*why(517,725)who()%from()+mul(611,293)?where()who()*what()mul(572,491)%#^why()@why(559,20)mul(147,928@(how()$when();?{{;where()mul(235,699)]/don't()~>& mul(522,362)how()select()how()/,mul(808,332){@>mul(382,736)from()/%{mul(763,385)-&![+[-[mul(493,959)}$,what()%/}:mul(999,264)#:'what(923,646)how()mul,(({( !)^mul(774,947)mul(825,424)'when()&who(),?{'!:mul(645,624)({$}mul(755,196)how(256,304),^+mul(78,987)]mul(155,256)~mul(643,546)when()@;^&!%#mul(464,137)&{mul(549,85):#]}from()^where()from()from()*mul(471,24~$when()when()how(),mul(824,94)how()where()why() /&from()?mul(232,49)' *mul(587,107)[{why()[from()%when(17,197);]+mul(728,869)what()how():mul(85,612):)#;where(),>mul(992,351)mul(149,626)*;}]mul(185,920)mul(258,257)'how()]@select():( how()>mul(891,488)}when()${~how()mul(69,62)/;do()$;?how(548,712)%mul(163,414)&~do()$:where()select()*why()*/#,mul(245,774) ^where(458,665)] --what()mulwho())~'^?^don't()){}#&<]~mul(894,110)/mul(28,62)%^&*'?what()%select()mul(490,609)[do())$when()@{$] mul(446,48)}when()+:(>'[mul(975,915)mul(282,257)}mul(504,101)what()$)$select()mul(799,76)~/mul(157,178):%why()who() $>+mul(136,339)'-;[>mul(424,206)(-what()-why()#$mul(855,735)when()%]?when())#~*)mul(422,548)mul(403,999)'&( ')select()mul(262,876)&'&}^]what()'~mul(304,364)&)when(472,742)mul(923,176)mul(431,469) #;why(){?mul(330,297)mul(328,720,!from()who()how()[mul(92,961)where()>;mul(157,314-&{:>~{&^?mul(91,266)$~:[mul(875,759)?<$when()%,&[#mul(214,511)where()mul%,)@how()@ ]how()#&mul(506,250)how()from(){,,?]]&(mul(67,306) ^-do()mul(87,147) +#!/usr/bin/perl&~?mul(433,7)^select()don't()($who()>->{mul(572,795)>#}what()mul(428,863)#~mul(408,652)from()when() why()+/#@select()[mul(940,728)who()[how()mul(246,59) ;}+mul(498,374),:mul(489,557)mul(737,804)where()?@#&@where(623,413)!mul(328,754)~'?mul(612who():^$(mul(72,123)',&++who(208,919)mul(18&mul(575,80)when(835,393)why()when()select()mul(362,743>$from(95,887)%>&[;do()$]from()&-what(),who()@)mul:#why()?[':?~ ^mul(633,858)&where()where())#^-from(252,913)mul(126,973)%from()>- %mul(670,112)<%{from();)(mul(386,975)][#-@mul&)where()who(),mul(790,566)mul(542,715))mul(264,826',mul(935,548)how(),why()}(}mul(164,558)})select()who()@select()(mul(165,31)?>?;,~+*<$mul(341,516)%/mul(147%when()why(611,793)]mul(162,61)when()+how()'%why(409,154)mul(571,437)mul(522,596)/how()select()how(29,352)why()what():mul(467,537),how()]*^,%mul(974,626)~ $when()*select()+mul(424,960)from()(what() &;from()how() mul(332,298)+![where();select();from()(mul(613,817)^#when():;~;:)mul(632,893)how()>mul(211,720)how()!*+)]from()what(){mul(833,547);( /how(473,744)mul(614,72)~~#@select()how(),mul(324,924)~#'-;}?/mul(679,438)#@how()!mul(261,94)where()#~~mul(531,950),select()/+^>mul(387,794)$:{who()%!}mul(732,253)&why()mul(464,965)/mul(970,460) select()~mul(130,649)#mul(594,237)mul(715,98)mul(949,543)mul(341,112)$:mul(802,786)'who()%(*[>why(){how()mul(991,224)%mul(187,549)mul(780,836)from()!';!{&[mul(650,459)/]];select()#$select()^mul(273}># what()[(how()(mul(520,113)mul(616,814)mul(759,564)#}, /+)$)/mul;:^%~@mul(716,211)%who()what(),($mul(347,498)*-*&&mul(46,914)+;])>?mul(119,463)?%*-^+-*mul(281,195)*}mul(286,732#@,@when()*&:*>mul(945,971)-?mul(187,286)}how()^(how()where()don't()mul(156,64)},[why()?-/ when()mul(113,825)?)select()&?when(){mul(13,265)?~^,#how()mul(66,66)[{$ @?^^*mul(132,363)*}',-)what()/mul(373,957)when()mul(319,15)-%select()([+<:what()do()/$;)-]:@why();mul(597,465)-from()who()?how()where(){mul(836,692);[?,+<)mul(635,341)^;;why()+!(]mul(279,997):*'(^? mul(823,590))*'mul(822,370)?'-][what()*mul(953,604)mul(535,413),when()${+~)mul(484,759)mul(871,854)* {]>how(712,670),mul(373,823)+when()*{],#mul(159,820)[#^when()%&when()mul(799,36)+mul(315,321)&,when()%-]mul(548,25)select()&{why()from(197,262)]#?mul(358,469);'}mul(281,747)#why()mul(190,780);-/where()>mul(353,297)*why()[select()mulwhen()why()mul(578,187)*(mul(414,374)^~{when()mul(203,987)* when() (-#mul(441,105)from()+/mul(358,845));:where()from(308,392)){mul(886,76)@mul(675,177)where()when()]mul(380,191)when()('from()(select():mul(430,140);/select()how()mul(619,859)%#mul(606,253)/@*mul(40,538)>*]mul(989,612)!mul(765how(273,470)[why(630,394)what()how()what()mul(290,587)what()''?select()>>mul(916,886):($#);}};mul(743,103)/?&#what(713,97) when()-don't()^mul(164,643)+%$'mul(615,169)select():from(203,20);:&<( mul(643,22)when()+}({+from()mul(864,803)what(143,291)why()?select()who(596,912),]&do()where(18,622)*what()mul mul(668,272):how() when()(([*(mul(490,117)how()^ &don't()what()@where(){&mul(431,252),##>^%mul(928,524) +mul(508,343)mul(14,808))/&mul(247,330)@'{mul(759,514)%?[from()']why()what(886,988)-mul(777,371[^ ;,why()do()mul(378,492) ,+!)from(410,175)where()mul(799,619)mul]:{$select()@,;!mul(535,785)where()from()'$*who(740,392)where()(mul(140,345)}-who(823,81)}%mul(183,163)/mul(950,595)~{:%from()>from()when()why(86,638)mul(730,655$^{-}-,mul(938,511)$who(){}~'$mul(659,791)#^mul(339,535) %:@why()}mul(57,448)who()')mul(863,872)<(*select()why() ),mul(121,155) '~~~select()how()when()$%mul(732>^;select()mul(913,601)]select()]@when()[(>>mul(697,273)} /don't()%mul(757,595);$@$>where())mul(818,23)>$~mul(649,864),{how() ;*[where():mul(342,657)^~select()]-mul(694,462)%]what()<};mul(697,789)who()[mul(578,235)who()mul(186,328)mul(554,733)!>#){;@mul(138,929)mul(25,167)from()]%from(417,645)(when()where() ',mul(361,155+mul(203,77)where()];mul(839-+mul(328,209)? when():*mul(686,850)-mul(604,374) ?#mul(68,860)>?(%^],select(709,64)?when()mul(548,321),) !>how()select()mul :+>how()%^@~@%mul(276,13)mul(692,25)$]from()/> mul(366,243)'*~}#select(){mul(691,190)!how()!#}~%do()<+what()&'~,+)mul(370,234) from(),mul(712,897){$#mul(579,611))/['mul(840,718){&^(mul(641,81))*how(934,603)[&'how()^*mul(938,975)],{:%mul(747,483)#/}$^~why()mul(817,775)%}select() mul(273,96)mul(734,544)([##-where()mul(541,401$(}{,select()why(66,543)!mul(997,378)>how()!!;+))[mul(857,880)when()where()where()how(417,939)how(): mul(22where()/mul(938,942)>[[>how(), mul(552,726)mul(139what()from()why()mul(753,798)why()['+!!where(332,736)where():mul(465,371){}from(){]}[?where(860,482)mul(423,396)mul(677,239);^<]{{#what()mul(341,814)from()]-$#]^{ don't(){;who()}$mul(303,894){mul(100,628)]mul(481,789)^,mul(420,12)#]select()@&do()(mul(866,134)why();when(73,8)where()mul(971,422)mul(425,573)do()what()@{}#*mul(794,302(~from()%mul(777,75)-%%[when()select()mul(22,151),when()mul(983,529){?from()+[)*[what()[mul(4,608)mul(979,779@>what()$mul(138,543)mul(646,239)'mul(393-who()&!%who()where()mul(986,403)$],)<[mul(981,986)how()(select()!]mul(744,394)when()!*from()&why()how()mul(93,727)$what(506,382)[?~(who()<$mul(424,603)[&}?&why()]%mul(297,910);who(702,130)}select()who()(> +mul(860,951)$when()*who()[#+mul(431,588)how()+/:(%)>from()mul(8,460)(/:@!why()+mul(556,634)@?how()}@}}/^!mul(588,147)from()&when()@mul(499,831) +};who()!why(300,973);[@};mul(475,184)'+what()'how()mul(696,749)how()from()what()mul(294,115)@who()#[mul(409,579)?select(94,587)%)-~mul(541,209)^who()from()-who()}(-mul(612,20){[why()+* $#from():mul(727,495)/>mul(174,985)mul(563?%[how())(from()${;,mul(420,889){mul(350,415)%&??>{mul(408,995)(% $(why()+who()**mul(460,467),@}#(^*~>)mul(133,225)&/mul(587,173);/mul>+why()<,@-~[~!mul(622,327)$]how() @where()who():mul+*~-$>/ (where()mul(684,509)^,why()}$!mul(929,986)$+[]- $;mul(119,51)- who(){#)mul(50,335)*;>?^select()<-mul(660,21)when(),mul(585,125)(mul(583,688){/why()>why()!mul-)^where(317,550)]when();who(877,651)!mul(77,828)~^@from()where()mul(901,180)%from();what()())mul(359,130)mul(732,295)>:<<^mul(686,46)from(){:?mul(744#(}how()from()#'when()'mul(375,566)*mul(177,377),what(205,216)mulmul(511,997)}?how()where() select(294,364)how()]mul(975,7!-how()&?)mul(21,362)^&from()~mul(718,676)mul(87,923)}{,mul(988,768)]*<)?(!mul(198,629)#'/+select()mul(330,891);:where(701,805)where()/*/&)>mul(745,580*#mul(70,983)-who()#how())mul(283,218)mul(920,709)[from()^mul(447,444)<)]?select()mul(514,715)why()^from()({mul(616,746) #&how()where()>&&mul(819,532)+select()+mul(203,692)%(:(]+^#mul(75,664)}?%mul(506,516)'mul(967,985),mul(252,812)$'&+@!mul(69,311)!-}'~![mul(748,794):why()^>who()/mul(355,985)#?#mul(150,45)%{/[mul(249,182)##don't(),'?$~how()';mul(286,220)(~}:[:mul(297,443)mul(35,888)^@@from()why() $;;mul(417,143)when()mul(910,829)@mul(715,749) {~where()#*,/,mul(565,17);->mul(576,280)what()[from()[@mul(184,166)from(401,94) mul(569,96)-%{#{*when()mul(994,408)@}*mul(443,685)<-]}~mul(372,670)@};mul(376,74)mul(457,809))]mul(442,658)>)mul(503,506)mul(66,112)how()+!how()]select()who())mul(87,307)+[(mul(621,443)(:how()+:>don't()why()!how()>how()mul(674,840)what()mul(795,512)-mul(401,54)+/@+{!mul(691,931)?what()++[when()mul(442,585))~when()+-when()'select()mul(842,765)mul(62,265)(&who();who()(when()mul(194,966)*(,?mul(894,538)what()+]@&? mul(183,809); >%~what(840,775)who();when()mul(660,286)mul(355,338)>from()where()-$/from();,)mul(562,357)how()^mul(897,481)]why()mul(75,576)when()$]from()mul(509,51)(why()mul(910,246)/mul(325,400)+,+/[who()mul(303,777)when()&)/when():,/,mul(701,365)why():&mul(789,577)<&mul(620,292)what()@*-{ diff --git a/src/day1.cpp b/src/day1.cpp new file mode 100644 index 0000000..bd92a99 --- /dev/null +++ b/src/day1.cpp @@ -0,0 +1,31 @@ +/* + * + * Copyright (C) 2024 Brett Terpstra + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include +#include +#include +#include +#include +#include +#include + +// this file was broken by incompetence + +void run_day1() +{ + +} diff --git a/src/day2.cpp b/src/day2.cpp new file mode 100644 index 0000000..bc82172 --- /dev/null +++ b/src/day2.cpp @@ -0,0 +1,113 @@ +/* + * + * Copyright (C) 2024 Brett Terpstra + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include +#include +#include +#include +#include +#include +#include + +enum class state_t +{ + INCREASING, DECREASING, SAME +}; + +state_t get_state(const int i, const int j) +{ + return i > j ? state_t::INCREASING : (i < j ? state_t::DECREASING : state_t::SAME); +} + +bool is_safe(const std::vector& report) +{ + const state_t state = get_state(report[1], report[0]); + bool is_safe = true; + for (blt::size_t i = 0; i < report.size(); i++) + { + if (i + 1 >= report.size()) + break; + const auto diff = std::abs(report[i] - report[i + 1]); + const state_t new_state = report[i + 1] > report[i] + ? state_t::INCREASING + : (report[i + 1] < report[i] ? state_t::DECREASING : state_t::SAME); + if (new_state != state) + { + is_safe = false; + break; + } + if (diff < 1 || diff > 3) + { + is_safe = false; + break; + } + } + if (state != state_t::SAME && is_safe) + return true; + return false; +} + +void run_day2() +{ + std::vector> reports; + auto lines = blt::fs::getLinesFromFile("../problems/day2/input"); + + for (const auto& line : lines) + { + const auto pair = blt::string::split(line, ' '); + reports.emplace_back(); + for (const auto& var : pair) + reports.back().push_back(std::stoi(var)); + } + + { + int safe = 0; + + for (const auto& report : reports) + { + if (is_safe(report)) + safe++; + } + + BLT_TRACE("Total Safe %d", safe); + } + + { + int safe = 0; + + for (const auto& report : reports) + { + if (is_safe(report)) + safe++; + else + { + for (blt::size_t i = 0; i < report.size(); i++) + { + auto copy = report; + copy.erase(copy.begin() + static_cast(i)); + if (is_safe(copy)) + { + safe++; + break; + } + } + } + } + + BLT_TRACE("Total Safe2 %d", safe); + } +} diff --git a/src/day3.cpp b/src/day3.cpp new file mode 100644 index 0000000..3bcc48f --- /dev/null +++ b/src/day3.cpp @@ -0,0 +1,225 @@ +/* + * + * Copyright (C) 2024 Brett Terpstra + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +enum class state_t +{ + NONE, M, U, L, D, O, N, AP, T, OPEN, NUM1, NUM2 +}; + +void run_day3() +{ + auto file = blt::fs::getFile("../problems/day3/input"); + + { + auto CURRENT_STATE = state_t::NONE; + + int total = 0; + + std::string num1, num2; + + for (auto [i, c] : blt::enumerate(file)) + { + switch (CURRENT_STATE) + { + case state_t::NONE: + if (c == 'm') + CURRENT_STATE = state_t::M; + break; + case state_t::M: + if (c == 'u') + CURRENT_STATE = state_t::U; + else + CURRENT_STATE = state_t::NONE; + break; + case state_t::U: + if (c == 'l') + CURRENT_STATE = state_t::L; + else + CURRENT_STATE = state_t::NONE; + break; + case state_t::L: + if (c == '(') + CURRENT_STATE = state_t::NUM1; + else + CURRENT_STATE = state_t::NONE; + break; + case state_t::NUM1: + if (std::isdigit(c)) + num1 += c; + else if (c == ',') + CURRENT_STATE = state_t::NUM2; + else + { + num1 = {}; + CURRENT_STATE = state_t::NONE; + } + break; + case state_t::NUM2: + if (std::isdigit(c)) + num2 += c; + else + { + if (c == ')' && !(num1.empty() || num2.empty())) + total += std::stoi(num1) * std::stoi(num2); + num1 = {}; + num2 = {}; + CURRENT_STATE = state_t::NONE; + } + break; + default: + break; + } + } + + BLT_TRACE("Total value %d", total); + } + + auto CURRENT_STATE = state_t::NONE; + + int total = 0; + bool run = true; + bool detecting = false; + + std::string num1, num2; + + for (const auto c : file) + { + switch (CURRENT_STATE) + { + case state_t::NONE: + if (c == 'm') + CURRENT_STATE = state_t::M; + else if (c == 'd') + CURRENT_STATE = state_t::D; + break; + case state_t::M: + if (c == 'u') + CURRENT_STATE = state_t::U; + else + CURRENT_STATE = state_t::NONE; + break; + case state_t::U: + if (c == 'l') + CURRENT_STATE = state_t::L; + else + CURRENT_STATE = state_t::NONE; + break; + case state_t::L: + if (c == '(') + CURRENT_STATE = state_t::NUM1; + else + CURRENT_STATE = state_t::NONE; + break; + case state_t::NUM1: + if (std::isdigit(c)) + num1 += c; + else if (c == ',') + CURRENT_STATE = state_t::NUM2; + else + { + num1 = {}; + CURRENT_STATE = state_t::NONE; + } + break; + case state_t::NUM2: + if (std::isdigit(c)) + num2 += c; + else + { + if (c == ')' && run && !(num1.empty() || num2.empty())) + total += std::stoi(num1) * std::stoi(num2); + num1 = {}; + num2 = {}; + CURRENT_STATE = state_t::NONE; + } + break; + case state_t::D: + if (c == 'o') + CURRENT_STATE = state_t::O; + else if (c == 'm') + CURRENT_STATE = state_t::M; + else + CURRENT_STATE = state_t::NONE; + break; + case state_t::O: + if (c == '(') + { + CURRENT_STATE = state_t::OPEN; + detecting = true; + } + else if (c == 'n') + { + CURRENT_STATE = state_t::N; + detecting = false; + } + else if (c == 'm') + CURRENT_STATE = state_t::M; + else + CURRENT_STATE = state_t::NONE; + break; + case state_t::N: + if (c == '\'') + CURRENT_STATE = state_t::AP; + else if (c == 'm') + CURRENT_STATE = state_t::M; + else + CURRENT_STATE = state_t::NONE; + break; + case state_t::AP: + if (c == 't') + CURRENT_STATE = state_t::T; + else if (c == 'm') + CURRENT_STATE = state_t::M; + else + CURRENT_STATE = state_t::NONE; + break; + case state_t::T: + if (c == '(') + CURRENT_STATE = state_t::OPEN; + else if (c == 'm') + CURRENT_STATE = state_t::M; + else + CURRENT_STATE = state_t::NONE; + break; + case state_t::OPEN: + if (c == ')') + { + if (detecting) + run = true; + else + run = false; + CURRENT_STATE = state_t::NONE; + } else if (c == 'm') + CURRENT_STATE = state_t::M; + else + CURRENT_STATE = state_t::NONE; + break; + } + } + + BLT_TRACE("Total value2 %d", total); +} diff --git a/src/main.cpp b/src/main.cpp index 6f2b004..72afd84 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,6 +1,38 @@ -#include +#include +#include +#include +#include +#include -int main() +int main(const int argc, const char** argv) { - std::cout << "Hello World!" << std::endl; + blt::arg_parse parser; + + parser.addArgument(blt::arg_builder{"day"}.build()); + + auto args = parser.parse_args(argc, argv); + + if (!args.contains("day")) + { + BLT_ERROR("Please provide the day to run"); + return -1; + } + + switch (const auto day = std::stoi(args.get("day"))) + { + case 1: + run_day1(); + break; + case 2: + run_day2(); + break; + case 3: + run_day3(); + break; + case 4: + break; + default: + BLT_INFO("%d is not a day", day); + break; + } }