From 86708909e571ada06ab4e28a3f8b100fb35373c3 Mon Sep 17 00:00:00 2001 From: Jonas Hahn Date: Wed, 16 Apr 2025 15:54:47 +0200 Subject: [PATCH] init --- .gitignore | 9 + CMakeLists.txt | 34 + README.md | 5 + src/examples/01.ex | 6 + src/examples/02.ex | 6 + src/examples/03.ex | 1 + src/examples/04.ex | 10 + src/examples/05.ex | 28 + src/examples/06.ex | 10 + src/examples/07.ex | 9 + src/examples/08.ex | 12 + src/examples/09.ex | 1 + src/examples/10.ex | 0 src/examples/11.ex | 0 src/examples/12.ex | 0 src/examples/13.ex | 0 src/examples/14.ex | 0 src/examples/15.ex | 0 src/examples/16.ex | 0 src/examples/17.ex | 0 src/examples/18.ex | 0 src/examples/19.ex | 0 src/examples/20.ex | 0 src/examples/21.ex | 0 src/examples/22.ex | 0 src/examples/23.ex | 0 src/examples/24.ex | 0 src/examples/25.ex | 0 src/inputs/01.in | 1000 +++++++++++++++++++++++++++++ src/inputs/02.in | 1000 +++++++++++++++++++++++++++++ src/inputs/03.in | 7 + src/inputs/04.in | 140 +++++ src/inputs/05.in | 1380 +++++++++++++++++++++++++++++++++++++++++ src/inputs/06.in | 130 ++++ src/inputs/07.in | 850 +++++++++++++++++++++++++ src/inputs/08.in | 50 ++ src/inputs/09.in | 1 + src/inputs/10.in | 0 src/inputs/11.in | 0 src/inputs/12.in | 0 src/inputs/13.in | 0 src/inputs/14.in | 0 src/inputs/15.in | 0 src/inputs/16.in | 0 src/inputs/17.in | 0 src/inputs/18.in | 0 src/inputs/19.in | 0 src/inputs/20.in | 0 src/inputs/21.in | 0 src/inputs/22.in | 0 src/inputs/23.in | 0 src/inputs/24.in | 0 src/inputs/25.in | 0 src/misc/template.cpp | 109 ++++ src/solutions/01.cpp | 131 ++++ src/solutions/02.cpp | 159 +++++ src/solutions/03.cpp | 122 ++++ src/solutions/04.cpp | 324 ++++++++++ src/solutions/05.cpp | 243 ++++++++ src/solutions/06.cpp | 281 +++++++++ src/solutions/07.cpp | 304 +++++++++ src/solutions/08.cpp | 179 ++++++ src/solutions/09.cpp | 161 +++++ src/solutions/10.cpp | 6 + src/solutions/11.cpp | 109 ++++ src/solutions/12.cpp | 109 ++++ src/solutions/13.cpp | 109 ++++ src/solutions/14.cpp | 109 ++++ src/solutions/15.cpp | 109 ++++ src/solutions/16.cpp | 109 ++++ src/solutions/17.cpp | 109 ++++ src/solutions/18.cpp | 109 ++++ src/solutions/19.cpp | 109 ++++ src/solutions/20.cpp | 109 ++++ src/solutions/21.cpp | 109 ++++ src/solutions/22.cpp | 109 ++++ src/solutions/23.cpp | 109 ++++ src/solutions/24.cpp | 109 ++++ src/solutions/25.cpp | 109 ++++ 79 files changed, 8343 insertions(+) create mode 100644 .gitignore create mode 100644 CMakeLists.txt create mode 100644 README.md create mode 100644 src/examples/01.ex create mode 100644 src/examples/02.ex create mode 100644 src/examples/03.ex create mode 100644 src/examples/04.ex create mode 100644 src/examples/05.ex create mode 100644 src/examples/06.ex create mode 100644 src/examples/07.ex create mode 100644 src/examples/08.ex create mode 100644 src/examples/09.ex create mode 100644 src/examples/10.ex create mode 100644 src/examples/11.ex create mode 100644 src/examples/12.ex create mode 100644 src/examples/13.ex create mode 100644 src/examples/14.ex create mode 100644 src/examples/15.ex create mode 100644 src/examples/16.ex create mode 100644 src/examples/17.ex create mode 100644 src/examples/18.ex create mode 100644 src/examples/19.ex create mode 100644 src/examples/20.ex create mode 100644 src/examples/21.ex create mode 100644 src/examples/22.ex create mode 100644 src/examples/23.ex create mode 100644 src/examples/24.ex create mode 100644 src/examples/25.ex create mode 100644 src/inputs/01.in create mode 100644 src/inputs/02.in create mode 100644 src/inputs/03.in create mode 100644 src/inputs/04.in create mode 100644 src/inputs/05.in create mode 100644 src/inputs/06.in create mode 100644 src/inputs/07.in create mode 100644 src/inputs/08.in create mode 100644 src/inputs/09.in create mode 100644 src/inputs/10.in create mode 100644 src/inputs/11.in create mode 100644 src/inputs/12.in create mode 100644 src/inputs/13.in create mode 100644 src/inputs/14.in create mode 100644 src/inputs/15.in create mode 100644 src/inputs/16.in create mode 100644 src/inputs/17.in create mode 100644 src/inputs/18.in create mode 100644 src/inputs/19.in create mode 100644 src/inputs/20.in create mode 100644 src/inputs/21.in create mode 100644 src/inputs/22.in create mode 100644 src/inputs/23.in create mode 100644 src/inputs/24.in create mode 100644 src/inputs/25.in create mode 100644 src/misc/template.cpp create mode 100644 src/solutions/01.cpp create mode 100644 src/solutions/02.cpp create mode 100644 src/solutions/03.cpp create mode 100644 src/solutions/04.cpp create mode 100644 src/solutions/05.cpp create mode 100644 src/solutions/06.cpp create mode 100644 src/solutions/07.cpp create mode 100644 src/solutions/08.cpp create mode 100644 src/solutions/09.cpp create mode 100644 src/solutions/10.cpp create mode 100644 src/solutions/11.cpp create mode 100644 src/solutions/12.cpp create mode 100644 src/solutions/13.cpp create mode 100644 src/solutions/14.cpp create mode 100644 src/solutions/15.cpp create mode 100644 src/solutions/16.cpp create mode 100644 src/solutions/17.cpp create mode 100644 src/solutions/18.cpp create mode 100644 src/solutions/19.cpp create mode 100644 src/solutions/20.cpp create mode 100644 src/solutions/21.cpp create mode 100644 src/solutions/22.cpp create mode 100644 src/solutions/23.cpp create mode 100644 src/solutions/24.cpp create mode 100644 src/solutions/25.cpp diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..361e8e1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +# Cmake +CMakeFiles/ +CMakeCache.txt +cmake_install.cmake +Makefile + +# Other +bin/ + diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..3bd122f --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,34 @@ +cmake_minimum_required(VERSION 3.10) +project(Aoc2024 VERSION 1.1) + +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) + +# Adding bins +add_executable(Day01 src/solutions/01.cpp) +add_executable(Day02 src/solutions/02.cpp) +add_executable(Day03 src/solutions/03.cpp) +add_executable(Day04 src/solutions/04.cpp) +add_executable(Day05 src/solutions/05.cpp) +add_executable(Day06 src/solutions/06.cpp) +add_executable(Day07 src/solutions/07.cpp) +add_executable(Day08 src/solutions/08.cpp) +add_executable(Day09 src/solutions/09.cpp) +add_executable(Day10 src/solutions/10.cpp) +add_executable(Day11 src/solutions/11.cpp) +add_executable(Day12 src/solutions/12.cpp) +add_executable(Day13 src/solutions/13.cpp) +add_executable(Day14 src/solutions/14.cpp) +add_executable(Day15 src/solutions/15.cpp) +add_executable(Day16 src/solutions/16.cpp) +add_executable(Day17 src/solutions/17.cpp) +add_executable(Day18 src/solutions/18.cpp) +add_executable(Day19 src/solutions/19.cpp) +add_executable(Day20 src/solutions/20.cpp) +add_executable(Day21 src/solutions/21.cpp) +add_executable(Day22 src/solutions/22.cpp) +add_executable(Day23 src/solutions/23.cpp) +add_executable(Day24 src/solutions/24.cpp) +add_executable(Day25 src/solutions/25.cpp) + diff --git a/README.md b/README.md new file mode 100644 index 0000000..98035e0 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# (A)dvent (o)f (C)ode 2024 + +(A)scyii(o)(C) + +https://adventofcode.com/ diff --git a/src/examples/01.ex b/src/examples/01.ex new file mode 100644 index 0000000..b8af9ad --- /dev/null +++ b/src/examples/01.ex @@ -0,0 +1,6 @@ +3 4 +4 3 +2 5 +1 3 +3 9 +3 3 diff --git a/src/examples/02.ex b/src/examples/02.ex new file mode 100644 index 0000000..b49c10d --- /dev/null +++ b/src/examples/02.ex @@ -0,0 +1,6 @@ +7 6 4 2 1 +1 2 7 8 9 +9 7 6 2 1 +1 3 2 4 5 +8 6 4 4 1 +1 3 6 7 9 diff --git a/src/examples/03.ex b/src/examples/03.ex new file mode 100644 index 0000000..f274bda --- /dev/null +++ b/src/examples/03.ex @@ -0,0 +1 @@ +xmul(2,4)%&mul[3,7]!@^do_not_mul(5,5)+mul(32,64]then(mul(11,8)mul(8,5)) diff --git a/src/examples/04.ex b/src/examples/04.ex new file mode 100644 index 0000000..1d61305 --- /dev/null +++ b/src/examples/04.ex @@ -0,0 +1,10 @@ +.M.S...... +..A..MSMS. +.M.S.MAA.. +..A.ASMSM. +.M.S.M.... +.......... +S.S.S.S.S. +.A.A.A.A.. +M.M.M.M.M. +.......... diff --git a/src/examples/05.ex b/src/examples/05.ex new file mode 100644 index 0000000..9d146d6 --- /dev/null +++ b/src/examples/05.ex @@ -0,0 +1,28 @@ +47|53 +97|13 +97|61 +97|47 +75|29 +61|13 +75|53 +29|13 +97|29 +53|29 +61|53 +97|53 +61|29 +47|13 +75|47 +97|75 +47|61 +75|61 +47|29 +75|13 +53|13 + +75,47,61,53,29 +97,61,53,29,13 +75,29,13 +75,97,47,61,53 +61,13,29 +97,13,75,29,47 diff --git a/src/examples/06.ex b/src/examples/06.ex new file mode 100644 index 0000000..b3c18fa --- /dev/null +++ b/src/examples/06.ex @@ -0,0 +1,10 @@ +....#..... +.........# +.......... +..#....... +.......#.. +....#..... +.#..^..... +........#. +#......... +......#... diff --git a/src/examples/07.ex b/src/examples/07.ex new file mode 100644 index 0000000..fc6e099 --- /dev/null +++ b/src/examples/07.ex @@ -0,0 +1,9 @@ +190: 10 19 +3267: 81 40 27 +83: 17 5 +156: 15 6 +7290: 6 8 6 15 +161011: 16 10 13 +192: 17 8 14 +21037: 9 7 18 13 +292: 11 6 16 20 diff --git a/src/examples/08.ex b/src/examples/08.ex new file mode 100644 index 0000000..78a1e91 --- /dev/null +++ b/src/examples/08.ex @@ -0,0 +1,12 @@ +............ +........0... +.....0...... +.......0.... +....0....... +......A..... +............ +............ +........A... +.........A.. +............ +............ diff --git a/src/examples/09.ex b/src/examples/09.ex new file mode 100644 index 0000000..f96c390 --- /dev/null +++ b/src/examples/09.ex @@ -0,0 +1 @@ +2333133121414131402 diff --git a/src/examples/10.ex b/src/examples/10.ex new file mode 100644 index 0000000..e69de29 diff --git a/src/examples/11.ex b/src/examples/11.ex new file mode 100644 index 0000000..e69de29 diff --git a/src/examples/12.ex b/src/examples/12.ex new file mode 100644 index 0000000..e69de29 diff --git a/src/examples/13.ex b/src/examples/13.ex new file mode 100644 index 0000000..e69de29 diff --git a/src/examples/14.ex b/src/examples/14.ex new file mode 100644 index 0000000..e69de29 diff --git a/src/examples/15.ex b/src/examples/15.ex new file mode 100644 index 0000000..e69de29 diff --git a/src/examples/16.ex b/src/examples/16.ex new file mode 100644 index 0000000..e69de29 diff --git a/src/examples/17.ex b/src/examples/17.ex new file mode 100644 index 0000000..e69de29 diff --git a/src/examples/18.ex b/src/examples/18.ex new file mode 100644 index 0000000..e69de29 diff --git a/src/examples/19.ex b/src/examples/19.ex new file mode 100644 index 0000000..e69de29 diff --git a/src/examples/20.ex b/src/examples/20.ex new file mode 100644 index 0000000..e69de29 diff --git a/src/examples/21.ex b/src/examples/21.ex new file mode 100644 index 0000000..e69de29 diff --git a/src/examples/22.ex b/src/examples/22.ex new file mode 100644 index 0000000..e69de29 diff --git a/src/examples/23.ex b/src/examples/23.ex new file mode 100644 index 0000000..e69de29 diff --git a/src/examples/24.ex b/src/examples/24.ex new file mode 100644 index 0000000..e69de29 diff --git a/src/examples/25.ex b/src/examples/25.ex new file mode 100644 index 0000000..e69de29 diff --git a/src/inputs/01.in b/src/inputs/01.in new file mode 100644 index 0000000..d51876f --- /dev/null +++ b/src/inputs/01.in @@ -0,0 +1,1000 @@ +88159 51481 +66127 31794 +71500 84893 +59372 58807 +97356 27409 +31813 76811 +58538 17103 +91555 61602 +64368 29057 +93218 29845 +12825 90912 +42007 74860 +86804 22288 +48226 41327 +64901 11672 +23552 90973 +25535 47024 +93958 81020 +22369 12446 +15345 11937 +35777 54941 +56811 12354 +40781 95999 +31307 40172 +91488 82862 +77367 22223 +87964 82070 +74126 93233 +34025 10159 +56705 98596 +95859 86168 +33941 24708 +78232 30124 +26458 71886 +95140 75357 +38239 69088 +28807 41572 +79031 31288 +93268 30124 +45263 38984 +12446 58807 +35553 53820 +48370 97535 +97373 68180 +60564 80931 +37870 50229 +61416 37490 +54388 62859 +41572 95623 +10498 28807 +53226 86218 +87689 16054 +97795 29845 +80217 14003 +61150 41572 +65150 45813 +35662 50581 +21936 28176 +53640 19521 +60440 29845 +10153 73124 +24947 61602 +94719 82862 +56113 35462 +60158 12446 +16511 55130 +43996 68926 +24204 33490 +32322 21742 +29486 81363 +44613 49177 +21869 37110 +22633 60158 +64685 14025 +51857 58940 +65477 51481 +55265 85464 +27449 60615 +57282 90912 +98429 30164 +44599 74746 +55836 41572 +35761 10520 +16770 90768 +88443 47024 +73799 96896 +54283 11223 +36745 37490 +72055 29116 +23208 98166 +76062 68978 +69239 12446 +35416 29845 +58855 28807 +78700 50581 +49820 65493 +74221 46522 +84453 64123 +73522 42813 +53956 36823 +85421 44071 +82349 28807 +36383 90912 +59873 79880 +52931 66755 +51511 41572 +71396 68077 +86214 64123 +89366 37490 +81114 69088 +87716 60615 +48314 82862 +95810 51481 +83319 64039 +33704 44006 +84043 75826 +63438 55130 +22956 20936 +23334 23969 +79068 92145 +19690 60158 +35098 37490 +21016 73557 +39693 12173 +79683 57580 +10884 42795 +84894 92497 +15097 71651 +47644 69088 +27336 30124 +64921 41065 +42698 27274 +11114 85693 +94765 83157 +80308 69088 +46222 34636 +70654 12446 +21252 69088 +31201 60170 +42720 37304 +99750 42777 +26996 29845 +28394 37490 +62128 48607 +90460 90033 +82862 66739 +49218 40284 +15265 18834 +20786 64123 +74074 57157 +66198 60615 +89660 72396 +43653 40822 +81085 31745 +49857 24362 +13425 85693 +26655 12966 +96465 22944 +54546 84491 +84929 47359 +71679 58940 +87771 30084 +96928 47024 +40616 39175 +82726 91399 +43422 21966 +47920 62593 +96065 50581 +56557 35920 +54883 64123 +11419 44113 +92089 96078 +19233 29057 +97536 15362 +43703 93300 +10974 45191 +45383 83413 +70045 47893 +94537 85963 +55877 57815 +80630 50968 +11307 88478 +69350 87753 +32900 58940 +57995 58807 +45541 94944 +31424 90186 +51042 85693 +72314 74743 +76936 35712 +93651 29154 +28102 73346 +22350 36252 +73526 12446 +19991 24425 +29351 51369 +46898 90912 +73110 40189 +80101 77193 +38839 16145 +67376 91399 +11250 47024 +71912 88299 +41511 14749 +94061 64768 +18177 84343 +54020 68080 +34136 58940 +70077 97889 +91399 65493 +86988 56633 +58041 61706 +62066 29845 +69820 67783 +41345 81923 +74352 30263 +10396 96314 +73973 30449 +80283 77731 +78598 50935 +45256 91037 +84757 28807 +59636 26232 +98967 20807 +84663 80838 +44986 12446 +79880 68451 +99523 50581 +58686 63927 +36592 77535 +44131 60615 +81984 35964 +50809 30124 +38038 41392 +77551 28818 +44225 91399 +19856 16346 +81386 30263 +63653 41572 +85880 44359 +83695 40838 +51486 83253 +58871 42663 +67122 40889 +24053 47024 +53285 28807 +96127 26162 +23320 11759 +34681 21742 +27726 32701 +16021 94484 +65391 25875 +15118 21742 +74533 97303 +75277 28807 +84593 93094 +74592 24189 +27084 17154 +64479 52795 +88721 48296 +46709 77926 +38685 86152 +77305 18703 +58118 64123 +95228 21742 +35865 85693 +56841 61602 +27061 11160 +33156 58884 +95075 61602 +62673 62920 +62236 50581 +19545 75640 +32657 51481 +28914 61602 +43029 29333 +99724 69088 +38488 81952 +82519 41572 +73670 15253 +25813 41316 +52085 89329 +58873 94484 +43443 23458 +90391 63012 +21742 46006 +87685 64123 +45047 63653 +63658 77305 +87042 91399 +97610 21389 +62138 29845 +93425 17097 +72887 48441 +28524 56284 +73240 60158 +27736 29845 +85013 32754 +51161 58807 +59013 61602 +77441 60158 +51356 68978 +64926 79276 +14614 61089 +64123 60615 +95766 55863 +19177 57996 +85072 24590 +50207 12446 +29207 63379 +39903 27599 +11221 12456 +68381 82309 +60130 41647 +85523 34848 +98173 66840 +75760 65493 +30335 29845 +49433 30657 +79644 81904 +77896 38729 +71894 14005 +25322 86650 +89785 89651 +33104 87070 +53782 20169 +82382 22858 +38821 61206 +51537 95593 +62183 29845 +78616 68693 +29979 58940 +80974 50647 +85084 60615 +87281 84459 +94553 75854 +75450 37490 +14527 85693 +51616 41572 +46835 52088 +97084 64123 +64764 50276 +57256 37490 +19078 85693 +65241 91405 +38149 58940 +93011 94016 +62890 12446 +21483 21742 +85614 41572 +92234 85693 +74713 30263 +49473 57120 +33659 68978 +38796 74075 +76905 32312 +76648 28807 +16741 33725 +54599 47439 +78356 30263 +86805 20074 +50808 86000 +50391 80866 +88883 65493 +62179 14674 +33353 96172 +81785 87532 +16293 60578 +62340 12544 +54157 73220 +87672 34082 +80352 62489 +76156 82862 +50132 48336 +15103 89651 +56164 51481 +71178 21200 +33097 48247 +58056 58940 +33197 97717 +93106 58807 +83490 56990 +95888 32626 +80441 91399 +80490 77305 +45307 64138 +87163 35282 +19609 92457 +15632 37592 +19571 63653 +43672 91024 +30584 27172 +80118 60112 +35514 66013 +20159 31841 +64490 69374 +26736 86253 +20795 60615 +90740 88354 +91977 29845 +70776 77305 +96040 70863 +77391 12446 +27885 74312 +43539 53870 +37740 50158 +58943 65493 +83210 85693 +81377 93139 +49532 68479 +42816 23988 +71322 71226 +32883 63407 +71221 20406 +62210 55130 +76602 49389 +98153 54312 +67439 53498 +82076 66843 +93499 21742 +64706 52692 +22740 86324 +65169 98212 +71871 58807 +45115 91399 +82873 37490 +33206 29458 +98384 41572 +36085 29057 +81241 11704 +87733 52409 +92538 85380 +43155 87406 +81416 88183 +61679 41717 +78717 91399 +58807 40284 +80998 10270 +69412 83586 +44954 29789 +70765 35112 +53655 68978 +55574 83623 +77261 79880 +85616 28807 +71446 72633 +76456 13356 +78574 28774 +82146 40284 +97870 41572 +85579 37490 +95238 28002 +78545 55130 +91410 60615 +40694 89651 +48255 20946 +33348 93402 +93578 93113 +41035 77220 +12384 60615 +69551 25521 +14889 45701 +88821 14762 +36209 29057 +69726 82862 +24390 58940 +13896 90912 +32471 39529 +10809 61602 +18458 84756 +59760 68731 +30623 64123 +51481 60615 +60615 83337 +76260 89651 +37428 98024 +58479 50581 +29702 51481 +73937 34194 +43765 57420 +92144 37560 +41161 90912 +58835 51481 +27102 12446 +50288 28807 +51204 61602 +32892 60325 +78796 37535 +48103 88625 +63255 37330 +36536 12446 +67969 50581 +89577 16980 +51340 65493 +67495 30124 +29763 49209 +42095 64123 +28992 83460 +58266 89651 +28171 12446 +62901 40002 +21074 31576 +42094 58940 +56348 58807 +22106 94379 +84597 40911 +84863 11817 +41265 30263 +94940 46502 +70259 84999 +27704 79394 +79769 60615 +98226 31180 +18246 28807 +49638 48644 +51318 30249 +17410 29057 +50581 69088 +68352 62040 +61068 12845 +73802 11560 +69088 78556 +11021 29121 +82934 57912 +94484 37048 +38669 44130 +45048 22193 +40598 31455 +68611 41572 +50442 87759 +27021 64123 +13689 58940 +20611 50581 +20756 37729 +81192 53025 +27151 79880 +30316 16292 +92426 47028 +79502 68324 +81129 55130 +49419 54193 +65108 40284 +80078 14766 +63004 84962 +26621 80066 +96890 86315 +83420 39576 +68978 28807 +91535 79135 +22260 67993 +62003 58807 +64231 82862 +11049 84103 +25620 90912 +42551 28283 +37404 42800 +28109 34836 +65182 36478 +41849 60615 +86207 34873 +89745 41190 +47210 64123 +77033 59912 +93743 46675 +54562 61602 +46606 37490 +25591 65624 +21263 72884 +12526 42845 +42338 89651 +66957 42507 +48964 94173 +47921 41572 +74995 37490 +37898 84123 +85693 81027 +97252 94484 +71510 51481 +29057 41572 +57360 30124 +53937 55130 +96328 53134 +99768 43470 +73658 45825 +63944 23238 +97204 82198 +67971 29290 +52693 96297 +51996 75994 +86746 54618 +93693 19228 +96173 96139 +46002 64123 +18153 72197 +47169 22265 +49412 18020 +22919 95524 +89828 47283 +90251 37490 +14783 51692 +21859 35331 +42703 58807 +35131 68765 +90912 81121 +93601 29845 +38731 96444 +11292 41066 +20477 40810 +25767 30124 +62735 20997 +83894 38722 +36112 61602 +32137 18658 +29604 81626 +48810 64504 +56777 90912 +12213 55130 +37252 77574 +60155 83875 +73835 30263 +78092 85693 +73171 99077 +27781 69088 +23586 33465 +65932 58940 +41892 51472 +84171 60615 +59773 41572 +42717 55130 +88033 41572 +33942 52236 +30170 74015 +69779 96941 +34772 69088 +41471 59150 +12602 14594 +51464 41357 +63864 37490 +56803 40758 +78946 29774 +78682 29463 +38404 40907 +93697 62354 +95263 49150 +35971 81529 +40496 43244 +18275 59865 +63488 60615 +47279 92828 +76235 40284 +47024 40284 +48204 57655 +79902 94484 +75899 95207 +52856 30124 +28994 91292 +71721 60800 +18168 92977 +83711 47489 +32006 61602 +92154 58940 +90072 44164 +63381 40012 +43597 37490 +51845 45941 +84240 65493 +29845 75471 +29665 87955 +38183 21742 +31510 12446 +74161 96025 +44839 77305 +75010 70166 +52677 41776 +81038 11871 +15795 81538 +39594 19065 +25796 20619 +26874 64562 +55168 41572 +55185 95308 +98790 94033 +68926 21742 +83458 50000 +37534 74710 +98776 60615 +94489 50636 +10262 51481 +87451 65769 +32873 58807 +17617 69088 +26559 91399 +39737 46082 +21085 37262 +18762 24816 +49950 89651 +66246 33005 +65251 70635 +83333 87445 +36349 86441 +47515 60615 +80598 18073 +77068 94675 +59829 19580 +39528 45761 +50483 75915 +89651 89651 +80854 74471 +35965 69561 +10669 29862 +22619 50283 +81626 65493 +63775 85693 +20340 54509 +40518 30263 +79300 54529 +61602 76356 +43012 90529 +26410 61768 +58487 21742 +29158 51796 +73076 93540 +31717 74487 +68560 33520 +43265 69375 +64920 24114 +37627 43323 +41958 55130 +37490 58456 +48671 60988 +72182 60858 +74060 51260 +51112 93811 +29722 28822 +82027 50581 +79573 99189 +60561 66195 +58802 58807 +40315 48647 +94396 82862 +47412 29261 +19752 25518 +20776 36674 +24416 41089 +17412 53003 +88457 85693 +77431 66884 +37881 98363 +23851 81626 +19649 37490 +21997 46319 +92991 28807 +76508 28807 +55024 98652 +35268 58807 +76772 58698 +98401 89174 +69719 50581 +33867 25013 +55130 25257 +86316 51593 +67472 97797 +13598 71334 +64756 58940 +66192 21075 +86834 50581 +82334 31418 +67170 54080 +84231 85175 +77374 55736 +48383 69997 +97816 35083 +46418 44008 +97432 68978 +20025 29618 +34972 29353 +48710 95722 +30124 91399 +63947 54320 +25216 30263 +46726 95433 +25921 97266 +15920 60615 +96199 21742 +96692 89779 +90194 46309 +92917 99346 +84214 51481 +87917 39494 +98473 29845 +31968 81502 +31595 58940 +55719 90334 +53818 82862 +88460 80373 +66241 85437 +44832 70606 +41180 38325 +48361 78426 +79072 61602 +30967 98006 +76751 64123 +76045 80845 +37103 82116 +15606 36062 +57469 90912 +84158 58807 +90686 58940 +75406 82862 +56855 98351 +92362 46375 +17352 97370 +94670 27780 +30000 37490 +34318 58940 +81549 60192 +60355 58807 +11818 41302 +41503 64123 +45450 81638 +54432 64123 +96755 90912 +59272 82127 +45804 87874 +57824 32206 +13945 65963 +91621 89651 +16200 41572 +15654 81867 +91263 60158 +75440 58807 +37618 58403 +96220 81196 +45607 99616 +48232 70659 +68800 39888 +95389 62350 +72565 61038 +28645 34788 +99370 61602 +74801 11729 +66856 53836 +31999 93270 +19479 30680 +36037 91399 +60422 30124 +15307 71243 +14192 81519 +16843 66313 +73780 66984 +64745 28807 +25844 65228 +52914 12446 +30770 39758 +51346 80335 +33712 40284 +82755 91125 +76698 25380 +37579 63653 +25222 85693 +14062 36163 +18909 92367 +17026 91399 +45348 87244 +12359 63763 +68378 55130 +38479 43114 +62163 37396 +28793 60615 +38243 85693 +23826 36315 +18188 95534 +63539 81681 +23219 39453 +63340 89651 +54052 30124 +93228 73865 +44206 89651 +36133 43720 +41530 37490 +40284 96458 +36346 57131 +30658 90912 +56819 52705 +88997 27309 +33509 84165 +18435 61332 +20226 60615 +40327 40311 +39477 23764 +76470 40284 +86141 75847 +37722 87469 +53557 30936 +16383 92010 +33676 72824 +90392 89651 +27165 90912 +79430 69088 +30520 89556 +46091 32519 +85276 47024 +17485 58940 +52339 40284 +84120 58906 +23386 21925 +48691 11212 +46723 45689 +52862 32602 +42302 51481 +96073 21951 +50688 58807 +78870 61602 +98556 33798 +86753 12446 +60959 45398 +97912 44045 +78962 78785 +52275 88265 +26878 23157 +64365 96781 +99416 30124 +74224 58165 +68066 85281 +65395 64123 +88612 89651 +83360 51481 +44922 60158 +96441 82946 +17712 71313 +66187 21728 +13154 13482 +40880 90912 +44633 60158 +40221 33194 +58940 26653 +44059 89552 +90113 87601 +65493 60615 +95117 58940 +52824 28807 +92260 32814 +91949 57396 +38337 34999 +12052 18581 +65455 76166 +38658 50581 +75169 37490 +99211 65985 +49401 74047 +85347 63826 +15047 14813 +51218 44570 +73700 49613 +64801 16661 +64009 81630 +20001 30124 +84865 85693 +91981 55200 +19331 46485 +77256 51481 +77609 30263 +15665 33198 +75269 28807 +54877 65701 +43011 23690 +83602 31675 +25228 50009 +11436 85693 +83907 75165 +73844 91399 +30916 51076 +11172 12446 +81604 51481 +52336 81312 +74379 97494 +29776 41572 +68162 51481 +72301 20320 +92824 81862 +51228 82862 +37730 29845 +12279 89300 +76474 58807 +91839 16960 +89102 49965 +12556 23352 +97704 20153 +62691 80924 +65407 29057 +30263 40253 +43102 21122 +42086 21742 +68749 41572 +78146 97896 +38711 37490 +90949 42627 +82510 25811 +21910 29845 +38235 16463 diff --git a/src/inputs/02.in b/src/inputs/02.in new file mode 100644 index 0000000..6513354 --- /dev/null +++ b/src/inputs/02.in @@ -0,0 +1,1000 @@ +27 29 30 33 34 35 37 35 +51 53 54 55 57 60 63 63 +87 90 93 94 98 +41 42 45 47 49 51 53 58 +23 26 23 24 27 28 +32 33 36 37 34 36 39 37 +12 13 11 14 14 +84 87 88 87 91 +54 55 53 56 62 +71 73 74 74 75 76 77 +84 87 90 90 89 +43 46 49 52 55 55 55 +21 23 25 28 30 30 33 37 +20 22 22 24 31 +42 44 45 46 47 51 52 54 +66 67 69 70 74 75 74 +4 6 10 11 14 17 18 18 +50 52 56 59 63 +64 67 68 71 75 77 83 +17 20 22 29 32 33 35 +81 84 89 92 94 92 +11 14 15 17 20 27 27 +20 22 28 30 31 35 +54 55 57 60 67 74 +51 50 51 52 54 +55 53 55 57 59 60 57 +34 33 35 37 39 42 43 43 +23 22 23 26 28 31 34 38 +6 4 7 10 12 13 15 21 +29 27 28 27 30 32 35 36 +83 80 83 85 88 85 87 86 +75 74 76 78 75 75 +51 50 52 54 57 55 56 60 +71 69 72 70 75 +47 46 48 48 50 +64 63 65 65 63 +88 87 88 90 90 91 91 +69 68 68 70 74 +79 77 77 79 86 +8 5 8 12 14 17 +21 19 20 24 26 25 +36 34 38 39 39 +77 75 76 80 84 +64 63 64 68 74 +40 38 43 44 46 48 49 +86 83 84 87 88 91 98 96 +40 37 40 47 50 53 53 +44 41 46 47 51 +7 4 7 9 11 18 24 +55 55 58 59 62 64 +13 13 14 16 13 +61 61 63 66 68 68 +91 91 92 94 98 +9 9 10 11 13 15 18 25 +21 21 23 25 22 25 +92 92 95 93 92 +53 53 56 55 55 +57 57 60 59 60 64 +48 48 45 48 50 56 +5 5 6 6 9 +37 37 38 41 41 44 46 44 +87 87 87 90 90 +51 51 51 54 58 +79 79 79 82 83 86 88 95 +71 71 72 73 77 78 +41 41 43 47 48 50 49 +55 55 59 62 62 +26 26 29 33 35 36 40 +52 52 56 58 65 +16 16 19 24 25 +85 85 86 89 92 93 98 96 +8 8 11 16 16 +87 87 93 94 98 +12 12 15 18 23 24 30 +45 49 50 51 54 55 +51 55 58 60 61 58 +59 63 66 69 70 70 +25 29 32 34 37 40 44 +13 17 19 22 25 28 29 34 +69 73 71 73 74 +3 7 4 5 4 +40 44 47 50 49 52 55 55 +49 53 56 58 57 59 63 +48 52 55 57 60 59 62 68 +60 64 67 67 68 71 74 +4 8 11 13 13 14 17 14 +17 21 22 22 23 26 26 +32 36 36 39 43 +32 36 38 41 41 48 +24 28 32 34 35 36 +13 17 19 23 24 26 27 24 +13 17 20 24 26 26 +8 12 16 18 20 24 +70 74 75 77 81 83 88 +8 12 13 14 16 23 26 +47 51 53 54 59 60 57 +3 7 12 14 16 16 +21 25 30 31 35 +32 36 38 43 50 +40 46 48 50 52 53 +5 10 13 16 19 16 +11 16 18 21 22 23 23 +25 31 33 34 35 36 38 42 +35 41 42 44 51 +83 90 91 92 90 93 95 +84 90 93 92 93 96 98 97 +65 70 67 68 71 73 73 +63 69 70 68 69 73 +57 64 62 65 67 72 +21 26 28 29 31 31 34 +38 44 47 47 45 +77 84 84 86 88 89 89 +67 73 75 75 79 +2 9 12 12 14 15 20 +11 16 19 23 26 +39 45 49 52 49 +74 81 85 86 86 +44 49 51 55 59 +33 40 41 45 52 +48 55 57 64 67 70 +73 80 83 84 87 92 93 91 +36 43 45 47 49 55 55 +50 57 59 61 66 67 71 +31 36 39 40 43 48 54 +60 57 54 52 49 50 +80 78 77 75 74 73 71 71 +61 59 58 55 52 48 +72 70 69 66 64 63 56 +14 11 8 9 8 6 +14 11 9 8 5 2 4 5 +91 89 88 89 86 85 82 82 +11 8 10 7 3 +20 18 20 18 13 +41 39 38 35 35 33 30 +82 81 80 80 83 +54 53 53 52 49 49 +90 88 85 83 83 79 +80 79 79 76 69 +23 22 21 17 16 +60 59 57 55 52 48 51 +43 41 37 35 35 +68 66 63 60 57 53 50 46 +48 45 44 40 35 +54 51 50 49 46 43 37 34 +69 67 64 62 59 56 49 52 +24 21 14 11 10 8 7 7 +52 49 42 41 37 +19 18 17 11 9 2 +64 65 62 59 58 57 +87 90 88 86 88 +56 58 55 53 52 50 49 49 +23 26 25 24 20 +46 47 44 41 34 +22 25 28 27 24 +35 37 35 32 31 33 30 32 +14 15 16 14 12 12 +70 73 71 73 70 69 67 63 +83 85 86 83 78 +68 70 68 66 66 63 60 58 +95 96 95 95 93 94 +19 22 19 18 18 15 15 +14 15 12 12 9 5 +90 93 93 92 90 88 82 +30 32 30 28 25 22 18 17 +81 84 82 78 80 +55 58 55 51 48 45 45 +47 49 46 43 39 36 32 +46 49 48 45 43 42 38 33 +16 17 10 9 7 5 3 2 +11 13 10 5 3 2 1 4 +77 79 76 74 71 68 63 63 +53 56 50 47 46 42 +39 42 35 33 30 27 21 +62 62 60 59 58 56 55 +69 69 68 65 63 66 +87 87 86 84 82 80 78 78 +71 71 68 65 61 +17 17 14 11 10 8 2 +13 13 10 8 10 9 6 3 +39 39 37 40 39 36 33 36 +73 73 71 68 66 63 64 64 +14 14 15 12 10 9 5 +33 33 32 31 32 30 28 21 +78 78 77 77 75 74 72 +86 86 85 85 84 81 82 +3 3 2 2 2 +91 91 88 85 85 82 81 77 +93 93 92 92 89 87 80 +47 47 43 42 41 39 +21 21 18 16 13 11 7 8 +50 50 47 45 44 40 40 +20 20 18 14 11 7 +64 64 63 60 56 55 49 +66 66 65 60 57 +63 63 56 55 54 57 +21 21 15 12 12 +82 82 80 79 74 72 68 +42 42 40 35 30 +59 55 52 49 47 44 +25 21 19 16 17 +57 53 52 51 49 48 48 +59 55 52 51 48 45 41 +28 24 22 21 16 +92 88 86 89 87 86 83 82 +38 34 35 34 32 34 +30 26 29 28 25 22 22 +29 25 24 22 23 20 16 +93 89 88 86 88 86 83 77 +65 61 61 59 58 55 +46 42 39 39 42 +90 86 86 83 80 78 78 +41 37 34 32 31 30 30 26 +21 17 16 16 15 12 6 +55 51 49 45 43 +30 26 23 21 20 16 19 +92 88 87 85 81 81 +42 38 35 31 30 26 +75 71 70 69 68 64 58 +74 70 64 62 60 +34 30 28 21 23 +98 94 93 87 87 +30 26 25 20 19 15 +57 53 50 43 42 40 39 32 +92 86 85 83 80 79 76 +99 94 92 91 89 88 85 87 +27 21 20 18 15 15 +73 67 64 62 61 57 +97 91 90 88 85 83 78 +90 85 82 79 81 79 76 73 +75 68 65 66 65 66 +19 14 11 9 10 7 6 6 +63 56 54 52 49 48 51 47 +72 66 65 63 65 64 62 55 +28 21 19 16 16 13 +72 66 66 63 65 +29 24 24 23 21 21 +70 65 64 64 62 60 57 53 +26 20 18 18 13 +99 94 90 89 86 84 81 +21 14 11 9 5 4 7 +77 71 67 66 64 64 +26 20 18 14 12 11 7 +82 77 76 75 74 70 68 63 +39 34 27 24 21 +20 14 13 8 5 4 1 2 +61 54 53 48 45 45 +22 16 15 8 4 +52 45 42 40 34 29 +91 94 97 96 95 92 90 +55 54 54 56 58 58 +51 51 53 54 56 60 63 61 +36 38 40 45 46 49 48 +86 91 88 91 93 97 +80 76 73 70 66 64 67 +51 48 48 50 53 57 +71 71 69 65 63 63 +93 93 91 92 93 +61 64 63 65 66 70 +67 68 71 74 81 82 84 90 +7 12 14 16 20 22 24 21 +5 3 4 6 9 10 10 17 +65 66 65 65 61 +56 59 60 64 65 69 +68 69 68 71 74 77 +93 96 94 93 89 91 +8 7 8 9 12 11 15 +80 73 75 74 71 +75 71 69 66 64 58 57 58 +23 21 20 23 21 16 +53 56 54 51 51 54 +72 77 83 85 88 89 91 +55 51 49 46 46 43 42 +17 13 9 6 3 3 +30 26 20 17 15 12 9 9 +67 67 74 75 76 78 +90 88 85 84 81 77 75 74 +7 7 14 16 20 +62 66 73 75 73 +11 13 16 17 18 19 26 +34 27 25 28 26 23 20 15 +20 18 21 23 26 29 33 37 +6 11 9 12 14 15 12 +71 73 72 69 66 +51 54 53 52 52 45 +81 88 85 88 88 +16 12 11 10 9 9 +69 69 66 63 59 56 52 +80 84 86 93 93 +30 24 22 15 13 12 9 +99 99 94 93 92 94 +61 58 57 56 56 52 +85 89 87 89 92 97 +57 54 54 52 46 +45 40 37 34 32 29 27 30 +66 64 58 56 55 52 52 +37 44 45 50 53 54 51 +76 70 68 65 65 64 61 61 +69 69 67 65 66 63 66 +15 19 22 26 28 30 34 +7 7 8 9 11 14 18 22 +11 15 17 17 23 +70 64 63 62 60 60 57 50 +27 27 30 32 38 40 41 47 +42 40 36 35 34 32 26 +23 22 24 26 26 28 31 34 +53 57 57 60 61 64 66 70 +57 57 60 61 64 67 68 71 +61 61 58 57 52 49 49 +45 43 41 39 32 26 +79 83 85 88 89 92 94 94 +7 7 9 8 11 11 +79 79 78 76 78 +37 35 36 39 41 42 44 44 +78 78 79 77 81 +52 55 54 51 50 43 +80 82 85 88 90 87 88 88 +88 84 84 82 79 76 72 +35 41 43 45 47 48 55 59 +59 59 60 59 57 57 +45 45 47 46 43 40 36 +50 44 40 39 36 34 32 28 +57 61 60 62 64 65 67 +75 71 69 66 68 66 61 +71 67 66 65 63 65 64 +34 29 28 26 24 22 25 27 +32 32 29 29 29 +45 52 53 55 55 +60 57 58 62 65 63 +22 16 15 13 12 9 7 3 +39 43 44 47 50 53 56 57 +38 42 44 46 43 +53 50 52 59 58 +22 21 17 15 14 11 11 +61 68 69 68 71 74 79 +85 83 83 81 81 +52 56 58 65 69 +82 76 70 67 65 63 56 +57 64 67 70 73 73 74 81 +10 10 10 8 6 4 +63 65 63 62 58 55 55 +49 48 47 46 43 42 41 +44 46 47 50 52 55 58 +16 18 21 24 26 +35 36 38 41 42 45 48 +79 77 76 73 70 69 67 +20 17 16 14 11 +48 46 43 40 37 +55 58 61 62 65 67 +89 88 87 84 83 80 78 +69 71 73 75 76 +31 28 25 24 22 21 18 15 +34 31 29 27 25 22 20 17 +58 55 52 49 47 44 41 +24 25 27 29 31 33 36 38 +92 90 89 87 85 83 +9 12 15 18 20 +78 77 75 74 71 68 +20 17 16 13 12 9 7 +18 15 12 10 8 +85 82 81 78 77 75 +77 78 79 81 83 +84 85 86 87 89 90 92 94 +57 56 53 52 51 48 47 46 +46 49 52 54 55 57 58 +40 37 34 33 32 31 +47 50 52 53 55 +50 48 47 45 43 40 +63 61 59 58 57 55 52 +23 21 18 15 13 11 +67 64 61 59 57 55 +54 52 51 50 49 47 +37 40 43 46 47 48 49 +11 10 9 7 4 3 2 +79 80 83 86 87 88 +55 54 53 52 49 48 +18 16 13 10 7 +73 72 70 69 68 67 66 65 +40 38 36 35 33 31 29 28 +44 45 47 49 51 +70 73 75 78 79 80 81 84 +21 23 26 29 31 34 35 +1 3 5 8 10 11 13 +39 40 41 42 43 45 46 +72 75 77 78 80 82 +42 43 45 47 49 52 +22 19 18 16 13 11 +43 45 47 49 50 52 54 +68 66 64 63 60 57 56 +53 55 57 59 62 65 +30 27 26 23 22 +30 32 35 37 38 40 +27 24 23 21 20 18 17 14 +38 39 40 43 44 45 47 49 +2 5 7 8 11 +94 91 90 87 85 84 83 82 +70 68 66 63 61 58 +49 52 55 56 59 60 +32 31 29 27 25 24 23 20 +51 50 49 48 46 43 40 39 +19 20 21 23 24 +86 84 82 79 77 75 +30 28 26 23 21 20 18 +93 92 89 86 84 83 80 78 +42 44 46 49 52 54 57 +33 34 37 39 42 +76 78 81 82 85 86 87 90 +97 96 93 90 89 87 85 +87 90 91 94 97 99 +37 34 33 31 29 +45 42 39 37 35 34 +37 40 41 44 45 46 49 +4 6 7 8 10 11 14 17 +89 87 85 84 81 79 77 +74 75 76 79 82 84 85 86 +97 96 93 91 90 87 84 81 +91 92 93 96 98 +13 12 11 9 6 5 +37 38 39 42 43 45 +26 25 24 21 20 +40 41 42 43 45 46 47 49 +38 36 33 31 30 29 27 +84 81 80 79 77 75 72 +84 82 81 80 79 +47 49 52 53 55 58 59 62 +71 72 74 75 76 78 80 +56 53 51 49 46 44 42 +67 66 65 64 63 62 59 +64 67 68 71 72 73 74 +54 56 57 60 63 64 65 +97 96 94 92 90 87 85 84 +31 28 25 24 23 +90 87 84 82 81 80 79 77 +87 89 92 94 96 +84 83 82 79 77 74 71 +56 59 61 63 64 67 +66 68 69 72 75 78 81 +56 59 60 61 64 +85 86 88 91 93 94 97 +82 81 80 77 76 +1 3 4 5 7 9 12 13 +89 87 84 81 78 +89 87 86 85 84 81 78 76 +79 81 82 83 84 +34 33 31 28 27 +24 23 22 20 18 16 14 12 +32 31 30 28 25 23 20 +63 61 58 57 56 53 50 47 +42 43 45 46 47 49 50 +46 47 48 49 50 53 55 +18 15 13 10 7 +11 12 13 14 16 18 19 +64 66 67 69 72 75 76 +31 30 27 26 25 23 20 17 +76 74 72 69 68 66 64 61 +23 21 19 18 15 13 11 10 +30 29 28 26 25 22 20 18 +10 11 13 15 17 18 21 +4 5 7 10 12 14 17 +71 70 68 67 64 +89 86 85 84 83 81 80 +86 83 82 81 78 75 +53 55 56 59 62 +29 30 33 36 39 42 45 47 +14 17 19 20 21 23 26 +69 71 72 73 75 76 +84 81 80 79 78 +11 8 6 4 3 1 +76 77 78 81 82 85 86 87 +85 88 91 92 93 94 96 +57 58 59 61 63 +43 42 41 40 37 +21 19 17 14 13 10 9 6 +19 18 15 14 11 9 8 +18 15 13 11 10 +45 48 50 51 54 57 +51 48 45 44 41 40 +48 47 45 44 42 40 37 35 +58 55 52 50 48 45 +65 68 69 72 73 74 75 +52 55 56 58 59 62 63 64 +29 30 32 35 36 39 +70 72 73 76 78 +85 86 87 88 90 +20 23 25 28 29 30 +11 10 7 6 4 +84 81 78 77 75 +85 82 81 80 78 77 +82 79 77 76 73 71 69 67 +23 21 19 18 15 14 11 +83 80 79 76 75 73 +4 7 8 10 11 +26 24 21 20 17 15 14 12 +86 85 83 81 79 77 +75 74 73 70 68 66 63 +32 31 30 28 26 +67 64 63 62 59 +50 51 54 56 57 58 60 63 +63 60 59 58 56 55 54 +71 69 66 65 64 62 61 59 +50 47 45 43 42 39 +25 26 28 30 32 33 34 +55 56 59 60 61 +3 6 9 11 12 13 16 +85 82 79 76 75 73 72 70 +75 76 79 81 84 +67 68 71 73 75 76 78 +77 75 73 70 68 +47 45 42 41 40 39 36 +60 57 56 54 52 51 49 46 +56 54 52 51 48 45 44 +45 44 43 42 39 +75 77 80 83 86 89 92 +64 65 66 67 70 71 +35 33 31 29 28 26 +41 42 44 47 50 52 54 55 +13 11 10 9 7 5 3 +11 14 15 17 20 21 23 25 +61 63 66 69 71 74 +79 78 75 74 72 71 69 +85 83 81 78 76 +81 79 78 76 73 +74 77 79 81 83 +10 11 12 13 16 18 19 +64 61 60 57 54 51 +70 68 65 63 60 58 55 +78 79 81 83 85 88 90 +13 15 18 20 22 25 28 +71 68 67 66 63 +56 58 61 62 65 +67 65 64 62 59 57 54 +44 41 39 38 37 +48 45 44 42 40 37 36 33 +55 58 59 60 62 +50 47 45 43 40 38 37 35 +61 64 66 67 68 71 72 75 +36 38 40 41 44 45 +52 54 57 59 60 +61 62 64 65 66 68 +84 85 87 90 92 94 96 97 +29 30 32 34 35 36 37 38 +73 71 68 66 63 61 60 58 +52 49 47 44 43 41 +91 89 87 84 83 81 78 76 +76 74 73 71 68 65 62 61 +79 77 74 72 71 69 68 65 +35 34 32 29 27 +22 21 19 17 16 14 +34 32 30 29 27 24 +87 89 90 92 93 94 +30 31 32 35 38 +25 22 21 20 19 18 +40 43 45 48 51 52 +69 70 72 75 77 +38 40 41 42 45 48 50 52 +79 82 83 86 87 +48 47 46 44 43 42 40 +65 63 61 60 57 54 +13 16 18 21 23 24 25 26 +40 41 43 44 47 50 51 +45 42 41 40 38 +8 6 5 3 2 1 +81 80 78 75 73 +85 84 83 82 79 76 75 74 +38 40 42 44 45 48 +7 8 9 11 12 +49 50 51 52 53 +63 60 57 56 54 53 51 +19 21 24 27 30 +49 46 44 41 38 +57 60 63 64 66 68 71 +28 30 31 34 35 37 +65 62 59 57 55 54 +88 85 82 80 78 77 75 +80 81 84 86 88 91 +42 43 46 47 50 52 55 +47 46 45 44 43 41 +83 86 89 90 92 95 +43 46 48 49 50 51 +48 45 42 41 39 +87 90 92 94 95 +39 40 42 45 47 49 50 +44 41 39 36 33 32 31 29 +32 31 30 27 25 23 20 19 +39 37 34 31 29 +51 52 53 54 55 58 59 +52 50 49 47 45 +49 51 54 55 57 60 62 64 +29 28 25 23 21 20 18 17 +38 37 34 31 28 26 25 +79 76 74 72 71 69 +36 38 40 42 43 45 47 50 +86 83 80 78 77 74 +33 35 37 38 41 42 +28 31 34 35 37 39 42 43 +32 34 37 40 42 44 46 47 +57 60 62 63 65 66 68 +83 85 88 89 90 +44 47 50 53 55 56 59 60 +33 31 29 27 24 23 21 18 +28 25 24 22 20 17 15 14 +33 32 30 28 27 +72 69 68 65 64 +13 16 19 20 22 25 +31 29 28 27 24 21 +69 68 65 63 62 59 57 +45 48 51 52 55 57 59 60 +13 14 15 16 17 20 22 25 +43 41 38 37 35 33 31 +73 72 69 68 65 62 59 +75 77 79 82 85 88 +10 13 16 18 19 21 +74 71 70 67 66 64 62 +54 53 52 51 49 +94 93 90 88 87 85 83 +39 41 42 44 47 48 50 +1 4 5 7 9 10 +71 70 67 66 63 61 +14 15 16 17 19 20 22 +5 6 7 9 12 14 15 +67 64 62 60 57 56 55 +24 25 27 30 33 35 +35 36 38 40 41 +67 64 61 58 56 55 54 +73 72 71 70 69 68 +96 93 92 89 87 85 82 81 +80 81 83 86 88 +12 9 6 5 2 +92 91 88 85 82 80 +92 91 88 86 85 83 82 79 +73 74 77 80 81 82 +75 76 77 80 82 83 84 +12 9 6 5 4 +80 83 85 87 89 92 95 96 +21 24 25 28 31 34 +51 49 46 43 42 +7 6 3 2 1 +35 36 38 40 41 43 44 +92 91 90 89 86 85 +51 50 47 44 41 +70 71 74 75 78 79 +21 24 26 28 30 31 33 +33 36 37 40 41 42 44 +68 66 63 62 59 56 54 +51 52 54 57 60 62 64 +70 73 76 78 81 84 85 +65 68 70 73 76 77 +3 5 7 8 9 11 13 14 +28 26 23 20 18 15 +39 36 33 32 29 27 +22 24 26 28 30 +54 51 48 46 43 +36 34 31 30 28 26 25 23 +69 71 73 76 79 +28 31 34 36 39 42 45 +24 23 22 21 19 16 14 +99 97 95 94 93 91 88 86 +65 62 61 60 58 56 54 53 +17 19 20 22 25 28 31 32 +5 7 8 9 10 13 14 +26 23 21 20 17 +49 52 54 55 56 +34 37 40 42 44 45 48 50 +11 14 17 18 19 20 22 24 +17 14 13 12 9 8 6 +81 79 78 76 74 73 72 +71 69 66 65 64 61 59 +77 80 81 84 85 +5 8 10 11 14 17 +27 24 23 22 19 17 +68 67 64 62 59 56 +23 25 28 29 30 32 +92 89 88 86 83 82 +62 64 65 68 69 72 +25 23 21 18 16 +69 70 71 74 77 79 +72 71 69 66 64 62 +10 8 5 4 3 1 +35 38 41 43 46 47 49 50 +83 82 79 77 75 72 +41 38 35 34 31 28 27 24 +60 61 63 66 68 69 72 74 +54 57 59 61 62 63 66 67 +78 81 82 85 86 89 92 95 +16 13 10 9 8 6 4 +65 67 69 70 73 +48 50 53 56 58 59 61 +12 9 6 4 3 +8 9 12 13 14 15 17 18 +14 16 19 22 23 +42 39 36 35 32 29 28 27 +17 14 11 9 8 7 4 2 +60 58 57 55 53 +43 41 40 39 36 33 +48 47 46 43 40 +26 23 22 19 18 16 14 11 +41 40 37 35 33 30 27 25 +40 43 44 46 47 48 50 51 +53 56 59 61 62 64 67 68 +39 42 43 44 47 50 53 56 +7 10 11 12 14 +49 47 45 43 41 39 36 33 +76 74 73 70 67 +49 51 54 57 58 60 62 +44 42 39 37 34 +57 54 52 50 48 45 43 +71 69 68 65 64 62 +77 76 73 71 68 67 +9 11 14 17 18 +29 31 34 36 38 41 43 45 +3 6 9 12 13 16 +94 92 91 89 88 87 +8 10 13 16 18 +13 16 17 18 20 22 24 25 +56 58 59 60 62 64 +52 55 58 60 61 +69 70 73 76 77 80 82 83 +66 64 63 60 59 +84 86 88 89 92 94 95 98 +32 31 28 25 23 +23 24 26 27 30 32 +90 89 88 86 83 +77 80 83 85 87 90 91 94 +69 68 66 65 63 61 59 58 +17 19 22 24 27 +37 35 32 29 27 25 22 21 +25 27 29 32 35 36 38 +62 60 58 56 54 +6 9 11 12 15 17 20 +80 83 84 86 87 +89 91 94 95 97 98 99 +20 23 25 28 31 32 34 +86 88 90 91 93 +70 67 64 61 59 58 56 55 +17 20 22 24 25 +18 20 21 23 24 25 28 31 +98 95 93 92 89 86 +46 45 42 41 38 36 +10 12 14 15 17 20 +24 21 18 17 15 14 13 +8 10 13 14 17 20 +90 91 93 95 98 99 +39 38 36 33 31 +52 49 46 45 44 41 39 36 +64 62 60 59 58 56 53 52 +64 63 62 61 58 57 56 +90 88 86 84 82 +21 24 26 29 30 +92 89 87 86 85 83 81 78 +85 83 80 77 76 75 72 +29 32 35 37 40 42 45 +7 9 10 13 15 17 18 19 +24 27 28 29 32 33 +59 58 55 53 50 +93 90 87 85 83 80 78 77 +19 16 14 13 11 8 +99 96 93 92 89 87 +7 8 10 12 15 +21 24 27 28 29 30 32 +37 39 40 41 43 +43 42 41 38 37 +72 71 70 69 66 64 62 +30 31 32 35 38 39 42 +13 15 16 19 20 21 +21 18 16 15 13 +22 25 26 27 29 31 34 37 +41 39 36 35 32 +50 47 46 44 42 39 38 36 +79 76 74 72 71 70 67 65 +29 30 33 36 38 41 42 +73 74 76 78 80 83 85 86 +51 50 49 48 46 43 +80 79 77 74 73 70 68 66 +88 87 85 82 80 78 77 +45 46 47 50 51 54 56 57 +4 6 8 9 10 13 +1 3 6 9 12 15 18 19 +37 40 43 45 47 50 +78 79 80 83 86 +61 63 64 65 66 69 71 +22 25 28 31 34 37 +24 26 27 29 32 +91 88 87 84 83 81 +78 81 82 83 84 86 89 92 +17 18 20 23 26 +34 31 29 26 23 22 19 +20 19 16 15 13 10 +32 33 36 39 42 43 46 48 +78 79 82 83 84 86 87 89 +67 69 72 73 75 78 81 84 +62 59 56 53 50 +91 90 87 85 82 +51 53 54 55 58 61 63 +67 66 64 62 61 60 57 +80 77 74 72 69 67 64 61 +59 62 64 65 67 70 71 72 +45 43 40 38 37 35 32 29 +85 82 80 78 77 76 74 72 +71 69 66 64 61 59 +7 9 11 12 14 +73 70 69 66 63 62 61 +75 78 81 84 86 +51 50 49 46 44 41 38 +97 94 93 91 89 87 84 +8 5 3 2 1 +21 19 18 17 15 +96 95 94 92 90 87 +56 58 59 62 65 67 +49 52 53 55 56 +43 42 40 37 36 33 +57 59 60 61 63 66 68 +59 62 63 66 67 +75 72 70 67 65 64 +73 70 69 67 64 62 59 +77 74 73 72 69 67 64 +46 47 49 51 53 +30 31 32 35 36 +23 25 28 30 32 34 +82 84 86 89 90 92 +75 73 72 71 68 67 66 +64 62 61 58 55 +97 96 93 90 89 87 86 +20 21 23 24 27 +59 58 57 56 54 +64 63 60 58 57 55 53 52 +74 72 69 67 64 62 60 +23 26 29 30 33 +30 31 33 34 37 40 +87 86 83 81 79 76 +53 55 57 59 61 +26 28 31 32 34 36 37 38 +36 35 34 31 29 26 +19 16 14 11 8 5 +41 40 38 36 34 33 32 30 +55 58 60 63 64 65 66 +52 51 50 48 46 43 41 +41 38 36 33 30 +83 80 79 76 74 71 68 +45 44 42 41 38 36 33 +21 20 18 17 14 11 10 +3 6 8 11 13 14 17 18 +81 78 75 73 70 68 67 +15 16 19 21 24 27 29 32 +78 79 82 85 86 +35 37 38 40 42 +72 71 68 66 65 62 +73 72 70 68 67 64 +40 43 45 46 49 52 53 +76 75 74 71 69 66 +68 70 71 72 75 +45 43 40 37 35 33 30 29 +8 9 11 13 14 +78 75 73 71 69 67 65 62 +40 37 34 32 30 27 +79 77 74 71 69 +74 75 76 77 78 79 81 84 +44 41 38 36 33 31 28 25 +78 75 72 70 69 +79 82 83 86 87 90 91 94 +35 32 30 28 25 22 +96 95 93 90 88 85 +85 88 90 92 93 95 97 +58 55 54 51 49 +22 19 18 15 12 9 7 4 +92 90 87 86 83 82 81 +86 85 84 83 81 79 78 +67 65 63 62 61 +80 79 76 74 71 70 +14 17 20 21 22 24 27 28 +97 95 92 89 87 +23 26 27 30 32 33 35 +58 57 55 52 50 47 +67 70 72 75 76 78 81 +10 12 13 16 18 20 23 24 +65 66 67 70 72 +10 7 5 4 2 +35 34 32 31 30 27 25 +38 40 43 44 46 47 +77 80 81 83 84 87 89 92 +80 77 76 75 74 +30 31 34 35 38 41 42 +86 87 88 91 93 +77 75 74 71 70 68 66 63 +25 26 29 32 34 37 +33 31 30 29 28 27 26 +15 17 20 23 26 28 30 +86 83 81 78 75 73 72 70 +73 70 67 66 65 63 +19 18 17 16 13 11 9 8 +35 38 39 41 42 45 +24 22 20 19 16 15 +5 6 9 11 13 14 +31 34 37 40 41 44 +75 76 78 80 81 +52 49 47 45 42 41 38 35 +80 77 74 72 69 68 67 65 +50 47 46 43 40 38 36 35 +50 49 46 43 40 +83 82 79 76 75 74 +82 85 88 89 91 +22 24 27 28 31 32 33 +95 92 90 89 86 +19 21 22 25 28 29 31 +15 17 18 19 21 23 +75 78 79 80 82 +80 78 75 74 72 71 +51 49 47 46 43 42 41 +55 56 59 60 63 64 66 67 +67 66 65 63 61 58 56 +42 43 45 48 50 51 +29 32 35 36 37 +5 8 9 12 13 14 17 +81 84 85 86 87 88 90 +59 60 63 65 68 71 +43 41 38 35 33 30 +29 31 33 34 36 39 42 43 +72 69 66 63 62 60 +13 12 10 7 6 5 3 1 +48 50 53 55 57 60 +39 41 42 43 45 +80 78 75 72 69 67 64 62 +82 80 79 76 75 73 71 +46 43 40 39 38 +55 52 51 49 48 +81 78 75 72 71 70 69 68 +38 37 35 33 30 29 +36 38 39 42 44 46 49 +73 72 70 68 66 64 +10 9 6 5 4 2 +7 10 13 16 17 18 +74 72 69 67 65 62 61 58 +44 47 48 50 52 54 56 +75 77 80 82 84 85 88 +14 16 18 20 23 24 +65 62 61 58 56 54 52 +22 19 17 14 13 10 7 6 +53 50 48 46 43 41 +10 12 14 17 20 +24 21 20 18 17 14 12 +66 65 63 62 60 58 +84 83 81 79 76 73 +37 38 41 43 46 47 50 +88 86 85 82 80 78 +5 6 9 10 12 +64 62 61 58 55 53 52 +29 30 33 36 39 42 45 +89 90 91 92 94 96 +41 39 37 35 32 31 29 28 +83 85 86 89 92 95 96 99 +84 86 88 90 91 94 95 98 +77 79 82 84 87 89 91 +19 21 22 23 25 26 28 +20 23 25 28 31 34 +84 81 78 75 73 70 67 66 +11 8 6 4 3 +64 63 61 59 56 +88 89 92 94 95 97 98 99 +87 84 83 80 77 +66 68 69 70 71 72 75 +19 22 24 27 30 +31 33 35 38 40 43 +60 63 64 65 66 69 71 +70 73 75 77 79 80 82 +21 20 19 16 15 14 12 +33 30 29 28 27 24 23 20 +30 31 33 35 36 38 +19 17 14 12 11 +76 77 79 80 83 84 +29 30 33 36 39 40 42 +24 21 18 17 16 13 10 +32 34 35 38 39 41 42 43 +11 10 7 6 4 2 1 +2 3 6 9 10 +58 55 53 51 50 47 44 +49 46 43 40 37 35 +56 57 59 61 62 +80 82 85 88 91 93 94 95 +89 86 85 82 79 76 75 +57 55 52 49 46 43 42 39 +40 41 44 45 46 48 +12 9 6 3 2 +74 76 78 81 84 85 86 88 +89 91 92 93 94 97 +76 74 72 71 69 68 +42 43 44 47 48 50 53 +42 43 44 47 48 +86 88 90 92 95 +15 18 20 22 24 +74 71 69 68 65 62 61 59 +5 8 10 12 13 16 +8 10 13 14 17 +32 29 28 26 24 22 19 18 +99 96 95 92 89 87 +48 49 50 51 54 +38 39 41 44 47 48 +82 84 85 88 89 91 +39 41 42 43 46 +83 80 79 77 74 73 72 +85 84 82 79 76 75 +49 48 45 43 40 38 36 +9 12 15 18 20 22 25 27 diff --git a/src/inputs/03.in b/src/inputs/03.in new file mode 100644 index 0000000..d5130a6 --- /dev/null +++ b/src/inputs/03.in @@ -0,0 +1,7 @@ +*who():mul(420,173)what()*~why() select()how()-mul(448,672)mul(914,202){^{why()];<&;/mul(748,792)what(),$from()what()when()mul(399,982)<;)]]mul(347,549)@;*);mul(655,663) @select()~%,$#mul(535,284)*--@()]+~mul(2,513)why()mul(239,99)!?}( #]mul(162,534)#+how()}<&what();mul(685,182)mul(146,549)mul(659,511)mul(283,734)*/don't()/mul(579,121)what()mul(790,893)where()@)-{#!who()((mul(985,741)when(),$where()>do()<~''-~-mul(961,154),]select()(select()@what()mul(840,357)] when()mul(47,948))]?what()+*;+mul(331,33)who();&~~mul(983,456)mul(660,500)who()mul(414,834)where()^({>mul(961,732)#^]how() mul(869,618)mul(265,208)!when()*]mul(803,747)>*&+what()+,['mul(490,565)> >/*%mul(238,882)%+$;%&,/mul(629,355){{'/?-who():!mul(441,172):[?;mul(628,85)%%{how()]^>why()>mul(509,935)where()/]select()mul(727,783)?^@why()from()>&mul(75,582)<~!%from(){from() mul(616,901)''why()%-from()>>mul(568,812)%(*mul(833,395)$who()& ;how(112,924)why()?mul(734,354)mul(344,367):what()mul(884,545)when(753,136):{select()[mul(981,829)~!why()mul(444,22)mul(257,636)from()why();&mul(603,941)}-when()&mul(109,476)#)from()when()+;?,mul(149,108)mul(716,634)/~>:&#?mul(919,396)@why() (who()~!mul(949,950)~~:why()&mul(949,808)mul(678,162)&mul(862,475)?++:, mul(750,321)(# why()#{@/select(282,886)mul(953,52),~from()mul(408,319)?@*:#mul(308,330)select(895,376)&>#-when()do()!@*how(890,967)when()mul(607,743),^,when()}$*&mul(737,198))#[!?mul(979,606),-@+'mul(223,381)when(){+;{mul(623,192)-}@when()@'who()select()how()#don't()!where()@@&}&mul(853,100)]{]~mul(501,746)-? *mul(599,24)mul(141,255)mul(922,727)*select()>how()$who(){+mul(544,731)/from()how()who();@select()mul(609,809)?$(/why()from())mul(498,52)]:when()mul(60,285)@'$)why() %<']do()!from()from()who()::mul(894,43)#@:$mul(731,263)why()select()who(){mul(516,369)how()who()do()$;&$/[;;[mul(655,571)]from()*what()mul(192,59)+]?select()mul(453,68)from()mul?+mul(281,2){why()]~{!,mul(823,635)^/)where()]who() @'$mul(660,562):%where()why()why()%~how()mul(437,42)mul(590,3)~-mul(428,918)>what()why()&?when(742,360)?mul(786,567)%from()when()-mul(367,375)*}why()mul(455,204)/]<,]+mul(819,196)from()@mul>mul(212,199)what()/where(462,172)~when()select()^mul(794,611)mul(484,833)( ?mul(877,152)]what()mul(758,157(][&+how(){>)mul(408,379);}{when()mul(731,259)#?how()mul(246,943)who()@what(830,854){-+>@~:don't()mul(703,111) #^what()<>^do()>,>^+!mul(57,220)#<${#why()when(457,676)>what()mul(199,247)mul(768,629) +)'how()<(/)'';mul(867,986))@mul(909,468)?>from()why():<*select(700,257)>don't()mul(294:why()/&^}select()[:{mul(96,677)from()#?-when()%&&'what()mul(806,612)who()@who()<$select()mul(491,724) mul(47,119)#)^who()'mul(526,381)mul(24,969)from()[;mul(189,60)$<>when(565,624)]+#what()$[where()why()don't()[]):-who()',select(576,158)what()mul(79,672)--<>[-[mul(248,857)!<^when()]mul(881,761)^!):how()@mul(812,759)what()*>why()+~*-mul(993,256)${-when()mul-&/!what(781,304)why():mul(627,605) >(&%!where(){why(296,454)mul(990,864)!,&(select()'^mul(537,400)what()why()?-where()@:mul(752how(231,812)why()-how()where(956,169)mul(146,184)~}@%],$(who()@mul(716,486)+why()/what()+:{mul(42,180)$when()'][*how()>&mul(611,512)what(155,381):>;(mul(423,432)$,when()&where()mul(976,409)why()@ >why()~#-select()@mul(50,854)$@#mul(42,58)$when()!-#mul(326,406)~where(195,918)where()mul(3,647);['~];$how()why()what()mul(966,495)mul(324,653)mul(47,577)#+(*+^$)mul(144,392)/mul(135,506)what(729,718)don't()%'>mul(609,314)%:>*~mul(120,925)mul(765,209){select()$:#mul(741-$%!;mul(166,556)when(523,779)select())mul(820,823)%~:where())/{when()/mul+where()why()+{;mul(41,341)>~>+mul(960,552) do()who()mul(381,244)?(@+@mul(287,560)!mul(954,480)$where()mul(914,431)}!::what()(}!who()+mul(586,399)from()@why()?when()how()when()when()mul(802,73)mul(14,93)$what()why()%when()(mul(569,2): mul(793,2)mul(301,988){ mul(732,16)why()select()/^{mul(573,997)()*;;from()){mul(477,194) [mul(180,519)from()!where()@$mul(797,512/;select()?who()+how()mul(176,169)from()$when()&do()>*,when(277,359){mul(326,605)how()where()}<}:/mul(852,42)what()$)mul(12,636)mul(991,890)]^where()~'do()where()?when()-})@mul(283,368)!,@!$]$@ do()/#'why()-mul(972,409),mul(69how()!*+$where()')where(768,54)&mul(813,972)>select()]+] %#'?mul(701,332who()mul(471,905)+,mul(190,8)how()who()/mul(734,501)select()>how();from(){mul(533,838)who(386,331)how(356,935)[;}mul(373,528)%'*%mul(691,404)@'{^mul(885,376)why()-*mul(439,454)mul(743,477)((!what()][mul(606,298)[/who())how()[>mul(306,944)'when()'what()when()what();}@-mul(294,922)[why()don't()why())~![mul(516where(380,379)#who()mul(564,911)>?where()mul(53,783)#why(725,816)mul(646,866)+select()when()(mul(737,165)/mul(869,809)}mul(207,700)when(),&why()select()&@who()mul(773,864)when()$<(why()mul(320,655)^mul(131,141)when(),mul(634,514)select()&mul(483,605)+mul(934,936)where()]%:(who()]*from()mul(360,239)what(594,220)/%how()select():&#who(725,14)/mul(770,595~%%$]mul(213,299)*#[*mul(116,151)#<&!@>how()'from() mul(605,523)from()(who()mul(593,247)>select(),'who();mul(449,779)*how()+how()how()mul(956,857)do():~mul(826,140)^mul(224,267)<)who()?{-^~:mul(789,774)][*why()@-mul(443,401) what()mul(823,217)when(){*/why();>what(637,904),who()mul(264,561)]%-(how()how()mul(361,672)}when()(when()-mul(850,888)(:-'do()-+-&*mul(798,594)when()-^( )(mul(990,700)mul(822,80)mul(803,211)+ %]who()>*mul(614,212)where();how()what()mul(969,702)~[@mul(916,424)*(from()mul(119,685)'mul(242,632),mul(236,192)&}(-;from()!mul(409,803)mul(26,832)mul(179,583)%;mul(331,141)&select()mul(586,628({)~:mul(201,618)$from()]what()?*mul(346,455)mul(186,191)where() -when() ~&[)why()mul(227,155){&~mul(572,168)(from()}-:when()#where()mul(532,271)when()??:)'mul(482,565)>/^;mul(849,201))&~~-how()$mul(537,900)?+)select()mul(562,60)how()mul(80,960)/&+'!what(),@@mul(741,753),do()!>from())(~mul(434,18)mul(662,562)-'why()mul(205,696)what();from()who()mul(656,755)mul(197,722)?@what()*?*'~mul(935,826)')'%}mul(675,242)/{~mul(119,521)+how()mul(644,874)select():from()mul(538,772)why()~[%#}how()&[mul(911,456)]when()where()$)?mul(422,424)?how()!when()]+mul(931,256%!#where()?when(689,268)-^<$mul(303,826)#what()$mul(400,12)~#mul(81,564)>}who())?/+$mul(871,726)?: [how()/}what()mul(694,277)>from()from()/**??)mul(395,609))^when()why()mul(615,463),why())@*when())select()mul(363,846)'&*)!]?)#mul(355,458)- don't()^ ^-'^what()-how()&mul(631,476)/where()^[+*>;mul(89,941)^$&}from(),'do())who()select()'^+& when();mul(434,156)(:@/select()>+from()*how()mul(508,595)mul(779(/&}mul(583,481)mul(624,130)$;??- :]^mul(66,470)mul(169,109)!{,@@]*)mul(984,230>}'%?#&~#don't()why()%,#<:$'mul(251,527):select()}mul(213,941)}^$#@mul(680,847)}$,)who()^~^why(),mul+){where()where()don't()^,#;when()>why()-:mul(226,208)-who()#!~;<([mul(34,783)[when()from()]who()from()mul(421,685)mul(55,857)% -$/'when()]do()%mul(295,33)/mul(211,988)mul(492,249)select()//from()!mul(678,139)?what()why()?/!why()what()mul(62,558);~+ [don't()select()^from()~ +what()where(){-mul(46,220)why()>@~from()?{mul(78,499)/mul(13,468}{'[select()-}};do();]'}^(>-why()who()mul(458@~~who(),@;)why()/mul(56,660)mul(555,777)/$mul(660,540)@why()what()from()(!mul(317,310)^,&-+why()why()*mul(163,392)what(){}+}don't()why()%mul(593,212)+what()@mul(235,578)where()~?don't()select()&where()/#[~,+mul(540,363)who()mul(460,343)#where()select(63,367)'&^!mul(553,169)#^$ mul(521,969)where()*&select()&~why()select()/{don't();mul(853,399)$mul(808,9))how() }when()don't()^>(-mul(938,463)/*#!/usr/bin/perl^)when():mul(751,26) +mul(542,820)select()$mul(103,40)]how()? :mul(682,891))mul(837,527)+when() >mul(441,283)^ mul(603,169)select()%!mul(772,674)from()how()@^mul(222,674)from()who(),select(102,983)who()~[mul(697,571)$]:^from()~{?mul(763,249)}:,why()select(188,51)when()$select()how(412,892)[do()why()what(),&mul(258,614)mul(210,257)-)^mul(898,947)#mul(134,666)~,^mul(757,293)(where()!mul(977,413)when()))what(58,623)mul(706,330)who()where()who()select()mul(286,97) ]why())/mul(876,454)>}mul(412,509how() )+who()mul(402,110)/-%}where()when()do();^what())?()$]mul(257,787),from()!+~}*mul(250,775)when()mul(735,684)why()(from(){)^how()from()!mul(749,268) how()mul(613,859)when(424,496)from()~^[mul(450,275)how()mul(41,682)when():when()what()when()*'[how()do()&'where(271,301)@}select()~mul(745,186)',[mul(585,614)what()^@when(224,919)/#>,-mul(374,69)-)< who()~when()why(),mul(30,174)-[what(357,897)where()who()@mul(10,444)'how()'when()what()&$mul(809,809)who()?+(~what();;mul(531,509)^^^%(~~mul(119,968){why();who(677,751)who()!mul(161,854)^^ how()](mul(481,323),/:,@mul(293,345)/)what()%!what()<~mul(959,852)/+$why()^why()where(),@mul(281,314)#when()%]! -mul(347{why()select()why():)^~mul(10,106)%+?%when()mul(941,657)select()when()&,@@'@mul(250,253)#,what()mul(539,823);^*<[mul(422,155)who(){$:-&#mul:mul(61,174):why()'where()don't()select()<&+!/@&<-mul(596,236)~mul(339,838)'}mul(263,931)!how()mul(65,701)from()'/>/)mul(879,804)how() {*((mul(213,689)*[when()}what()?where())mul(727,958)mul(246,840)+mul(150,479)>?~from()*mul(552,678)?don't()$~?'mul(97,380)>mul(968,76)}#!from()mul(435,362why()#}when()*[how()'!#mul(357,345)}?why()[[mul(356,875)%when())$#mul{from()mul(289,657)from(681,624)'<;who()mul(514,298);{ mul-/[(:who():mul(789,109)where()%}what(435,852)mul(330,192)why();)$-]+mul(617,542)mul(244,889)?*%'>!mul(799,990)from()(mul(234,708) +@; ;?&]?#mul(577,752)%*)$&why()!%[mul(7,487)how(),@]select()$mul(38-?-+:^[from()#mul(252,810)who()]<+!)mul(976,357)[}mul(341,264)/#select(),%select()&mul(547,552)where()from()@+}#:mul(592,61)&how()what();select()!^select()(mul(273,4)'/^mul(446,170)%]]'~+mul(678,454)when()}select())/?#+}mul(180,876)-%%why()mul(255,652)]why()$#!mul(114,812)-?mul(207,511)[$how()+}^mul(790,315)%who()/&]do()]#@why()/mul(743,708)mul(430,155)+what()(what()'who()$<;mul(700,543)mul(574,126)mul(139,29)who()what() mul(47,32)what() [;don't(),%who() ~}{mul(176,682)>@~select()when()# %,@mul(808,816):~^)where(629,778)%>+'@mul(177,383)mul(29;what()@*mul(324,53)?'?$~-mul(509,507)$}where(929,765) ~%]what()&mul(325,403)how()-when()@how()>mul(900,560)what();@)$select(723,538) +)'mul(899,730)},}$select()*~!from(872,462)mul(269,888)+//)<(how()mul(688,635)#>$+)mul(62,201)from()/@,*<,:{mul(808[!-from(),why()~@'{mul(719,116) don't()+where():)mul(139,220)what()*>who()mul(162,455)who()~mul(460,418)<>&?:/&}from():mul(238,979)&/!@'%~+mul(863,124)'~-*select()[@:do()why(124,979) [{'why():#who()how()mul(38,201)&/when();+mul(678,638):}>:$*select()mul(367,239),){*mul(512?>([what()@ do()[-&mul(39,285)mul(97,17)where(){^do()!:mul(347{who()'mul(316,561);mul(537,106)how(),(!mul(785,385)mul(13,891)~why()~[do()(+]who()<)mul(878,575[mul(295,693)#:!when()%why()mul(293,288);:what()>^^%(<$mul(640,998)from()}mul(340,293)mul(759,91)&(#mul(831,471)why()why()from()mulwho()who()[[^'*mul(210,542)where()%what()~?:,-don't()!mul(305,106)+#@!&,do()~%when()mul(318,660)from()when() why():$-[mul(589,949)@&do()?from()mul(455,593)${!*<~*why()#mul(371,828)where()%({ +%$mul(318,225):where()#-?#%mul(816,5)mul(363,524)mul(580,821)/where()what()*{where();mul(223];mul(830,758)~^ why()/?,>why()mul(787,428)( --'who()what()$~mul(314,163)[what()/*~<(?#?[ &select())mul(746,865)mul(101,592))}mul(133,751),;',from()mul(226%how()select()/{$!#select(553,217)do()%}mul(538,699))~when()$?* (what()}mul(755,507)+from()who()who()]how(){--[mul(483,410):' -do()where()$}mul(33,473)mul(835,106)$ {)mul(790,297)how()*where()select()where()*,mul(739,441)mul(561,91)]what()[select()%;what(){mul(601,44where()'):where()(/}<+;mul(956,550)}when()[mul(326,936)where()how();!from()-mul!/$>?mul(133,674)}what()^*}from()~!mul(39,598)+ mul(119,823)where()$$'when()[mul(524,9)&<<@$-mul(473,929)&mul(154,39)^*why()mul(454,972)>mul(819,718))!select() #{mul(176,840mul(989,933)%mul(553,654)/where())+what()what()]%mul(293,835):#/'@-when())$'mul(548,948)?who()-where()when()/when()who()where()[}@&when(225,152)do()why()!why()-;how()mul(941,10)when(798,196)[<:)%mul(9,571)from()#[*what()&&)$/mul(507,991):#?$$<('mul(959,970)^what()what()'where()%@from()%mul(508,137)}mul(230,238)]<@!,who()where()#mul(636,897)?why()%]when()?/^)where()don't()select()>@+(!mul(215,107):;where();where()mul(237,981);who()[from()>*,,;mul(357,549)!{(mul(313,524):mul(172,631)-()mul(197,822)from(510,614);how():(>(mul(450,700)&when()@'when():>&mul(572,27)]select()how()/how()~ mul(427,506)'select()%&how(955,693)~$&[why()mul(670,224)@^'>;why()#where(38,295)mul(265,471)^mul(241,265)*#+{select()when()do()from()^@>mul(444,279)}what()from(),!what()+mul(233,30))%/(&mul(24,452)how()who()where(241,512)>where(),from()^>[mul(337,620)+from(296,671)[~ who()where()}'mul(478,339)@mul(963,388)who()[select()$&mul(268,170)!;select()*)mul(192,33)what()where()mul(497,317){<+do()mul(274,822)how()why()+mul(286,147)mul(377,935)mul(696,807)^when()select()>don't())from())!when()<^mul(799,142)'where()^who()mul(616,986)from()*/mul(697,100)%(select(698,850)don't()%{from(775,182)/@}/?]mul(208,63)~~],mul(15,121)({~mul(704,468)}select()from():?/[what(){mul(707,923),when()mul(253,50),-)how()^#*::select()mul(473,468)what()$#}#:/$how()+mul(569,78)]<>(when()mul(394,997)-mul(184,736)@(@/;%~what()mul(827,383)!#)who())'mul(27,745)-$mul(246,974)how()<,$,$#mul(211,698)select()! when()mul(40,60)]why()mul(98,533)?#)(mul(442,333)who()mul(645,711)how()why(507,343)<#,mul(267,790)select()from()/]]:select()~mul(27,928)/#mul(443,725)~how()@:why()how()%mul(963,554)%mul(490,273)(@ ;-$@$mul(309,347)(mul(830,444)+'}from(){how()#&:why() + diff --git a/src/inputs/04.in b/src/inputs/04.in new file mode 100644 index 0000000..fe91c33 --- /dev/null +++ b/src/inputs/04.in @@ -0,0 +1,140 @@ +SSSMMSAMXSSSSSSMSSSSMAMSMMSMSMXSASMMMMAMXAXMAXXSSMSSSMSMMSXMAXXMAXSAMXMXMAXXMAAMMMMMAASXMSAMXMASMMSMSMSXXMSMSXAXMSMMSXASXSMMSMMXMMMMXMXAMMSX +XAAAASMSAAAASAAASAAXSAAAMMXAAAASAMXAMMSSSSSMXSAXSAAAASMAAXASMSMAMXAMASXMMSMSMMXSMAASAMXAXXXMAMXSXMSMSASMXAAAMMMAMXAASMXSAAMASASAMSAMAMXMSAMS +MSMMMSAMMMMMMSMM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MAMAMSXMSSMMMSAMXMAMXMXMASAMXMSMX diff --git a/src/inputs/05.in b/src/inputs/05.in new file mode 100644 index 0000000..911bef9 --- /dev/null +++ b/src/inputs/05.in @@ -0,0 +1,1380 @@ +76|18 +58|19 +58|49 +44|59 +44|16 +44|25 +59|33 +59|35 +59|51 +59|71 +79|28 +79|76 +79|18 +79|63 +79|44 +99|85 +99|79 +99|55 +99|36 +99|33 +99|63 +86|73 +86|63 +86|18 +86|48 +86|35 +86|11 +86|57 +98|82 +98|76 +98|35 +98|99 +98|32 +98|79 +98|95 +98|29 +46|48 +46|57 +46|75 +46|49 +46|13 +46|98 +46|93 +46|45 +46|44 +56|17 +56|32 +56|86 +56|53 +56|37 +56|36 +56|55 +56|24 +56|11 +56|85 +85|39 +85|92 +85|84 +85|25 +85|45 +85|54 +85|51 +85|61 +85|78 +85|59 +85|21 +93|99 +93|61 +93|82 +93|21 +93|54 +93|56 +93|92 +93|79 +93|58 +93|33 +93|95 +93|24 +32|57 +32|37 +32|19 +32|44 +32|85 +32|13 +32|28 +32|17 +32|55 +32|48 +32|53 +32|78 +32|11 +35|32 +35|92 +35|33 +35|28 +35|79 +35|56 +35|36 +35|54 +35|61 +35|19 +35|71 +35|13 +35|24 +35|16 +45|76 +45|32 +45|71 +45|79 +45|58 +45|24 +45|99 +45|42 +45|51 +45|54 +45|82 +45|29 +45|25 +45|33 +45|84 +37|59 +37|75 +37|86 +37|39 +37|63 +37|57 +37|93 +37|44 +37|11 +37|42 +37|85 +37|18 +37|16 +37|53 +37|36 +37|48 +18|61 +18|21 +18|51 +18|84 +18|73 +18|17 +18|45 +18|39 +18|35 +18|59 +18|48 +18|31 +18|53 +18|54 +18|75 +18|71 +18|25 +13|75 +13|78 +13|86 +13|45 +13|85 +13|59 +13|21 +13|82 +13|39 +13|63 +13|18 +13|17 +13|11 +13|93 +13|44 +13|98 +13|42 +13|31 +53|54 +53|42 +53|75 +53|35 +53|21 +53|31 +53|71 +53|79 +53|99 +53|92 +53|58 +53|98 +53|51 +53|25 +53|45 +53|84 +53|93 +53|61 +53|82 +63|31 +63|59 +63|61 +63|75 +63|25 +63|82 +63|51 +63|35 +63|93 +63|17 +63|84 +63|54 +63|98 +63|42 +63|45 +63|11 +63|48 +63|73 +63|21 +63|39 +42|35 +42|95 +42|54 +42|56 +42|19 +42|33 +42|92 +42|71 +42|24 +42|32 +42|76 +42|51 +42|21 +42|49 +42|55 +42|79 +42|29 +42|58 +42|61 +42|28 +42|25 +29|63 +29|32 +29|76 +29|85 +29|44 +29|19 +29|86 +29|16 +29|49 +29|95 +29|18 +29|37 +29|57 +29|28 +29|55 +29|79 +29|36 +29|11 +29|13 +29|46 +29|24 +29|48 +19|49 +19|31 +19|18 +19|75 +19|73 +19|13 +19|16 +19|44 +19|53 +19|86 +19|36 +19|48 +19|63 +19|39 +19|98 +19|78 +19|46 +19|85 +19|57 +19|37 +19|11 +19|17 +19|59 +51|36 +51|79 +51|92 +51|24 +51|71 +51|54 +51|19 +51|33 +51|61 +51|37 +51|29 +51|44 +51|28 +51|32 +51|76 +51|99 +51|95 +51|35 +51|46 +51|56 +51|55 +51|13 +51|58 +51|49 +75|71 +75|51 +75|35 +75|42 +75|33 +75|25 +75|82 +75|56 +75|29 +75|99 +75|73 +75|61 +75|79 +75|93 +75|58 +75|59 +75|84 +75|39 +75|31 +75|98 +75|21 +75|45 +75|92 +75|54 +54|32 +54|99 +54|76 +54|55 +54|61 +54|49 +54|29 +54|28 +54|24 +54|33 +54|13 +54|46 +54|79 +54|95 +54|86 +54|37 +54|36 +54|19 +54|56 +54|71 +54|92 +54|58 +54|44 +54|16 +78|99 +78|92 +78|75 +78|71 +78|29 +78|59 +78|93 +78|25 +78|33 +78|45 +78|51 +78|21 +78|61 +78|39 +78|42 +78|58 +78|82 +78|54 +78|73 +78|98 +78|31 +78|53 +78|84 +78|35 +84|56 +84|79 +84|95 +84|32 +84|29 +84|71 +84|36 +84|19 +84|33 +84|24 +84|92 +84|99 +84|54 +84|51 +84|55 +84|37 +84|28 +84|58 +84|13 +84|61 +84|46 +84|35 +84|76 +84|49 +71|76 +71|33 +71|57 +71|36 +71|16 +71|13 +71|99 +71|85 +71|86 +71|19 +71|29 +71|95 +71|58 +71|24 +71|37 +71|32 +71|63 +71|46 +71|28 +71|79 +71|49 +71|44 +71|56 +71|55 +95|63 +95|78 +95|85 +95|57 +95|19 +95|46 +95|44 +95|55 +95|17 +95|48 +95|39 +95|18 +95|11 +95|75 +95|76 +95|86 +95|37 +95|36 +95|53 +95|49 +95|73 +95|28 +95|13 +95|16 +28|48 +28|13 +28|17 +28|36 +28|86 +28|11 +28|55 +28|63 +28|49 +28|37 +28|31 +28|16 +28|44 +28|85 +28|76 +28|53 +28|39 +28|57 +28|19 +28|78 +28|46 +28|73 +28|75 +28|18 +92|56 +92|76 +92|95 +92|33 +92|24 +92|36 +92|63 +92|79 +92|71 +92|32 +92|16 +92|57 +92|37 +92|99 +92|29 +92|46 +92|19 +92|44 +92|58 +92|86 +92|49 +92|55 +92|28 +92|13 +11|84 +11|25 +11|18 +11|73 +11|92 +11|98 +11|61 +11|82 +11|59 +11|35 +11|93 +11|54 +11|45 +11|39 +11|48 +11|75 +11|71 +11|31 +11|17 +11|51 +11|21 +11|78 +11|42 +11|53 +55|49 +55|11 +55|16 +55|76 +55|46 +55|85 +55|37 +55|44 +55|73 +55|36 +55|75 +55|57 +55|63 +55|31 +55|17 +55|86 +55|48 +55|18 +55|39 +55|13 +55|53 +55|78 +55|19 +55|59 +31|51 +31|59 +31|82 +31|95 +31|42 +31|71 +31|25 +31|58 +31|24 +31|45 +31|21 +31|61 +31|84 +31|99 +31|92 +31|56 +31|33 +31|54 +31|79 +31|35 +31|29 +31|93 +31|98 +31|32 +73|54 +73|42 +73|71 +73|84 +73|33 +73|93 +73|24 +73|92 +73|79 +73|99 +73|25 +73|31 +73|82 +73|29 +73|59 +73|21 +73|35 +73|32 +73|56 +73|58 +73|98 +73|45 +73|51 +73|61 +48|53 +48|75 +48|58 +48|78 +48|25 +48|98 +48|45 +48|31 +48|73 +48|59 +48|51 +48|93 +48|17 +48|92 +48|84 +48|54 +48|99 +48|21 +48|61 +48|42 +48|71 +48|39 +48|82 +48|35 +24|85 +24|18 +24|28 +24|13 +24|19 +24|76 +24|36 +24|86 +24|55 +24|46 +24|63 +24|39 +24|95 +24|48 +24|57 +24|53 +24|49 +24|78 +24|37 +24|75 +24|17 +24|11 +24|16 +24|44 +25|76 +25|71 +25|21 +25|92 +25|37 +25|99 +25|33 +25|32 +25|35 +25|49 +25|84 +25|61 +25|54 +25|51 +25|29 +25|79 +25|46 +25|95 +25|24 +25|55 +25|58 +25|19 +25|28 +25|56 +21|37 +21|51 +21|92 +21|33 +21|28 +21|36 +21|95 +21|76 +21|35 +21|58 +21|84 +21|46 +21|61 +21|24 +21|71 +21|49 +21|32 +21|55 +21|79 +21|19 +21|29 +21|54 +21|56 +21|99 +16|84 +16|11 +16|57 +16|42 +16|48 +16|86 +16|53 +16|78 +16|98 +16|39 +16|85 +16|59 +16|82 +16|73 +16|63 +16|75 +16|93 +16|25 +16|18 +16|21 +16|17 +16|45 +16|31 +16|51 +39|61 +39|32 +39|25 +39|98 +39|56 +39|45 +39|92 +39|82 +39|93 +39|99 +39|59 +39|79 +39|51 +39|35 +39|42 +39|29 +39|71 +39|73 +39|33 +39|58 +39|21 +39|54 +39|31 +39|84 +33|79 +33|19 +33|11 +33|56 +33|46 +33|49 +33|28 +33|18 +33|85 +33|55 +33|63 +33|13 +33|44 +33|36 +33|86 +33|48 +33|24 +33|16 +33|57 +33|29 +33|76 +33|95 +33|37 +33|32 +17|84 +17|75 +17|42 +17|99 +17|71 +17|53 +17|33 +17|78 +17|98 +17|31 +17|73 +17|25 +17|39 +17|59 +17|93 +17|82 +17|61 +17|21 +17|35 +17|54 +17|92 +17|51 +17|45 +17|58 +57|53 +57|54 +57|18 +57|42 +57|25 +57|73 +57|59 +57|98 +57|51 +57|48 +57|85 +57|21 +57|39 +57|31 +57|17 +57|45 +57|82 +57|63 +57|84 +57|35 +57|78 +57|11 +57|93 +57|75 +82|56 +82|35 +82|24 +82|76 +82|46 +82|19 +82|79 +82|25 +82|99 +82|84 +82|51 +82|32 +82|28 +82|95 +82|71 +82|21 +82|92 +82|58 +82|61 +82|33 +82|54 +82|42 +82|29 +82|55 +61|79 +61|28 +61|13 +61|19 +61|92 +61|24 +61|36 +61|58 +61|71 +61|29 +61|99 +61|55 +61|33 +61|86 +61|46 +61|49 +61|56 +61|32 +61|57 +61|44 +61|16 +61|37 +61|95 +61|76 +49|53 +49|16 +49|17 +49|98 +49|36 +49|86 +49|44 +49|31 +49|13 +49|73 +49|93 +49|63 +49|85 +49|11 +49|18 +49|48 +49|82 +49|57 +49|37 +49|39 +49|78 +49|75 +49|59 +49|45 +36|98 +36|31 +36|53 +36|63 +36|45 +36|75 +36|59 +36|44 +36|85 +36|11 +36|13 +36|39 +36|42 +36|86 +36|93 +36|73 +36|18 +36|78 +36|57 +36|48 +36|82 +36|17 +36|25 +36|16 +76|93 +76|39 +76|75 +76|73 +76|44 +76|16 +76|63 +76|86 +76|59 +76|46 +76|57 +76|37 +76|31 +76|11 +76|36 +76|48 +76|85 +76|17 +76|78 +76|49 +76|13 +76|53 +76|19 +58|99 +58|29 +58|76 +58|36 +58|56 +58|33 +58|79 +58|32 +58|63 +58|37 +58|86 +58|28 +58|11 +58|13 +58|24 +58|44 +58|57 +58|95 +58|46 +58|85 +58|55 +58|16 +44|18 +44|31 +44|21 +44|73 +44|42 +44|98 +44|53 +44|48 +44|57 +44|86 +44|11 +44|45 +44|93 +44|17 +44|82 +44|78 +44|63 +44|75 +44|84 +44|39 +44|85 +59|24 +59|82 +59|95 +59|45 +59|56 +59|61 +59|32 +59|29 +59|42 +59|98 +59|79 +59|21 +59|99 +59|93 +59|84 +59|58 +59|92 +59|28 +59|25 +59|54 +79|57 +79|46 +79|24 +79|86 +79|13 +79|11 +79|37 +79|56 +79|36 +79|17 +79|78 +79|48 +79|55 +79|16 +79|49 +79|19 +79|95 +79|32 +79|85 +99|76 +99|57 +99|46 +99|16 +99|29 +99|13 +99|95 +99|28 +99|32 +99|56 +99|86 +99|19 +99|11 +99|49 +99|18 +99|24 +99|37 +99|44 +86|59 +86|39 +86|17 +86|75 +86|98 +86|85 +86|93 +86|51 +86|21 +86|25 +86|53 +86|78 +86|84 +86|45 +86|82 +86|31 +86|42 +98|28 +98|25 +98|84 +98|51 +98|42 +98|71 +98|61 +98|21 +98|55 +98|45 +98|24 +98|92 +98|54 +98|33 +98|58 +98|56 +46|16 +46|37 +46|53 +46|59 +46|39 +46|36 +46|63 +46|78 +46|31 +46|86 +46|18 +46|11 +46|85 +46|73 +46|17 +56|48 +56|78 +56|13 +56|44 +56|49 +56|57 +56|18 +56|46 +56|19 +56|63 +56|76 +56|28 +56|16 +56|95 +85|73 +85|98 +85|17 +85|53 +85|31 +85|75 +85|93 +85|18 +85|48 +85|11 +85|42 +85|82 +85|35 +93|51 +93|35 +93|28 +93|29 +93|42 +93|45 +93|55 +93|71 +93|32 +93|98 +93|84 +93|25 +32|18 +32|36 +32|46 +32|16 +32|95 +32|75 +32|76 +32|49 +32|63 +32|86 +32|24 +35|46 +35|37 +35|29 +35|49 +35|58 +35|55 +35|99 +35|76 +35|95 +35|44 +45|19 +45|95 +45|61 +45|56 +45|28 +45|21 +45|35 +45|92 +45|55 +37|31 +37|17 +37|73 +37|98 +37|45 +37|13 +37|82 +37|78 +18|78 +18|98 +18|42 +18|82 +18|93 +18|92 +18|58 +13|25 +13|16 +13|57 +13|48 +13|73 +13|53 +53|59 +53|73 +53|29 +53|39 +53|33 +63|85 +63|53 +63|18 +63|78 +42|84 +42|99 +42|46 +29|56 +29|17 +19|93 + +21,84,35,92,58,33,29,79,56,24,95,28,19,46,37 +46,17,63,48,59,76,75,78,16,73,49,53,57,18,36 +56,55,76,19,37,36,16,86,57,85,18,48,78 +25,73,98,54,21,59,39,45,75,71,99,92,82,31,35,33,42,51,61,29,53,58,93 +82,53,42,58,59,33,39,21,25,51,71,78,45 +73,31,98,78,84,75,53,17,93,21,39,92,48,82,58 +71,16,46,32,54,29,44 +44,63,17,31,82,86,93,39,37 +25,28,21,54,92,99,24,46,71,42,56,32,84,51,55 +49,37,36,13,44,16,86,57,63,85,11,18,48,17,78,53,75,39,31,59,93,98,45 +11,18,48,17,78,53,75,39,73,31,59,93,45,82,42,25,21,84,51,35,54,61,92 +17,39,85,75,16,86,48,59,98,49,53,13,57,11,45,63,37 +36,49,16,73,78,76,57,75,55,44,19 +39,73,31,59,98,45,82,42,21,84,51,35,61,71,33,29,79 +18,93,39,54,45,31,17,92,51,82,11 +11,29,55,57,76,48,18 +84,42,61,98,28,82,71,35,21,32,79,93,56,54,99,92,25,24,58,29,51 +98,82,61,31,53,73,92,21,33,93,58,99,25,54,75,29,71,35,59,42,84 +54,61,71,58,33,29,32,24,55 +75,82,84,71,33 +37,95,36,28,24,11,18,85,57,19,13,63,76,86,16,46,75 +32,56,61,31,51,59,82,33,79,58,21,29,71,54,45,98,93,84,92,35,24 +42,21,84,58,99,29,79,32,24,76,46 +45,75,31,85,18,11,98,25,59,93,82,13,73,63,57,16,39 +37,55,78,13,76,86,46,85,11,24,63,19,36,44,75,16,53 +61,86,29,16,24 +17,39,73,31,59,45,82,42,54,92,99 +17,78,53,75,73,31,59,93,98,45,82,42,25,84,51,35,54,61,92,71,99 +37,18,95,44,57 +63,18,31,59,39,25,11,48,57,44,53,98,42 +84,35,21,54,71,42,61,78,48,82,98,93,31,58,51 +76,78,13,37,32,85,16,24,49,28,11,57,46,63,95,19,18,44,17 +32,24,95,55,76,19,46,49,37,36,13,44,16,86,57,63,85,11,18,48,17,78,53 +13,85,19,17,36,16,63,39,78,86,57,48,37,18,75,46,95 +24,32,25,46,61,49,99,84,56,54,19,28,55 +57,63,85,11,18,48,17,78,53,39,73,31,59,93,98,45,82,42,25,21,84,51,35 +63,37,28,57,46,86,13,55,29,71,56,33,44,95,32,16,99,19,36 +92,61,79,25,99,33,24,28,21,82,76,35,19,71,42 +95,56,25,71,21,51,99,92,29,35,98,58,24,55,61 +98,53,46,13,63,11,37,93,18 +53,57,76,78,18,39,37,19,55,13,17,86,95 +39,73,31,59,45,82,42,21,51,54,61,92,99,29,56 +48,75,39,73,59,93,25,51,54,61,58 +51,53,21,39,84,57,31,35,25,59,93,85,78 +56,76,55,54,28,49,36,37,71,24,99,32,33,95,58,46,13,35,44 +95,28,55,76,46,49,13,16,57,63,85,11,18,48,17,78,53,75,39 +16,56,63,36,49,11,37,86,57,19,28,95,55,18,48 +73,31,59,93,98,45,25,21,84,35,54,61,92,71,58,99,33,29,79,56,32 +44,73,18,55,63,16,48,49,36,78,76,31,13 +75,73,31,59,93,45,82,42,25,21,84,51,35,54,92,71,58,99,33,29,79 +33,29,35,32,99,56,49,84,36,46,51,95,58,76,19,54,71,61,55 +11,31,85,78,73,59,42,84,35,53,21 +78,76,86,57,95,85,55,63,24,46,53,19,44,17,37,49,28,36,16,13,11 +29,33,45,76,61,82,24 +25,18,86,21,82,75,31,98,44,63,73,85,39,17,78,53,59,42,93,11,45,48,16 +79,75,59,21,71,93,29,33,82,54,92,35,99,51,31,73,98,39,45,25,42,84,58 +63,99,85,44,36,95,58,49,57 +99,29,79,56,32,24,28,55,76,46,49,37,36,44,86,57,63,85,11 +13,44,16,86,57,63,85,11,18,48,17,78,53,75,39,73,31,59,93,98,45,82,42 +32,95,58,33,79,21,35,93,42,71,28,61,84,29,24,25,98,99,56,54,92 +44,57,98,75,18,17,31,16,93,13,73,63,37,49,46 +85,17,78,53,75,73,59,93,98,45,82,25,21,35,54 +92,71,51,56,84,42,79,46,55,19,21 +54,29,36,61,56,79,33,44,71 +86,11,48,17,53,75,31,93,25,21,84 +95,28,76,49,44,86,57,85,18 +11,18,48,17,78,53,75,39,73,59,93,98,45,82,42,25,21,84,51,35,54,61,92 +19,29,55,28,58,33,44,37,79,16,95,49,85,13,36 +76,19,49,37,36,57,85,11,18,17,78,53,75,39,73 +76,37,57,85,17,39,59 +76,19,36,13,16,86,57,63,85,11,18,48,17,73,59 +16,86,57,63,85,11,48,17,78,53,39,73,59,98,45,82,42,21,84 +75,73,98,82,42,21,51,35,61,71,99,29,79 +85,86,13,11,44,28,99,49,57,56,76,37,55,95,63 +61,84,21,29,33,39,92,71,51,73,98,31,35,54,99,25,58,59,42,75,93,82,53 +19,46,49,37,36,13,16,86,57,63,85,11,78,53,75,39,73,31,59 +82,25,21,84,51,35,61,92,71,99,29,32,24,95,19 +61,92,71,58,99,33,29,79,56,32,24,95,28,55,19,46,49,13,44,16,86 +49,79,76,36,33,32,13,57,55,46,44,85,29,28,86,24,16 +98,45,82,42,21,84,51,35,54,61,92,71,58,99,33,29,32,24,95,28,55 +24,95,28,55,76,46,49,36,13,44,16,63,18,48,17,78,75 +79,24,76,19,37,36,57,48,17 +11,18,48,17,78,53,75,39,73,31,59,93,98,45,82,42,21,84,51,35,54,61,92 +36,13,44,16,86,57,63,85,11,48,17,78,53,75,39,73,31,59,93,98,45,82,42 +48,25,78,98,86 +85,18,53,73,31,82,84 +42,82,18,73,93,45,36 +37,36,13,44,16,86,57,63,85,18,17,78,53,75,39,73,31,59,93,98,82 +78,53,39,59,82,42,25,21,84,51,61,92,71,58,99 +45,82,42,25,21,84,51,35,54,92,71,58,99,33,29,79,56,32,24,95,28,55,76 +73,21,17,45,42,93,44,39,98,82,48,11,75,85,16,63,18,57,78,53,25 +84,92,71,99,32 +59,98,45,82,25,21,84,35,54,92,71,58,99,33,79,56,32,24,95 +32,19,54,44,36,95,28,99,61,16,46,37,49,79,71 +55,71,57,92,33,95,79 +61,42,85,25,39,53,73 +57,33,16,24,11,29,56,63,32,95,46,37,44,99,49 +84,51,92,55,32,82,25,28,21,24,54,33,29,56,95,58,42,35,79,19,71 +53,16,75,63,37,18,17,13,31,57,49 +85,36,17,49,37,28,73,39,11,78,18,75,19,55,48,63,76 +53,86,63,55,37,28,18,76,13,78,46,95,44,32,85 +57,63,18,48,17,75,39,73,31,59,98,45,82,42,25,21,84,51,35 +33,21,29,73,92,99,51,75,54,53,39 +63,48,78,98,86,73,31,57,11,82,42,21,53,84,93,85,16 +63,11,18,48,17,78,53,75,39,31,93,98,45,82,25,84,51,35,54 +61,71,99,33,29,95,86 +31,82,35,56,24,21,71,54,29 +31,98,21,84,92,29,32 +46,49,37,13,44,16,86,57,85,11,48,17,78,53,31,93,98 +45,82,84,55,33,42,35,29,95,51,56,28,76,79,54,21,32 +99,33,29,79,32,95,76,19,46,37,13,86,63,85,11 +21,79,46,35,71,58,55,42,32,33,92,29,24,61,54,84,95,19,56 +46,49,37,36,13,44,16,86,57,63,85,11,18,48,78,39,73,31,59,93,98 +35,54,61,92,71,58,99,33,29,79,56,32,24,95,28,76,19,46,49,37,36,13,44 +32,24,95,55,19,49,37,13,44,16,86,57,63,18,48 +36,39,86,17,57,73,18,85,75,46,49,11,31,59,98,78,48 +13,63,11,18,78,53,39,73,93,98,45,82,25 +71,56,95,13,61,24,46,35,58,44,19,29,76 +56,32,24,95,28,55,76,19,46,49,37,36,13,44,16,57,63,85,11,18,48,17,78 +32,19,18,17,86,46,79,37,28 +71,58,99,33,29,95,28,55,46,36,13,16,63 +29,95,76,32,25,21,71 +24,79,71,46,84,55,95,28,99 +46,37,36,86,44,29,33,79,28,32,18,85,49,55,57 +21,84,51,35,54,61,92,33,29,79,32,24,95,76,19,46,37 +16,61,19,56,33,54,92 +29,33,21,54,42,76,71,79,45,32,28,51,55,92,84 +33,37,28,29,46,63,13,49,86,79,56,24,55,44,18,57,32,16,76,85,19,95,36 +35,71,32,61,99,29,58 +28,49,92,13,95,61,51,46,19,36,33,32,58,76,55,24,35,56,79 +82,93,86,44,75,39,17,73,53,21,78,25,48 +93,61,79,21,84,71,56,25,35,42,54,92,29,45,95,33,24,59,32,51,58 +45,86,75,25,93,44,98,63,31,85,82 +51,35,54,71,99,33,95,28,76,19,49 +24,86,16,19,85,11,95,46,49,79,18,36,37,17,56,63,13,76,28,55,44 +49,37,86,76,33,95,79,44,13,99,46,28,85,58,16,32,24 +37,13,16,17,86,63,46,18,79,56,32 +36,99,19,44,76,29,24,57,92,58,55,46,86 +76,49,37,13,44,16,86,57,63,85,11,18,48,17,78,75,73,31,59 +53,75,39,31,93,51,35,61,71,58,99,33,29 +56,24,19,37,86,57,63,11,18 +17,44,86,55,36 +58,99,33,29,79,56,32,24,95,28,55,76,19,46,37,36,57,63,85 +53,11,95,17,28,32,85,36,37,18,24,13,19,57,49,63,46,78,86,55,76 +28,76,19,46,37,36,13,44,16,86,63,85,11,18,48,78,53,39,73 +95,19,32,79,99,35,71,61,49,29,37,58,36,28,56,24,55,51,54 +33,82,61,29,56,42,54,84,79,35,58 +28,13,55,24,57,63,44,29,48 +28,55,76,19,46,49,37,36,44,86,57,63,85,11,48,17,78,53,73 +46,49,37,36,13,16,57,63,85,11,18,48,78,53,73,31,59,93,98 +31,16,18,55,85,37,46,73,63 +45,84,16,57,78,11,48,73,98,63,17,93,85 +56,32,95,19,49,37,13,86,57,63,11,48,78 +59,93,98,45,82,42,25,84,61,92,99,29,95 +49,18,33,57,13,46,16,85,55,11,36,76,28,24,95,29,44,32,86 +18,48,17,53,39,73,31,98,45,82,25,51,71 +28,55,76,19,46,37,36,44,16,57,63,85,11,18,48,17,75,39,73 +31,82,42,25,21,84,54,99,33,56,24 +36,13,63,85,18,39,31,82,42 +95,49,85,19,46,55,57,36,18,79,17,56,44,86,32 +98,28,32,99,71,79,24,35,61,95,55,21,84 +75,92,98,17,51,59,45,21,93,54,78,18,31,71,53,25,39,42,35,61,82,73,84 +44,17,46,85,63,39,53,37,18,78,95,48,75,76,55,16,49 +24,19,49,36,44,16,86,57,11,48,78,53,75 +95,71,19,84,99,46,29,21,54,37,79,76,61,35,51 +36,11,78,48,73,53,93,59,17,75,16,49,63,19,37,57,39 +18,25,11,42,31,57,98,21,82,63,35,53,85,39,93,48,51,45,84,73,17,78,75 +45,21,35,98,99,95,58,92,42,61,56,71,24,82,59,93,32 +39,73,93,45,82,42,25,84,51,35,61,79,56 +85,86,19,36,55,78,39,53,31,46,18 +28,54,61,58,16,37,13,44,29,49,46 +11,18,17,78,39,73,31,59,98,45,25,84,35,54,92 +93,98,45,21,54,61,92,71,58,99,32,24,95 +98,21,55,82,29,56,42,33,51,84,32,54,61,79,28,24,95,58,35,25,71,45,92 +36,13,57,63,85,11,18,48,17,78,53,75,39,73,31,59,93,98,45,82,42 +54,28,21,24,42,19,82,25,33,32,95,71,35 +55,32,58,49,51,29,56,54,76,21,33,19,35,99,28,95,46 +51,35,54,61,92,71,58,99,33,79,56,24,95,28,55,19,46,49,37,36,13 +39,85,73,45,51,21,86 +61,79,92,54,76,36,46,44,49,13,99,95,58,71,55,29,32 +45,82,42,61,32,95,76 +48,53,75,39,31,93,45,42,25,21,84,51,54,61,58 +78,31,25,21,84,92,33 +61,56,98,33,29,59,32,54,93,51,35,25,73,79,99 +63,19,86,46,33,18,11 +58,42,56,84,61,46,35 +49,95,76,37,78,46,86,85,19,48,56,57,11,36,32 +24,21,51,29,45,79,71,28,32,56,35,95,98,33,42,84,58 +16,86,57,63,11,18,48,78,39,59,98,82,42,21,84 +35,54,61,71,33,29,32,24,28,19,46,49,37,36,13 +85,11,18,75,39,59,42,84,51,35,61 +78,33,98,75,42,21,58,45,73,93,92,31,35,99,61 +39,78,98,42,35,63,93,84,17 +71,76,92,55,79,84,24,51,58,49,35,99,36,28,37 +19,46,37,36,13,44,16,86,57,63,85,18,48,17,53,75,39,31,93 +28,54,21,35,25,76,55,95,49,79,92,32,33,99,71,29,51 +99,33,56,32,95,28,55,19,37,85,11 +95,46,16,85,37,28,11,13,32,63,24,17,36,19,78,56,86,44,18 +85,18,48,78,75,73,59,98,82,42,25,21,84,35,61 +29,79,56,32,24,95,28,55,76,19,49,37,36,13,16,86,57,63,85,18,48 +36,49,16,99,54,95,32 +93,58,51,56,31,92,35,61,25,82,42,45,32 +37,16,86,85,11,78,53,39,73,31,59,98,82 diff --git a/src/inputs/06.in b/src/inputs/06.in new file mode 100644 index 0000000..9ecfd55 --- /dev/null +++ b/src/inputs/06.in @@ -0,0 +1,130 @@ +.................#.#............................................#................#........................................#....... +.....#.............................................................#.......#...#........................#...........#.......##.... +..........................................................#..#........#..........#...............#.#..................#........... +..#...#..........#....#.....#......................................#......#..#............................#..#.................... +.........................#....#.............#....................................#............................................#... +.....................#.......#.............#...#..........#.................#.......#...............#............#......#......... +........#.........#.....................................#............#.....................##...#..#..........#................... +....#...................#.....##......#............#...#........................#...................................#............. +...............................................................................#.......#.....#...#................#.#......##..... +..........................................#............................#.#.................................#.........#............ +........#...............#...............#...................##......#..................#...............#.......................... +.........................#....................................#..........#.........................................##............. +.......#.................#..................................#......#....................#...............#..........#......#....... +.............#.#...#.............#.............................................#...............................##.....#...#....... +.....................................................#............................................#.........................#..... +.#...#..........................................................##.................................#............#...............#. +...........#..#........#.....#.............#.......#............................................#..............#.................# +......#.#.##...............#.......#......#......................................................................#...............# +...#........#.#.....................##...#...........................#..............................#...................#......... +..............#..#....................#...................#.................##..............#.#........................#.......... +...........................................................#.........#.......................#......................#.........#... +................................................#............................................#.................................... +..#.....................................................#..............#...#.........#.....#........................#............. +.#..............................#......#..............#........................................................#.................. +#......#.....#..#..#........#....................#...........##..............................#..#.....#.....#..................... +.................#.....#.....................#.........#..............................#..............##......................#.... +...........................................................#...##..............#..........................#....#.................. +........#..#............................#.#........................#.....#................#...#................................... +..........................#........#.......................................................................##...................#. +............#....#.............................................#.......#....#.....#........................................#...... +..........#............#....#.......................#.#............#.............................................................. +......#...#......................................................#..#............................................................. +.#...#.....#.....#......................................................................................#..........#.....#........ +...#..#.............................................................................#............................................. +............#...................#...........................................#..............#.....#.....................#.##....... +.................................................#................................................................................ +.........................#.......................................#..................#..............................#.............. +................................................................................................................................#. +...#...........................................#........#.................................................#......#................ +..#...........................................#.......#.....#.................................#....#.............#...............# +........#..............#...................................................................................#...................... +...........#......#............#............#..................................#.........#..............#.........#..........#.... +.........................#.........#.....#.................................#..................#...............##..#............... +.....#........#.........................................................#....................................#......#....#........ +...#..#.......#......#.#..................#..........................^#........................................................... +....................#.#..........................................................................#...#............................ +...........................#..........................................................#........................................... +................#..............................................................................#.................................. +...............................#............................................................#...................................#. +..............#..........................................#..............#..................#..........#........................... +................#...#..........................#.##..........#.......#..............................#........#..............#..... +...................#.............#....................#........................................................................... +....#....................................#....#................................................#..#...........#................... +....#.#..............#..........#...................#...................................#....................#........#......#.... +...........................#...........#..#......#.......................................#.......................#......#......... +.....................................................................................................#.................#.......... +...................................................#.............#..........#..............................#...................... +................................#...........##....................................................................#....#.......... +...........#.......#.......................................................................#............#.....................#... +.#........#.......#........................................#.#...............................#...#...........................#.... +..#...............#................#....#............#................................................................#........... +........#..........#.........#....................................................................................#............... +............................................................................#.............................#...............#......# +......................#................................#.............#...#............#........................................... +................................#.............#.................................................................#..............#.. +.........#.#..#...............................#....................................................#.#.......#..#........#........ +.............................#.......#.....#......................................................#..#............................ +..................#.............................................................................#..........#...................... +.....................................#....##.................#......................................#....#........................ +#.......................................................................................................................#......... +......#....#..#...........................#..#.....#........................................#..................................#.. +.......#.....#...............#....#......#....#..........#.....................#....#..........#.....#..#......................##. +..................#..........#.....#........................................................#............##...................#... +........................#....#............#..................................#....#..#.......#...................................# +.....#............................#...............................#..#...................#.....#..#........#....#.#............... +......#...#..#......#..........................#........#....................#.......#...........#..........................#..#.. +.....#.............................................................................................#......#......................# +...........................................#...................................................................................... +.....#...........................#.#.#............................#..................#............................#.......#....... +........#.......................................................#...................#.......#..................................... +...............#..................................................#.................................................#............. +..##............................................................#..............................................................#.. +.......#..................................#......................#.................................#...................#.......... +......#.........#..............#....##........#....#................................#.....................................#......# +................#.....................................................................................#.............#............. +#..#..#......#.#.....#..#.................................................................................................#..#.... +.....................#.....#................................................#.......#........#.................#........#.#...#... +..................................................................#....#..#...................#................................#.. +........................#...........#.......................................................#..#.................................. +.#.......#...................................................#..............#.......#...#......................................... +.......##...............#.............................#...........................#............................................... +....#............#....#...#........................#...........................#.#.....#.......................................... +...........................#............................#..#..................#...........................#...#................... +...........#.#.............#..........#........................................................................................... +.............#..........#...............#...##.........................#..............#...#.............#..#...................... +..................#.....#............#..#.........#............................................................................... +...........................................................#.....#..................#.......................#..#.................. +....................................#....#.......##............#.............................#...............#...........#........ +......#....................#..................#..........................................#...............................#.#...... +......................#...........................................#.....#.................................................#....#.. +.....................................#...............#....................................#.....#.............#......##........... +......................#...............................................................##.#..........#....#..................#..... +...........#.............#......................#....................#..................................#......#...........##..... +.....#.#...#...................................................................................................................... +.........#.....................................#................#.............#....#......................#..........#............ +......##.#.................#...............#..##.......................#...............#.......................................#.. +....................#.........#.......#....#..................................#..........................#..............#......... +......................#....#..#..#................................#.......#....................................................... +.........................................##............................##..#..................#..................#...........#.... +...................#..................................#................................................................#.......... +.#.............#....................................................................................#............................. +......................................#.....#.............#..#............................................#...#............#...... +.....................................#..................................#...#.......................##...................#........ +...........................................................#...................................................#...........#...... +.............................#.......#.......................................#.........................#.....................#...# +.....................#............................................................................................................ +#....#.......................................#.........#........#...................................#.....#.........#........#.... +.......................................................#......#................................##.#........#.........#..........#. +.........#........................##.....#.............................................................#.................#..#..... +....##....................................................................................................#...#...#............... +.......#.....#.......#.............#........#...............##.#......#...............#.................#..#.........#...#....#... +....................#.................................#........................................................................#.. +#...............#....................................#.........#...............................#..#..........##...#...#......#.... +............#........................#.....#...#.........#.........#..#......................................#.................... +..........#.......#.#.....................#...........#...................#.##....................#..#...#........#..............# +.......................................#.......#........#.....#...........................................#.......#......#........ +...............................#.........#..............#......................#..........................................#.#..... +............#........#.............................................#.....................................................##......# +......#.#............................................................................#......#.....#......#................#....... +.........#.............#................#.................#..###..........#.........................#.#....#...................... diff --git a/src/inputs/07.in b/src/inputs/07.in new file mode 100644 index 0000000..d78364d --- /dev/null +++ b/src/inputs/07.in @@ -0,0 +1,850 @@ +80453: 65 232 17 4 253 1 1 +11072880: 9 5 91 338 8 +251359026: 801 36 2 1 4 7 9 34 3 3 +5146105932: 3 4 73 2 105 4 1 8 6 4 8 +3217192: 32 99 49 156 33 +1240885: 980 2 568 2 2 4 85 +761411281: 8 13 16 4 1 79 76 3 6 5 8 +1773078: 300 75 788 6 78 +363734176: 5 10 32 928 2 7 177 1 1 +44388674: 64 8 9 82 4 49 75 +2405604276: 3 9 9 4 85 9 433 3 991 7 +693989: 693 333 1 30 628 +13925303275: 7 909 38 6 4 186 327 5 +63263200: 63 7 79 16 715 +8544146: 58 33 5 89 147 +869069580: 564 99 233 31 16 5 +14736199074: 5 997 63 9 3 819 4 46 +61182660: 3 3 2 95 77 697 +8680: 4 84 376 7 8 +1796382720: 934 9 62 9 6 6 64 5 1 2 8 +1158: 100 968 8 74 6 +309536: 4 64 569 4 2 +98070674452: 7 815 1 191 6 30 3 3 2 2 +765702: 6 3 85 70 3 +486500: 44 2 37 556 7 +857641310086: 653 1 1 4 9 41 8 7 5 4 8 8 +12655: 970 2 81 63 6 151 +11037: 5 8 5 49 9 657 1 1 567 +15426904: 6 9 156 2 7 5 74 14 86 3 +255584836: 82 317 56 3 2 5 5 981 1 +2795079846: 9 31 693 260 23 3 +59474651: 9 2 33 1 472 1 42 123 4 +31392: 5 3 8 7 4 22 7 326 709 8 +202335: 3 1 195 2 615 719 +10072161288612: 329 76 973 414 6 12 +304800: 62 8 12 8 75 1 +410694814: 7 74 2 9 9 7 8 4 602 6 22 +37200044757: 590 3 9 5 27 3 7 21 57 +1879341: 238 388 44 6 3 3 +1199889306: 52 8 4 1 9 8 11 8 316 18 +531918519: 9 4 48 1 504 1 8 7 189 8 +13077712: 653 88 52 2 6 +2861487998: 74 58 10 921 379 97 +7476829: 51 274 535 645 94 +162477: 2 799 4 64 9 97 +166412: 7 78 8 9 975 1 3 +451743: 3 4 624 7 6 9 578 7 1 1 2 +92311037059: 9 4 4 9 7 1 9 61 9 91 51 7 +67295279430: 2 82 3 1 4 67 7 99 6 2 9 +8793: 822 1 4 1 10 476 1 39 8 +3794488742: 949 7 425 5 84 8 211 2 +1579094: 2 97 2 5 72 54 2 563 3 +25871540: 4 14 7 871 539 +805: 3 777 23 4 +592118916732: 30 783 6 71 7 24 7 7 9 4 +995405888: 625 5 158 546 9 416 +6335512: 633 509 2 39 9 +24861: 322 77 65 +70077355183: 2 6 685 3 773 551 74 7 +7674310: 64 2 98 595 1 +53167296001: 50 4 50 60 510 10 52 8 +9921503: 21 79 9 91 2 4 3 3 2 9 8 5 +26477554: 7 214 1 9 557 943 2 +4451398: 8 5 2 9 355 9 179 3 6 4 2 +18133152: 3 185 8 87 96 +4075412211: 815 5 3 1 247 875 13 +149028: 749 27 32 6 6 +3932866: 9 25 971 5 9 3 6 6 8 8 12 +2115650020: 77 223 86 61 4 205 +31439100: 9 64 8 19 72 87 7 7 4 75 +16388: 3 27 8 74 87 +1418098: 1 4 47 5 7 7 6 5 6 85 +178644: 9 7 1 864 2 +350280828: 4 15 7 3 713 315 825 +307320304: 4 985 78 30 4 +2362320: 7 5 158 85 144 +142823: 307 9 134 32 1 44 +2721809: 30 907 6 48 8 69 84 +3950727505: 2 20 5 3 13 7 9 5 43 7 5 2 +131968643: 2 9 2 1 4 1 1 903 730 8 2 +2757417345: 851 193 93 4 64 71 1 +572376238: 7 647 87 814 74 +11313873117: 3 36 68 3 7 6 5 786 478 +445454: 25 3 2 88 11 8 50 7 +241: 17 1 8 3 3 7 +265704964: 7 54 2 5 7 1 8 29 2 6 1 4 +25524498: 8 573 348 8 2 14 764 8 +41898086205: 20 94 1 872 31 824 +30006791: 28 6 4 4 5 3 6 8 864 7 2 1 +161840: 44 4 48 8 7 3 +529760419: 9 3 6 8 85 8 1 22 1 208 2 +10827556512: 500 581 1 4 3 5 5 6 515 +278813227280163: 9 968 913 352 50 5 4 8 +107410: 1 4 5 74 11 +111966: 6 703 59 85 391 9 7 +1820799016210: 1 43 9 58 9 9 5 1 1 62 10 +34086: 51 2 6 1 46 2 90 9 409 +658814461: 4 82 68 6 76 8 5 2 784 +6248684908090: 762 965 19 3 7 49 2 39 +49325079: 39 87 367 227 23 73 9 +128180486: 419 8 956 4 6 +12146408: 482 70 3 6 4 2 +46151352: 4 7 1 6 5 5 17 8 8 5 5 950 +268237: 6 51 4 78 37 +75087: 7 149 7 1 213 7 71 469 +2030410: 57 9 10 7 4 554 +8190500163: 21 7 12 9 946 538 7 +4627959995970: 66 7 1 7 959 995 9 73 +472457: 471 180 941 304 33 +2843491: 9 2 1 5 2 59 990 71 9 +1662060690: 281 528 94 83 2 59 8 3 +71528448486: 4 51 6 758 44 2 8 73 5 +159099841: 7 231 81 1 22 +12663773526: 4 2 2 11 6 3 6 47 5 22 2 +927300212: 9 4 4 90 781 2 2 85 388 +6782849: 4 6 5 3 68 8 8 598 1 8 8 +299601: 287 1 83 2 62 355 5 4 2 +51682789: 4 9 44 68 9 9 6 579 5 86 +153393346: 22 66 7 45 9 427 +102623: 89 3 8 48 7 82 6 +27139448: 79 6 3 8 1 681 7 9 8 2 9 +44209555513: 44 209 55 49 6 13 +19102: 9 970 1 1 19 6 96 9 390 +90534: 8 5 830 104 54 +25134318083801: 364 9 984 869 7 803 +84393891730: 7 85 7 405 403 91 3 55 +790: 1 19 5 63 5 +12009921: 3 50 8 9 921 +9781206: 4 473 8 858 6 3 +5218166016: 5 51 5 4 558 2 7 8 6 7 7 +14119: 3 2 435 32 7 +219619443: 586 9 359 114 38 4 9 3 +494506865160: 8 3 4 12 84 7 2 7 8 603 5 +25643796039: 18 694 3 4 5 5 5 2 67 9 7 +6715112: 9 2 8 201 29 1 4 2 4 1 99 +4608: 4 433 1 2 1 1 2 40 5 18 +991684: 5 3 9 77 27 +369627102: 461 342 691 88 8 +12453: 67 2 1 45 9 1 51 +41985868: 4 457 208 9 867 +230112045: 2 14 340 940 5 9 37 8 +1558443235357: 25 4 5 740 3 2 3 9 22 6 6 +7658313312: 2 463 1 31 4 557 897 4 +21551778: 536 7 441 7 9 1 41 +350465040: 2 1 740 2 800 6 4 4 37 4 +99964808: 9 4 534 52 10 +5550930: 52 7 37 238 1 405 +22715297428: 8 739 7 14 782 8 217 +384007419: 320 120 7 41 8 +25916002: 16 42 9 80 550 +80805925: 5 676 2 6 733 4 4 6 +136800: 227 1 5 15 8 +2656155: 9 6 74 53 8 82 9 +16286: 1 7 7 676 61 +1139100: 92 2 146 83 7 +623772543: 529 89 6 51 725 40 +1142: 14 42 23 42 405 84 +50415: 50 841 7 14 30 4 7 +301413: 42 9 6 99 900 92 849 +848103923: 6 14 810 392 4 +53940: 51 54 741 24 62 +144491721762: 1 2 994 46 8 6 3 33 19 7 +45386287: 784 29 437 39 931 37 +10108943: 130 877 3 894 4 +21658: 9 1 5 7 55 47 4 4 82 4 1 2 +759325513853792: 83 95 963 138 5 37 93 +722643: 289 8 4 24 92 153 +399639247996: 3 370 109 36 79 95 +3051058: 40 2 280 11 38 +1202: 4 962 233 1 2 +4727573267: 6 69 9 367 57 1 1 4 70 1 +52677907: 49 461 313 10 33 7 +10050892265: 5 86 35 915 8 922 66 +2987: 34 79 78 217 6 +583746: 583 7 46 +9646: 36 7 38 1 69 +2807723736: 46 137 41 495 9 9 +18826860280: 8 8 547 76 3 1 8 8 1 44 8 +971981682: 97 1 9 453 363 82 +5977403: 8 51 1 77 393 7 +14303180: 528 901 4 9 178 +36134415: 6 4 20 7 7 2 931 463 9 +35109: 38 634 30 50 9 +12606003: 4 4 5 75 764 +17683203483: 5 3 6 73 323 95 4 1 255 +355577: 901 7 795 9 5 8 16 +654126: 7 7 1 6 89 5 8 5 1 5 6 96 +762858: 7 636 3 754 9 152 1 6 +4466521: 67 7 4 6 77 4 57 1 +40257693486: 349 1 2 9 10 8 71 37 4 9 +26709004: 3 4 151 981 84 98 2 +32746679: 71 79 6 648 9 +39625: 1 4 748 52 469 +9709: 97 248 9 617 1 +144459502: 1 164 42 4 23 651 2 +235672: 360 61 128 82 31 4 89 +514215: 8 61 110 30 41 5 4 25 3 +626870234975: 9 3 5 6 25 2 67 14 497 4 +343752250: 902 74 103 1 50 +867: 2 8 2 41 2 45 +229252821: 9 6 339 6 49 919 +335358: 353 95 8 +1260845177: 3 93 45 1 533 515 2 2 5 +35513409: 5 8 74 558 2 31 367 +4811913: 473 7 6 2 2 5 3 45 38 73 +1593555586: 9 122 2 54 2 7 1 1 5 5 8 8 +386835: 187 5 4 6 8 934 205 +6294685256: 9 62 4 113 9 6 7 4 662 +2094621: 9 9 5 826 127 8 6 7 1 6 +223546540: 3 7 5 3 87 6 5 571 28 8 5 +3562: 306 1 501 +3251820: 6 34 5 3 639 6 6 102 9 4 +47425: 4 3 8 80 5 7 8 5 8 1 58 6 +17359545: 577 1 15 3 21 131 1 2 3 +44797453: 57 44 8 44 5 1 4 51 +1167206: 35 6 5 116 427 779 +44153: 6 8 19 659 +661320: 5 5 6 6 5 402 7 6 3 167 +459856: 535 24 1 8 82 +1093763483: 4 2 64 11 7 6 7 685 9 8 +587890: 58 1 1 6 46 1 9 1 79 5 3 +3152812902: 38 9 1 72 4 6 8 4 3 5 70 +991368: 991 3 5 8 7 +26501810: 1 24 356 287 9 27 230 +831526448802: 203 30 72 409 800 +107361118: 3 7 18 93 9 9 509 802 +903435238: 991 2 214 6 355 +2494172365978: 5 42 4 958 42 8 7 29 6 4 +66960781: 9 63 930 7 80 +2954430774: 29 9 62 85 9 723 50 2 +1843044: 1 5 3 959 4 8 17 7 5 7 7 6 +1515944541939: 639 77 237 861 13 6 +15580038: 2 7 69 16 6 24 7 390 +557225206481: 85 72 69 65 27 8 6 478 +663960349137: 4 36 37 6 404 767 111 +446472: 9 9 8 689 1 +55448739: 553 7 7 840 34 1 10 +139151273: 8 6 1 608 2 2 3 8 1 1 27 2 +8745053673: 5 10 83 9 29 6 634 9 3 6 +567594: 4 8 2 3 472 5 7 52 94 4 2 +1563994: 6 4 5 401 78 89 5 +113165: 537 7 6 2 2 1 546 5 +3191: 237 1 745 1 78 +2692218: 10 964 691 4 9 73 +1339821860: 670 33 619 9 9 40 589 +496620: 5 4 2 2 154 587 888 36 +1414877058462: 360 9 3 8 4 1 98 459 2 +1491097042: 1 710 21 1 8 6 945 99 +445501530: 4 45 5 90 142 8 5 25 +647931: 17 90 7 113 7 42 1 +1215: 4 7 1 93 3 +31518901471558: 8 41 851 9 52 3 944 1 8 +1797: 1 5 9 69 8 9 991 8 650 8 +9543: 89 41 43 9 547 +132436687408: 55 3 5 4 583 2 925 8 8 3 +13224041600: 1 4 748 902 784 5 1 1 +33761367370: 722 868 481 2 8 56 6 4 +427416: 46 23 172 36 63 105 +32747264: 13 4 7 1 2 8 4 6 4 8 8 29 +2839: 458 6 7 3 81 +3430168: 921 4 3 66 7 9 4 9 7 6 2 4 +346202395: 341 5 125 77 396 +16819164083: 552 549 555 7 3 7 +41630: 15 793 8 89 46 +48577788812329: 771 9 68 4 7 81 2 3 28 +13311605: 18 739 5 81 376 3 8 +704954971: 747 5 248 540 7 91 +29030550: 7 1 20 3 8 4 4 1 105 39 6 +66521838: 4 371 5 8 310 9 3 8 5 5 +380988: 5 3 39 7 96 3 4 7 +123491364: 17 46 842 84 274 +2025360000: 79 1 1 580 10 45 97 +55161058858: 9 913 636 222 354 5 8 +2507866928: 70 4 457 356 6 +4912132550: 97 1 2 3 5 1 1 4 3 254 9 1 +56991: 32 4 74 2 6 43 6 1 98 +661189130: 7 4 6 2 4 39 9 5 917 5 7 1 +13350852: 6 59 1 5 2 320 839 1 6 9 +6790: 9 1 15 1 8 84 4 62 5 +22855536: 3 3 4 396 614 +199118969: 7 1 5 9 42 554 9 4 7 8 7 +402931407: 36 8 8 5 4 4 1 743 873 +5695722994: 982 58 757 472 94 +54060007: 7 60 15 7 858 +3759488: 4 9 41 87 1 802 9 4 2 8 4 +1719433: 1 625 8 936 31 +3701529415: 790 32 562 45 4 12 +268276291: 46 6 8 5 9 9 762 92 +1129772527: 26 899 7 3 7 2 1 530 +64155: 6 761 7 1 2 2 4 194 20 9 +53740: 9 5 2 3 6 115 9 7 1 704 2 +5177612188: 4 88 457 36 4 70 13 2 +51687: 4 1 8 6 62 4 1 9 908 686 +171158415: 759 41 55 39 18 +160706087: 5 356 86 3 5 9 6 3 +375053: 1 9 164 4 1 57 507 569 +227289829: 2 9 184 5 6 6 10 7 2 98 +371838930252: 37 18 389 2 56 46 51 +363488: 864 7 42 315 1 +1779996: 329 3 90 74 57 +4874444999: 5 193 82 1 5 7 176 7 5 6 +5253: 3 49 5 1 3 +815: 5 3 65 8 5 +38820: 865 44 11 5 744 +3980: 9 8 2 3 6 1 76 5 3 2 8 4 +2057374: 33 7 565 11 34 +126929: 6 3 9 7 927 +121779: 555 53 3 6 87 34 165 9 +41269: 157 5 52 448 3 +1095433: 316 1 33 493 32 +759: 2 1 9 69 +9590393: 304 15 6 798 3 +8186291236: 818 62 91 238 1 +156397000: 6 9 6 4 6 2 1 783 88 250 +140024803776: 2 488 505 54 807 4 88 +253929288: 552 46 9 28 9 +53475506: 562 58 32 95 6 +316964278497: 566 56 427 8 48 1 4 +1987: 9 3 73 8 8 +18061344: 6 330 1 96 87 9 6 7 6 35 +1093604: 6 269 913 7 92 +52749645553: 1 975 6 4 2 8 7 172 7 9 7 +55123: 5 689 2 8 3 +1018: 9 43 66 7 +45663: 34 4 12 35 28 +221867989: 913 27 1 99 3 797 9 +17413621878: 290 227 6 13 5 78 +39627552: 81 91 896 169 6 33 7 2 +623627490: 3 7 260 3 1 27 3 6 470 +210555237: 1 1 6 319 2 2 2 3 6 23 5 +111797277: 5 837 4 4 1 981 8 5 9 8 6 +4489668616: 3 663 30 9 4 6 22 57 7 +70992: 61 648 9 4 +10136086086: 8 515 36 246 7 5 411 +125553456: 415 19 84 9 4 +432099851242: 3 9 8 9 5 998 5 1 17 7 2 1 +1197740: 57 15 53 14 +9841: 3 51 2 6 2 24 52 6 104 7 +1095765: 251 9 1 2 7 32 4 5 6 1 4 5 +1418604: 153 843 4 1 487 954 6 +395781: 40 38 98 4 54 +19638635: 2 2 4 71 49 722 9 226 +4122: 1 2 963 4 225 +259532427: 59 7 1 434 426 +9280106: 256 725 3 5 86 5 +36067626950: 89 15 83 8 27 953 +1320: 9 59 553 146 93 +144106119080: 98 94 971 6 15 77 +14557125649733: 8 1 8 554 811 986 8 7 5 +1677997: 1 26 63 1 385 4 9 94 +336386821: 10 5 32 550 73 187 7 +59025094863: 4 4 36 287 39 6 779 3 +96589446: 7 91 675 9 818 5 3 2 +7317283837: 4 60 18 67 114 34 3 +90806: 7 2 7 7 92 +96480541939: 459 431 15 21 21 +873: 33 1 4 23 +1695206159: 221 851 285 2 4 90 +6130571: 2 61 61 5 68 +39372208: 1 8 8 7 99 20 35 4 7 8 +18612096: 4 112 16 94 5 5 60 96 +6853511: 85 51 587 75 1 9 +266310616: 40 1 8 9 8 66 6 1 6 +9981672331684: 53 4 4 68 76 4 981 7 4 +44867478: 4 4 8 649 9 8 4 92 7 379 +76841: 18 4 754 93 23 +43763: 429 83 24 45 653 58 +362472323020: 891 1 3 53 17 9 460 4 5 +46448727: 7 1 5 3 9 6 81 8 6 6 67 6 +2461730: 82 3 17 32 +5284: 63 20 5 60 6 +116: 55 54 7 +939960134464: 71 752 681 95 7 1 131 +953880648: 2 362 8 67 83 503 +2976255212785: 87 4 3 30 95 7 3 2 786 +62433231224: 52 43 2 292 2 5 698 1 +2687832: 68 77 97 252 2 +9445356541: 5 8 37 30 5 5 163 41 9 1 +340425769: 12 73 89 45 772 +1097: 4 8 54 459 1 2 46 +5042559329287: 9 7 2 2 5 5 796 8 8 81 2 7 +10847196: 69 6 4 3 898 4 2 4 9 9 30 +18516887: 661 2 91 28 740 +391114505: 7 3 19 3 5 2 5 386 7 15 5 +28751890: 7 5 4 53 62 11 85 88 7 3 +3775884100: 65 101 4 50 58 +4291172291: 395 831 5 246 7 91 +4553304576: 93 765 376 8 64 +262: 4 56 66 88 48 +5949008: 586 8 80 320 691 +21516: 94 1 54 2 498 2 +499402575: 975 156 6 616 6 3 545 +15886516: 6 23 8 45 914 314 +566023992: 3 45 3 6 119 14 35 +1788409: 57 663 31 854 2 +761967136: 17 46 60 884 904 +1348913535713: 47 287 13 535 714 +1793: 4 424 1 2 86 8 +1541149: 570 52 7 35 7 5 1 89 7 +879: 26 357 496 +19725338: 52 7 995 48 7 458 +1407751082089: 9 5 7 7 91 9 138 7 5 49 8 +119: 2 3 2 53 6 +967365: 967 3 66 +75140232: 75 139 743 457 29 +2095326: 54 715 57 6 3 1 806 3 9 +8469341066: 4 3 66 4 8 8 66 2 8 907 9 +4527087: 2 20 17 93 9 30 86 +14688: 27 1 9 5 5 3 4 6 9 5 94 14 +764545: 2 8 1 4 37 66 594 9 67 +10374592350: 110 351 17 94 349 +93138130236: 7 225 5 2 8 5 4 1 29 591 +6309501: 381 92 5 2 4 2 6 9 1 6 1 8 +144372247: 67 59 267 8 7 +32204: 8 333 63 78 7 8 592 85 +12794630625: 395 789 6 88 48 5 5 45 +147538: 92 47 8 535 4 +341844: 506 7 7 1 6 2 8 8 1 976 3 +113702: 9 76 166 149 8 +1523526690: 3 91 5 41 6 140 93 6 90 +4914429: 44 5 6 51 4 438 69 +20976: 36 8 64 1 40 3 9 46 +645125222: 5 15 7 8 20 7 4 4 8 58 9 2 +18774236: 474 50 35 7 358 +65485435: 8 5 7 6 8 7 5 517 4 69 9 3 +43201942787: 54 686 79 278 7 +2213: 579 651 2 418 2 8 553 +1925205028706: 7 3 7 3 4 4 3 887 8 654 6 +2196748: 5 5 122 311 8 2 6 487 4 +7402752: 9 33 72 8 3 102 +135500: 767 969 1 78 14 +8821063171: 94 209 449 9 173 +16207705800: 7 2 130 22 834 755 +67661: 3 18 641 14 60 +2704169: 3 1 1 51 3 1 2 72 6 9 283 +4658180909: 36 5 4 6 566 5 81 8 8 80 +7562497803: 75 549 75 977 2 3 78 +108818150: 141 45 49 1 4 2 25 7 +55201563135: 51 4 194 7 563 138 +17: 9 4 4 +280065690098: 64 1 9 7 41 9 49 84 775 +250635474: 7 574 770 7 393 5 9 1 9 +22949642: 75 995 383 5 7 8 2 +3338140: 7 3 26 963 1 2 9 4 1 370 +8629264656: 63 89 45 2 68 342 +17658484538: 966 914 1 227 20 +990156: 2 987 973 178 4 +5098320: 49 6 67 4 6 5 9 776 5 9 +83260: 802 8 84 11 92 +91848: 288 47 9 267 1 +113480: 67 9 34 3 480 +187926960: 5 82 8 310 871 +928486: 871 2 95 35 2 61 871 +38547: 494 78 1 8 6 +350258: 8 4 99 5 8 4 9 6 6 78 8 2 +32403520: 9 8 4 16 111 1 8 3 5 40 8 +64168545: 2 14 13 1 4 1 228 +4901: 5 1 96 5 +32185440: 61 3 744 31 40 4 7 +1791603: 179 91 867 1 95 +312242: 77 3 7 6 8 5 3 +1968834563: 948 59 1 5 65 88 4 +96959: 358 27 22 7 9 +10843626757: 299 57 87 532 633 +188756400: 1 3 586 31 49 805 +9878383: 15 462 879 5 253 +223460: 7 446 4 300 295 145 +6522815: 24 4 3 1 5 1 6 349 5 +319259894: 57 56 595 3 97 +16356414611: 4 9 625 5 345 5 3 3 1 2 2 +10925466561: 79 52 834 66 561 +210847: 2 5 2 154 83 8 63 7 91 +9771484818: 2 64 371 9 44 21 5 4 +1517: 7 1 9 701 797 +366017164: 14 22 60 17 161 +705406145: 2 278 3 57 11 9 7 3 7 39 +4320: 8 54 2 +1136938409: 1 6 411 4 794 7 619 71 +26151: 4 5 645 714 4 75 +12141509451: 64 3 1 7 22 3 7 9 1 4 6 7 +6643619611: 277 72 54 4 443 +37988330: 51 8 67 310 31 +344528998: 353 976 989 5 5 +86260: 4 3 85 7 705 25 3 2 61 6 +207821952: 9 3 442 933 7 52 9 32 +68857957: 1 377 50 85 666 44 5 +22549414: 3 5 7 517 6 7 9 10 403 8 +91219296896: 4 91 1 362 784 883 +13340717: 7 9 74 601 5 8 54 3 6 4 7 +13277825: 236 6 7 98 7 4 53 25 +34904568801: 3 5 4 7 720 8 2 327 3 66 +365440507746: 35 75 291 232 91 6 +1217646: 87 7 310 1 883 3 +4542786: 4 5 114 3 78 13 2 3 74 +2487245: 76 58 2 94 6 5 +71519: 3 7 5 337 71 4 2 3 62 3 7 +367213749: 1 5 918 171 9 2 4 +394549089609: 4 5 1 977 3 727 240 4 9 +117940712: 4 897 69 46 349 +147064770258: 41 3 69 8 81 918 8 483 +10138575600: 6 50 6 474 51 233 1 +11877: 6 5 319 9 4 +10018771: 9 8 89 5 7 4 2 5 15 9 421 +4919: 328 1 817 85 4 +1399115897647: 4 62 6 7 7 42 8 60 54 9 +702776: 8 7 483 97 8 +63862: 3 71 863 +12256176: 8 5 3 8 6 834 126 3 4 6 8 +33442856: 899 186 25 7 8 +3609624055: 7 7 8 9 9 5 2 9 704 701 3 +1730553335: 24 2 9 505 67 66 333 4 +223848: 5 471 5 6 588 3 1 1 29 8 +410887: 6 36 6 369 61 55 +71437850: 34 7 7 9 1 74 8 9 1 2 8 2 +22671: 27 793 1 336 924 +189519651: 920 89 21 5 98 +35790480396: 2 4 5 6 9 7 810 1 8 1 395 +1938893491925: 8 9 153 4 4 2 10 59 88 3 +15984845871: 465 289 53 11 4 6 4 3 1 +4178671207: 7 9 1 8 73 26 2 86 5 8 5 7 +583945973953: 8 8 8 923 71 2 5 44 33 +4632752: 734 7 5 621 9 4 +26197367269: 1 2 803 328 98 7 26 4 3 +538104: 267 2 20 94 4 1 7 +619952448: 65 9 4 6 83 4 76 10 7 10 +517041: 752 8 85 22 8 8 +97747: 3 47 630 13 34 +6739294: 91 23 88 309 5 +1637457526: 33 660 5 5 11 27 3 53 +7369541154800: 602 9 2 535 979 649 4 +3452722: 60 9 7 56 31 23 +106641041: 1 32 7 2 9 3 3 6 204 7 5 9 +12139856: 8 6 42 74 279 4 1 +8144806: 8 9 9 4 8 8 18 8 9 2 80 6 +20728968: 285 7 3 8 6 3 9 6 85 1 4 6 +824529024: 759 4 6 328 138 +24066223: 9 14 191 22 10 +15546301: 8 18 18 190 881 +2250828: 7 4 958 62 2 8 2 44 2 3 +75450608: 24 2 969 8 1 150 501 8 +879206487920: 794 3 391 805 944 +54038971: 540 38 75 21 9 2 +171363: 1 91 58 3 85 8 +885: 5 1 29 32 5 +139205608: 582 436 823 774 2 83 +39041232: 4 9 4 4 94 8 5 1 610 5 1 2 +828: 263 1 3 24 12 +3639213: 255 2 4 4 5 178 +962: 3 1 8 938 12 +925: 21 4 1 8 6 68 +5612850981: 8 8 1 76 1 9 63 88 87 45 +402040748: 5 874 92 672 76 +6343584591: 90 7 2 1 8 388 9 845 8 9 +36893: 2 91 6 733 246 3 8 5 +239916393: 7 1 765 424 2 449 731 +6784649: 643 9 5 259 647 +1834: 83 826 7 1 2 +19808: 95 2 5 116 1 5 5 2 5 4 4 2 +199130: 497 9 2 390 981 24 1 4 +218513331718: 25 571 6 91 9 6 39 5 17 +10024: 939 9 7 40 6 66 +12273646: 1 414 6 2 8 2 3 1 6 9 7 22 +13043384735: 3 2 570 56 9 4 5 5 3 644 +5929930318: 474 255 2 39 28 8 3 26 +3105664675: 8 1 701 4 2 4 2 4 674 +33549: 799 867 4 5 40 1 5 +19491: 13 2 46 3 5 3 970 6 7 6 +7281282: 49 23 8 1 2 83 +2941225352: 6 88 2 985 1 8 648 1 6 2 +743842143: 3 46 5 2 9 1 9 592 1 6 50 +3770861494685: 3 9 639 5 18 7 755 6 6 5 +230900220: 49 645 6 401 9 93 135 +139021: 27 5 3 91 8 9 96 +2339418: 687 798 5 35 9 545 +17623875: 6 3 160 2 3 45 4 4 252 3 +7093008549: 1 737 8 4 4 9 9 6 4 5 49 3 +2161990244728: 2 2 56 1 9 803 9 473 30 +4233496995055: 1 9 79 569 70 850 6 9 +49611735: 3 8 398 8 9 5 68 4 11 2 2 +314315: 4 479 11 2 7 +15718188186: 260 6 9 2 818 8 1 81 2 +241: 24 1 1 +3010: 6 48 5 4 78 +1135: 1 4 281 2 9 +81773: 40 5 43 18 +30460941: 78 7 6 9 2 815 8 3 6 1 2 2 +35705061092: 6 9 39 8 2 816 6 7 5 6 9 3 +25386661278: 4 6 5 7 82 11 64 1 2 7 5 +1759980508: 33 68 323 9 386 5 +9285284808: 519 9 943 31 963 68 +825411626: 85 6 98 359 902 9 46 +181828: 27 55 66 +3339156: 31 1 6 78 145 158 +1828013722: 5 3 2 4 9 4 42 2 1 3 9 260 +14583391061: 46 2 40 35 35 83 5 61 +11615: 1 5 54 196 50 +125065785: 9 770 2 1 52 2 8 7 4 4 7 6 +3838169: 8 1 70 7 47 922 2 8 42 +757453: 23 392 84 104 5 +25565938: 4 2 9 536 563 1 464 +31650181: 380 2 8 52 8 69 5 206 +1550195111: 7 14 2 210 5 13 6 510 9 +2288: 4 6 8 848 79 996 +10906: 2 2 4 3 574 +1857247825: 1 5 1 3 3 3 4 7 993 6 34 +519606584: 591 91 478 3 7 456 8 7 +2387585200: 909 1 445 44 134 +240706: 5 48 706 +69652758240: 4 4 95 74 9 3 2 3 5 9 4 8 +1708581168: 515 1 15 667 783 28 +3529: 6 47 8 294 1 9 951 5 8 6 +2325425: 579 6 8 95 487 +9741670662: 1 4 7 3 42 2 9 9 2 4 773 5 +38772: 75 62 188 8 68 +6401764: 2 4 367 34 7 66 +155361598651: 3 9 65 8 5 8 142 6 7 8 9 1 +77114165613: 114 1 84 821 7 2 7 1 9 2 +129739783188: 21 4 5 7 96 1 8 1 2 2 317 +5352096010: 985 566 96 1 2 +83015410: 3 734 29 65 5 2 +13959262: 93 86 951 82 484 +131105147: 69 190 49 18 232 +80465240: 2 7 48 277 19 2 34 7 +4187717: 760 9 8 544 6 1 +66632: 8 2 9 4 4 4 5 764 5 1 40 8 +16701: 12 9 3 56 2 50 +476608899: 2 7 36 3 57 6 509 125 4 +65111177648: 9 41 1 1 3 7 3 6 2 4 7 48 +3764967: 6 105 26 44 8 8 75 76 +249938: 4 2 5 6 6 8 5 4 58 8 9 984 +12144922: 487 1 41 23 913 9 +55495023: 8 867 87 8 8 +2533544483: 8 6 4 776 6 8 9 5 3 2 84 +49882405: 3 9 20 7 5 8 4 7 120 2 8 +531821285: 9 413 6 356 59 8 +982: 5 1 3 423 550 +2035142: 437 388 2 71 7 6 2 +251946: 9 3 5 8 185 5 708 +2889: 32 1 9 +38035751: 425 6 25 5 706 +1706128499: 47 363 284 97 1 +15084993: 21 5 71 2 106 21 77 +115693001: 2 5 2 151 25 6 5 192 2 7 +4116653112: 5 48 887 75 6 15 +972753516650: 979 92 1 77 3 4 9 59 6 1 +3036153: 416 4 99 650 9 +1451700796: 211 688 47 160 99 +541867381: 451 556 12 70 108 +10564977526: 6 7 1 1 3 2 29 31 4 505 5 +196219884: 96 1 66 203 86 +283035968424: 6 83 97 1 99 982 4 53 8 +326432: 3 522 19 5 5 2 6 1 6 2 8 2 +2612707589: 5 9 8 1 9 7 86 1 3 94 7 7 +43451622: 567 26 650 3 941 6 +5630: 58 503 1 2 8 +4309231498: 85 178 7 190 375 84 +111142473: 623 9 479 42 3 7 6 7 35 +7433090320: 387 14 24 29 80 3 +6215287915: 9 417 102 9 66 +135649560682: 90 4 33 15 55 5 679 +50611810415: 2 2 2 178 87 985 8 79 +4899685: 78 86 44 97 7 18 +35154763576: 2 39 84 637 7 7 1 5 74 +365264770: 913 4 64 186 584 +8019: 84 798 5 4 9 +2508: 1 24 83 389 60 2 65 1 +5458136777: 53 6 9 81 3 6 2 5 5 522 +2757995051: 29 951 948 31 222 +764140: 7 6 413 7 +3995924243581: 648 689 560 325 11 6 +154058630934: 303 504 846 1 28 61 6 +1427638: 8 13 21 593 632 5 +21098550233: 4 1 1 69 824 65 45 98 6 +178: 50 46 82 +119341: 45 57 78 15 +1001625: 6 6 2 821 2 +107025: 78 28 9 64 61 +6827328: 346 3 7 4 930 21 45 3 +747730884: 29 96 954 65 4 2 8 2 +243569365: 3 9 1 6 4 3 8 443 43 76 6 +1359330: 7 97 298 2 735 +39346886641: 2 88 8 41 3 55 1 6 659 1 +455625: 90 7 5 78 234 861 9 +601917984: 5 55 1 8 3 8 6 1 973 3 3 5 +71009287: 2 4 8 628 684 4 4 9 4 +214: 2 6 2 7 4 +2342725: 6 12 89 14 43 +25959024: 4 7 187 1 308 7 9 4 1 7 8 +972061: 4 8 70 80 84 9 383 4 +2178012557: 9 3 234 18 12 5 39 6 12 +3915: 7 35 9 6 45 46 7 20 570 +26750623: 2 67 1 50 626 +1121087: 266 1 753 17 11 +3795624: 570 6 156 516 42 +967753: 5 35 395 1 14 +31443545952: 4 18 871 987 508 +9191024368: 7 54 3 96 43 5 2 3 47 +18400: 34 5 488 263 1 6 3 23 1 +509203: 1 1 61 7 1 9 118 3 3 5 3 +174801132: 30 1 1 6 732 80 65 8 99 +211965600: 2 5 814 7 62 60 +3173091525: 998 2 8 613 7 41 9 1 1 9 +169407529: 46 7 906 7 252 2 22 4 +5331: 4 4 9 37 1 +21980222: 3 133 6 988 2 41 7 1 7 +449553702: 405 111 282 88 2 +2942: 5 15 8 1 18 62 +2320553257: 91 51 5 53 156 9 91 +9146342: 197 8 1 4 92 441 5 +966594375: 9 840 5 5 6 4 1 5 757 5 3 +4780203738: 6 7 3 17 372 1 9 7 3 857 +277037610569: 3 6 8 19 4 4 6 8 9 710 67 +9836: 7 1 41 2 16 1 652 +200552837873474: 236 780 21 847 3 47 4 +1225: 3 2 7 7 901 3 9 26 35 6 +138: 5 6 108 +48726878940: 5 4 140 9 4 3 8 9 8 3 6 40 +1072958: 27 1 9 11 158 379 9 +14700: 18 3 7 525 +27192423: 74 9 9 6 3 7 6 3 18 2 36 3 +973: 8 5 1 7 1 61 +4767602: 970 6 4 305 106 7 35 6 +5699955: 8 14 47 70 41 956 +4799016: 6 9 5 7 2 8 5 2 59 514 8 9 +1104789: 211 843 50 74 2 47 +3465098: 3 4 487 1 2 385 1 5 9 44 +1092564: 455 2 1 8 20 3 +4046781265: 418 4 5 92 1 1 263 +9213: 85 98 3 871 9 +19183: 4 6 1 4 3 1 19 133 6 4 1 6 +3057: 913 3 317 1 +308423: 64 61 79 1 7 +4532250239: 4 12 8 25 421 6 56 72 +259228473176: 8 49 77 22 91 3 1 7 9 +53531868: 910 4 15 49 36 6 8 9 +3170: 633 5 5 +7000826121: 9 5 6 3 69 84 96 233 9 +26296280: 377 12 69 87 8 704 +944: 37 8 39 1 859 +416601374947: 4 67 9 7 472 493 2 3 3 6 +87295346: 2 8 9 68 2 75 9 9 4 9 3 9 +88964084: 282 9 598 640 83 +26775736: 6 6 93 934 4 +30545: 973 5 1 2 46 2 343 9 3 5 +96136910: 93 1 2 8 8 97 1 1 9 1 890 +37564937: 375 64 861 1 77 +3400: 7 17 362 84 480 184 3 +6800: 9 9 4 20 4 +351249746890: 48 38 15 11 862 66 +7882: 1 16 26 731 6 1 3 2 8 40 +17835253284: 243 651 732 8 3 +2210544040: 730 1 3 5 4 6 28 12 5 8 5 +122544: 6 851 8 3 +897030320: 6 4 7 2 98 4 867 165 3 1 +12088: 69 387 92 22 32 1 +278: 94 8 94 2 4 76 +1349040: 84 78 9 2 3 4 1 77 1 +1909: 702 784 6 412 5 +510079: 7 9 4 28 72 77 2 27 +434835: 7 62 1 4 69 3 +30991593633: 85 6 302 13 67 77 39 +3289538589: 77 712 6 9 85 88 +6121549: 50 9 5 795 385 15 3 5 +4979436: 13 5 4 7 3 13 6 2 8 8 3 68 +129724777: 3 12 1 7 2 87 47 59 5 4 +68892363: 6 897 5 74 3 1 7 5 6 2 3 3 +4255924039: 1 72 6 94 978 41 586 3 +70979251824: 63 3 50 8 1 152 779 78 +1308486: 997 7 783 939 4 2 1 1 6 +2493632464308: 457 659 3 41 1 4 207 +348724: 34 8 722 1 +99166237: 984 7 64 2 238 +285197: 165 3 781 700 91 +9295: 53 3 57 43 7 +572564: 51 4 2 2 564 +325498150: 171 19 5 981 47 +46795: 43 1 1 2 793 +46340060: 4 5 1 3 332 4 2 8 618 1 +147087: 59 4 876 8 6 1 +4611297686: 3 34 91 2 6 69 6 85 +3862158312: 79 8 9 97 4 4 4 1 8 44 7 +789742859: 2 572 8 6 4 15 862 25 9 +579661523530: 2 5 41 29 132 211 91 +574: 9 4 6 4 7 +70184473660: 3 68 8 643 58 807 11 4 +70743726: 8 22 9 193 382 +2837431380: 2 89 49 63 3 3 4 707 1 +4458906: 44 582 4 9 656 +171138967: 1 171 13 1 7 960 7 +38732: 3 8 7 3 5 +931380691: 80 59 67 806 92 +3906490490: 2 42 1 6 21 1 96 778 2 +12218522: 2 6 21 5 4 31 2 1 +101954797: 472 6 9 692 4 4 6 1 6 14 +305743: 70 49 5 89 28 +1327567128: 1 15 189 7 1 43 82 +13548879: 6 9 8 413 47 2 +1815476055012: 9 5 637 8 681 3 7 3 3 1 2 +7297: 65 82 748 688 531 +35204: 9 10 64 6 644 +716101542: 928 505 28 9 70 9 778 +43859: 146 55 741 5 2 +597783034238: 9 2 68 866 49 190 8 +63576: 5 7 92 54 12 +508211: 2 30 60 3 88 444 887 +809: 9 501 2 7 290 +54153: 5 32 332 981 34 18 +947723581: 43 29 76 3 581 +118147: 12 7 97 7 5 1 7 911 479 +40606820: 96 6 4 7 4 2 68 6 6 74 +29223272479321: 8 654 7 923 8 40 603 +276032: 16 7 30 4 34 +78046230: 47 3 75 56 22 +553350: 6 15 80 178 75 +3735: 5 64 7 7 535 3 1 3 525 +2771237635: 8 880 2 17 39 2 4 53 6 6 +1677983: 899 9 7 8 33 +1575693: 19 4 2 962 8 +171136: 5 267 2 4 2 32 +1255703222: 22 63 97 3 13 934 +455805632: 6 7 203 8 2 9 6 5 65 5 6 5 +109920: 35 3 209 5 195 +906417640: 58 1 5 23 2 307 1 40 +25890834326636: 1 7 2 896 109 7 6 6 5 9 4 +403244184917: 2 576 5 6 1 312 13 7 2 5 +3564175: 48 74 8 2 7 6 90 6 3 815 +1558050560: 3 2 1 2 231 8 5 4 926 44 +89400308: 5 1 401 8 421 354 217 +12147: 8 5 9 84 8 37 7 618 14 +6656: 2 51 5 81 776 +191770117: 6 627 1 8 1 91 5 8 5 70 7 +36606668968: 22 282 52 59 965 +44391606965: 98 1 59 760 6 887 81 +22680: 5 52 18 6 30 +9882851925: 987 3 5 93 51 75 17 3 +83482: 345 6 2 774 7 8 62 7 +1514: 4 35 3 7 199 +63054605: 13 5 819 958 +62283458186154: 77 1 837 643 801 954 +63516: 31 42 55 6 1 67 316 +33244662713: 71 7 6 786 79 85 +126031: 3 6 7 4 59 6 5 6 4 4 147 1 +15370: 71 82 2 5 44 +214042233972: 73 9 4 2 9 1 9 2 6 8 93 4 +100495410: 5 578 3 5 4 6 41 882 6 5 +989: 8 92 95 +177497320: 9 4 4 9 8 109 1 2 7 2 605 +38159834: 1 7 17 10 3 5 9 932 3 6 8 +3692749373496: 761 8 82 30 7 8 19 8 57 +54685213: 42 4 235 1 2 45 48 55 9 diff --git a/src/inputs/08.in b/src/inputs/08.in new file mode 100644 index 0000000..8ab4006 --- /dev/null +++ b/src/inputs/08.in @@ -0,0 +1,50 @@ +........5................r..................B..... +....................................V..B.......... +...........................................B...... +r..................C....................Y......N.. +............................C..................... +vb.r........9......x..................7........... +..v........C.........................U...7.N..6... +5............9..................n.B............... +....r........4....................0.....K.....Y... +..4...C............7.......U..........6........... +......4z....................n.......U....6........ +..............b...........N..........n............ +.......9............x.....V..............K........ +.....v......................................2..... +.....V........Z........n.......................... +....z..........................VU......K.......... +...b....z..............................Y.......... +.z.......Z..................................K..... +..b.................................7............. +.4x............................................... +.h.......................5........................ +.................................g................ +..............9....0.........c................d... +......h.................u.............c........2.d +.....................8........N.....c...2.T....... +......Z..h.......................................c +........H........d................................ +........................................d......... +.Z........................................k....... +...............................T...............6.. +q..............Q...X..O............2.............. +..............................O.8......D.......... +........X............................O............ +.........t......................T................. +..........................t...8.......Q......u.... +.................Q.....O.......................... +..........hj.......o..............JR....u......... +..........X..........ot.........3.R............... +.......J.............y.....3.....................g +............y..J.Xj......R..........G............. +.....................t.........H.....D..g...G..... +........J.......o......y.......k.................. +..................1............................... +.....................3....k.......q.........1..... +...........v......................3k.............. +...................1......Q...H............G...... +.............1y......T............j............... +......0............8..................D........u.. +.............................G....D...o....q...... +...............j.0...H............................ diff --git a/src/inputs/09.in b/src/inputs/09.in new file mode 100644 index 0000000..6b55ff2 --- /dev/null +++ b/src/inputs/09.in @@ -0,0 +1 @@ +5976845435256788938547575289345049112119612651477393649449588160905575946466506682384157294138922255116599155731634536996124884739605710481770917784551029435350609228276086638469895373179440576090763098447378134837845037287427413366305228511517707448594835365270592189295241295979978660581843737823886751306741409480192545816266972840628276614277613696358226878912644515186334821832352898462572966189404129366079316988253460716430562221368147753065222693969464273275711094182460494089653380192436636565192222949110765955246998345739206821444532827680526511971084121868279273732834103422238379627935532296324040742815772481619331352843114557144034324766429789904412768644498089408853557797536997354616513957104924557621737729772734324919783174581896451397173351582295945889922024732841689789455595403685972280863872412355165069482387722291657176533475587625312068165216906330396999215990282111238099769059197153617363371578933011913850184317149343358053352986462017766246302130133396574983847327701675634751148683412252916779769837241471741344832527349638894230792338115354563830691086879347138680382683485363766721953912807439193751641656632788454827653611959279391477671197101975815469289030973343401474743775708696549839492326205953166593376720696184279221889054521150102623482850245128472214937112659142632551687630289337262120294122887662734862394650358650621273456833754225209341864697272597934833418420337532722513464617655740344117255797443990933192305214316115911566554030996123608474346798831239803621662952159639324581787276588175984898679355766747563884287836535382489378206716355139618291376032153887526936447018484138844159611855191318527411745481149139666137302450793670857541914587229549399356842113806028434679281773988555197020264743704769855341126743833332787363312352813936503483381248742692959458587925169954363860104111135433803696329889702191683133246463793245232813208216178296753789383369194756204094239325488142389153133748379255728762529682371698788851245471785296383336222753127714405414608943549281435457459758958675976067694636354834842462247996887624301189702290142840956270902020663020716558997535838667163492884921938370968997758710996287324316113952947676438994835480335375523364148954947870227337709068424862429326503457288664897081531263567624523857779036587850242769137944202377995822632619605175556622935878149755179567553281629863561869614176571896267837771964165232381782934228414336882874845244421817132732318663121991831523883423585311474985907674169363931920573474336640411685707641626250997073326555164119974815746655922062507417657363754450519356285663711284786051595927148778612143574237715184644064433457872716841021202091638068912940944634637274726167845587421187718481629283996995371256389719725651642848477288775382822133135486456327401786319557418476981712351559302080202911489743539131187218697557447335677881207221531336927466354082407897867238538218233584752380267299658824604926121487781335228699483075429392868053888826529139328754729634627195849762249447301590709953776054441893924849908662505156978027527434846882956667695159848560519465542388214628629851473666516221195282198567757470119416642165194945425186799540366037142984456066578792373484917828349772114318505221108795345480969039999065719461211640142678317529695233911246409081979227311879583231729091677239652486798644991096996466484492316133788736161672178666709480812685415958625597575041281563146469743752663027634054817383279877799937522232617064617642727965921030979162265044579240779835505232246816887215272337539835323243995064322788278565387853744547262018106330694813744132791826948888774432118565756938444518263414255683712732343567807759587291532392443291157325744713957058962365535157238174871384167454544473975920971979403185155726461212396291717082331478617696262575371968619032626999917787756876614347548043258574414634671439692354166267779621293125243743645383953945904024557281245782993835611496854913382260159972386073893524485874718517648652209826612255438475214368826018348911803763734175256811849334782913767383149546306841136684782842501775536879274325903896502334513883851157349251629428859553605918725337308683236368459654635831551437451324627581727112136345721435341611523511827675261825308180925156129968112690823946262889369851462474177981974556121116539766935636392658257032892076561119297573225524774082207869361393106157564469636390845475238177706215236915925191914277272439714511793914576472265914103278606719549169309321376962406971314781914321383923212318572590891597599126131630833881204125228246843021199414885728757611158535763762258822289746314292428433984365578120119315958424938753268361304714591936693360104192696442118733727992802436638759245816134484878931958977631320144321301278699983578522953971924716916589443416532988317395263588289956384795219495563246358794665851401054393260541550114792228241725512246299636576677238315986218655233988963318703529211185635315899187663189393285799850471122463093112194479870289394306845592046347254569724313489187799673130742497602684412379499579105879518120639852809847749537634550175524992195705210579496471985726053433920405251659955149878126644856488346787899524427695582752639459964821235252626887756628348889794689359055948178345816253757431652381130508472234319696593142180417541133575573089281098261554474019635620618012882560915280516387758188596256685191481081803593207992303822342488622065447890481691468681637333399199322886289385791675166327612297288312254791443377775851424477244193918451371468662013436480445099817147294261551365729424704319155378588625838451608373647281608357133421331259506259645953898579848526462567844351204814402749684142308143984963542785684382269050441784331947839766711656918142329957502140286182105998997030678075557062896418998720428769498989923595583636953371359527314363559665342331236797663561834845513967709878901316995290164732591940856852669490447633969766945659803355741198229027519752569077152855465275659952495828322298293360117673166681972038912187631997745418232887624494607536395060932685356820732267455544396268862459833472352598984628159748325448358635934468736161176571831254272282633346959084298859495993612594259273702087877810881221664083593242541712439162424160891010249158237761388148437723568184947399175276898353238495108250499887819883711061622294266442452294323739188346857776728640201468735016431966938365573684827367655720974893862678522649968416845376477957591443169882896387176681333499907344428458248726193083304879734870359226204212666054959864458772548133684036245375415783665522449927951261433534771764961392542621482863829265875493112810781232442719348854837526587356341775275540752146881748374890749999361112567695504894249975464422447157741243999358272897847135562912134534109932208139284943929855208152665790481371215660678628969567469289999546194899858543884392508193425651452457124955375376966421544559336485125011673125135124314316961734682246234678909340321978554537269477571195257714332478368990102346148929281622128129296583387159977981613735813696352713694559132476658388514358364555711373997013533781502446362731202445234015805256712267913223546074537763959366995822899311197631469083435371235992848954576967713198823253617360571159627678786690423288605974992258411058582880356931673918312495332655685088989187538328691961706128434068978314351158731845727229602432124590757481291354676867654278981825509343865288567285854696447399295756905794623762665553658925672699673568692348646952449457897457675055872046804038387210111419883642351158775599629834453193162415416173399051387684574376548786745841493577597665185088187924861026945794772846268610238448294022866886592929838296115487813144386429324560125898432095464871324782495561465625545418608966265618857650693986805612439273463631523039461528618020957334881377309864694184114259117818108142341639267282463545478388399654233670781718761644254450645624661215322938264890683554835663722030314080193187233594455761958074114189321913116012562682636683282282229455464948926678735330651027383417266511545061989143949481782141794245966364777673971821154652874639778162715259607857993925159867834693145830535536559628516725631177701869349111386773201945595252114837378728166048632198738478268495983328907854584278368616492678575238476095742216919239288452604549387232516530911460963940341649612323378445739452326125478312464843596720301651621846537490179161636718895666828894564326693036953133499987496930844335705233579525747450568372814685295682887045835460633062371257799274332071755678687032379743116133597467725815145842598646788027511144569278415040835068959984829767411824736930996044223428278656279820647668446064449833157898497781748458587746206591133114394195209396103287125373791354727236868757415418548659494316264956511667403464774028106511813916849965407392319779778055452892292841878336699673246894263297182013859982763223808468388873909530319577185815752345327411363137291697181916486125788987164130134448248367383796152622526935481935201011514155246467302991945620249733245083304625741991279960892741958624692121868066872191802367489920134256316443314714129153475280214311411756653637963967415637903088953398535115892439577743196195612458864653962242421712443871272475375460292826687320859491801429341545823487607716604184272783571528983623287294958819791583739340702145341618789823143757111456734063296898118049944516679932767764278321238079225563998357236134914156297991523712286144658896325783568997679682191399608955517121939583347191536349416015327462749741337461411625705568618486246428636913777592252091736188496726869699563661198138398050414677109476242227567561846534297269149022469468458578998052457277531357885170269798284623787284645038781635198014792115265840399852855913977487593471556797778010426168305743141278707915626771303874454585362841142035321849227268626866897691658148399474434648446735198080862579215470168842923958669532133829606655891492814582117047725454342679422982545060994794686894576662799353351323261616413845361659886875546755594081307951119461997769774678747469855042896250825647398890831684655826367976576836734922109198258915906119798747105442648113131968579446232149784487643688842076959874587187434328686679828663987190631970536118647788833091291142563348341680519543535674144391916051879923949226678675323318827724118251911726758390481460906027225171694597441696869791139347295050777681309133604387641984296491318546253022514637755754807145973588402339722434743621651573134630664744553661745586235942496635863344332844782140118165312718397620316820907271176274333041614388879396329925469953442867285410347119277459646472822860881144951623151449216192708636296387381729723385284979337931839089873813271731748879743234656689954039105190551887236753622584898621131487433862697274944137244536809320517615691298674268732073675111852819666035127772737813505791262138403639566035478134339277321182632375573535285332941029417779579176623788116362784636477733303760597496417191308145284023718594693674379831754528112325807392878753453620895623715387253887534681759795651385484174322564746154688884341511864046708332287829119836876985904018677523693450676651188870643054387528625728806797686440278345479544359336432970897381863748965382633570854653102087687228836635294418185784347166577235354865836554306730106696938533857478875055885859495818571699373137503670556393995343319839951354642526742465937393116458509826118255205422824594316655659268304753575860409215956967738876627461308031711382252775879039865552932995721923398396378373708462602292276031736161559531798277256663869823415616573262831337318712602721139132478427581360712923716881121316391752487355252312646242166133713213183841727888142867169782127093655210303922509313226768603050344433527437168224856461878744276865802946748957961339918740172833352186784348913631145734407998638049901797866653775648685131455168171623267740682354734593598260174437596595791288467311578960654168253874533029285547694242921582486885996073622727103042806816685964203237806067311410952961809017384815166274251264851850858131591945721287295891521292859290444786774684866513825134829459775888428095124048882396101011417860431093348947598178609984306841108154254042417278829414787718979346282578331755489948989826393699218154778771527169391194531298261192503975752313731267224542458594178778682587135312153964791567841931494038974651952627716845848079427188542316646662745877514082439395205465343221231399145594643383764388333375134864674954621580202644267972112983467236144238231269614745255618199893391021223838217278562351466989512243834916115538615273375333578326379850815660809149741739234014677515501579706484935098433321496959395039302956619950989956315284224238319946832488362758169988402253648435362445907810251510224093589771111714228618784184451933935730281080934019292331333727168516696762939733191867467272138156525533653055729548668242384186512711166266144182366059265724623872906095844418847965981198455078293383881557717277208640285687113442402679148631727552249089635783979886122318672984871453284564226626698683655588888377615799395991457923314242891635275826485712463790159844504172612037946850551785271097279726542924916214191444856695357558777689623730611866254435164643749114997958451010874369824715593536944521712693705465974147812742839289186561257819424925527354702989882423156788186358109219484991221389304950347911735015385124889949889468613244819973874690482566401855881056474832541796857565155194159631633299909112208870438762475537805223433965126541906275631424858791447924882334493317318092637962837521978086721078183836624716762251474855808497476946525413111395506455112737336950299580273555903679852381227262434930992159575015545578515267936017524242292168697763238355531483952679943153613944631867901993215271127898427029469728387985129980165494718774235821939660458693429985739892357417732453217118605074285176578081793248419939994935318426509481221122143279188775414097878310547450353946445569452788513181974410869592918647643640579081559217428821288439259991629047652743731853723138793387721864593480196662774769248195481595866450437610599941114925204254116071189983408536997166143571125660694082266522344096254519773966632049291827269174466088816948781358191313118993468125863337397424493167794573351324682493709778476496914337241611262052737972664614873928144285614426191231232763635692555165228778712820617188612198706430236015691386451646157699916633865758322385552969294232998884727325178838882738615296107967623710708258306354735440972256671042506513715681726186446474235462355545844469861271249364316041111322626935537928924187675623363841437756607186404361455387439331963512351688309224466569927991904992632848338079265562249760669011809666933542222093671549927880558261612845632713854995505245987722643016283833289694225975334717301191542766955621983217551529842656977053141438842846808054496693755361756588492750918858578848334842415269624066526863217467942247647657779184897191745177668941128961764448419088288144318046613950557133918965897440733991579017213926734059644856961358387143489495736348426570522789318929186989937854477886988995679471431716499577233835878490241583809036742576228961223528187563327570597580793128116862716985396826529258854422823765244631225515887019632314747778191692278252337932588550221920234853649416277411631353294192332647511175916713957792965551158565862569792371476655935532248449629418854043488238256410411155131897332378152670562242703767531293128593781359994824173728199022188849873098324529884324225261813884866645571859499288501196665432269620884396983631968011611422869284146497289834586174277589768940575553731592748850709121488640843373355420177948741520826820856915411190335676396195999776368979476214526749582211331182601957748763249397984541269368122149693630973752692377202090531413518434516997707547599851136752829753951639301196737380986636691659902590278920674850281837779287213944428161355080602890148839743439303732157789354616498234106411121149195861672328186630288793445469456262801826854486538799649415176047387976746770502137775495479765361994507217691912608462289475291676529971293144793689205071325222774082917913678996908487674568942963139225641281213774249951386461363735617974413766505622692666473733857260776312454537362182574828871313581878121441285184724534645218225142247138879436246162123791591717857297577426559884169592397141707346626449546864895389176065902047855481413793785777308711448648129540204526401190631726579642474671379115186565977142624884651065956315773729966767937854988332429316182541865462176839328530312712926923221686128512184141242149782265547323933177413512129736552529151423662452361623255621994288196344733150857999121328549661359161241830954776401856854265291026164928216825895329953994544631455488882211719614159221843836267853571689247965503731389194822126136577905728244593654764216033309118137342397879139018673581296496659013383647752788949662344022702627772329993474465388752576636364988988381357843116319040953221294476774855608345623314988389755623818521249777223882185073328655203427935937999858423412891521993571842663579034736245774174816943445447588189872092473285834473114627425271199620665998997860257758397070583052203423915275137475245292977464271731242111603833622831961154122988511726685181611581754058215688476167645513252292662345572739432978388947624812945016513710284938811115906920205820904013948773796258998786697644472998902344517399638717713296353643876682258159809339347561627644979246258235446111545227911764865666127635283313259938159110414031759894857459224730606048262055684770736617777273324749163540164847188096667926125822203892506066966081429271999782428333466295777348791841903119188480933256938033416533706936499978711594515172445876123617317929422435644887613630575241857153715759639459538119225253137060263022932055911076956027331528946598667438107279949476879462602073814559447646902239351946116856112973938032274438267542546746427247173521192016501134164050313837568275774368748376966848695330405421709619296971601821382766901449803841496394564152839169298240381394263859666513842088714956941061165842881654319824951839344753461069589117631255948684327668618858373439484847907484605714477287176061623499887467488322711725375344387912141977155590372820955067943228839174364837255844621750839856663975847837742838275716461870169028544026187342725468383351594056537074512228809051649591564519164847705281683610836427899247928661846623503712142073806422552939975229417421854278507435264988109027985088291434607860289125347513365066135781573179518310534127844065515648361285664218749321471524529779872855357540652365528567262890309814532485144640261388204733635923895832375314876045722142927426914488465782721738376458494331862310796198526484283765388339964876148267572844848375522189137747587440335075712496559661527124536669302028288678786544783883743599594932184054976973641122836627777176913697836627455210902311933198173833104778123323458236143024914098185542817468521637807634567882993983903695274246395152741689597442445312787212125462312511799751272329527195976512687924813386459325161595138232807133872668236987222665579583389679126240154165469895442568484618596861284228173063265142866773193886118984877788939276602134776040258152561850104015629839532291468677255034683456827735613299236133904051905044698260423934219353592371868428153619961289322116226676207086772132836691785080548545621151766570813359482525557712377228269765535272942083743515899212401995941816643569996355602866967249341021798124492028355550198353622823168545645859979797364699198692309247328840755089776310225796449635432590591135373439309964196623857988619780473752139353975125501137274266761484852780733178173130121412507451131650253378797981112759951825403222661148882728849768458047842069316976114041812816459485745827674629637398977039261815948212326628551468931149325054856242451969336971904895822533345786992453409049703164556810338565845861287277736934645921133740357738273341154368112340236571999413174435858260206 diff --git a/src/inputs/10.in b/src/inputs/10.in new file mode 100644 index 0000000..e69de29 diff --git a/src/inputs/11.in b/src/inputs/11.in new file mode 100644 index 0000000..e69de29 diff --git a/src/inputs/12.in b/src/inputs/12.in new file mode 100644 index 0000000..e69de29 diff --git a/src/inputs/13.in b/src/inputs/13.in new file mode 100644 index 0000000..e69de29 diff --git a/src/inputs/14.in b/src/inputs/14.in new file mode 100644 index 0000000..e69de29 diff --git a/src/inputs/15.in b/src/inputs/15.in new file mode 100644 index 0000000..e69de29 diff --git a/src/inputs/16.in b/src/inputs/16.in new file mode 100644 index 0000000..e69de29 diff --git a/src/inputs/17.in b/src/inputs/17.in new file mode 100644 index 0000000..e69de29 diff --git a/src/inputs/18.in b/src/inputs/18.in new file mode 100644 index 0000000..e69de29 diff --git a/src/inputs/19.in b/src/inputs/19.in new file mode 100644 index 0000000..e69de29 diff --git a/src/inputs/20.in b/src/inputs/20.in new file mode 100644 index 0000000..e69de29 diff --git a/src/inputs/21.in b/src/inputs/21.in new file mode 100644 index 0000000..e69de29 diff --git a/src/inputs/22.in b/src/inputs/22.in new file mode 100644 index 0000000..e69de29 diff --git a/src/inputs/23.in b/src/inputs/23.in new file mode 100644 index 0000000..e69de29 diff --git a/src/inputs/24.in b/src/inputs/24.in new file mode 100644 index 0000000..e69de29 diff --git a/src/inputs/25.in b/src/inputs/25.in new file mode 100644 index 0000000..e69de29 diff --git a/src/misc/template.cpp b/src/misc/template.cpp new file mode 100644 index 0000000..519d9bc --- /dev/null +++ b/src/misc/template.cpp @@ -0,0 +1,109 @@ +// Include the libs (essesntials) +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +///////////////// PREAMBLE ///////////////////////////// + +// Settings +const std::string DAYNUMBER = "00"; +const bool DEBUG = true; + +// For efficient debugging +#define dbg(expr) \ + (DEBUG ? (std::cerr << "[DBG] " << __FILE__ << ":" << __LINE__ << " (" \ + << #expr << ") = " << (expr) << "\n", \ + (expr)) \ + : (expr)) + +// Strucutres +struct Struktur {}; + +// Classes +class Klasse; + +// New Types +using inta = std::vector; // int array +using str = std::string; // python like str +using stra = std::vector; // str array + +//////////////////////// Main ////////////////////////// + +int main(int argc, char *argv[]) { + /////////////////////////////// + // Preamble for Main ////////// + ////////////////////////////// + + // Check for part + // This works by just providing a random argument to the execution + bool second_part; + if (argc > 1) { // Going to the part two when provided arguments + second_part = true; + } + + std::string file; + if (DEBUG) { + file = "src/examples/" + DAYNUMBER + ".ex"; + } else { + file = "src/inputs/" + DAYNUMBER + ".in"; + } + + std::ifstream inputFile(file); + // Return when not found + if (!inputFile) { + return 1; + } + + /////////////////////////////////////////////// + /// Get the data ///////////////////////////// + ///////////////////////////////////////////// + + // Define the datastructures + std::string line; + + long res1 = 0, res2 = 0; // Starting at 0 + + // Read input and populate lists + while (std::getline(inputFile, line)) { + // Parsing goes here + } + + // Closing the file (all the information is in cpp data structures now) + inputFile.close(); + + //////////////////////////////////////// + // Evaluate the collected data ///////// + //////////////////////////////////////// + + /// Algorithms go here + + /////////////////////////////////////// + /// Output results /////////////////// + ///////////////////////////////////// + + // First result + long first = res1 | 000; + /////////////// + long second = res2 | 000; + // Second result + + // Print results + if (DEBUG == false) { + if (second_part == true) { + std::cout << second; + } else { + std::cout << first; + } + } + + return 0; +} diff --git a/src/solutions/01.cpp b/src/solutions/01.cpp new file mode 100644 index 0000000..003d91c --- /dev/null +++ b/src/solutions/01.cpp @@ -0,0 +1,131 @@ +// Include the libs +#include +#include +#include +#include +#include +#include +#include +#include + +int main(int argc, char *argv[]) { + // Check for part + bool second_part; + if (argc > 1) { // Going to the part two when provided arguments + second_part = true; + } + + // Reading the input file + std::ifstream inputFile( + "src/inputs/01.in"); // Replace "data.txt" with your file name + if (!inputFile) { + return 1; + } + + std::vector leftList, rightList; + std::string line; + + // Read input and populate lists + while (std::getline(inputFile, line)) { + std::istringstream iss(line); + int left, right; + if (iss >> left >> right) { + leftList.push_back(left); + rightList.push_back(right); + } + } + + inputFile.close(); + + //////////////////////////////////////// + /// + // Evaluate the collected data + // + // Count occurrences of each number in the right list + std::unordered_map rightCount; + for (int num : rightList) { + rightCount[num]++; + } + + // Calculate the similarity score + int similarityScore = 0; + for (int num : leftList) { // remember this way of iterating with the colon + similarityScore += + num * + rightCount[num]; // Multiply the number with its frequency in right list + } + + // Part 1 + + // Sort both lists never modify the data!! (Here im too lazy) + std::sort(leftList.begin(), leftList.end()); + std::sort(rightList.begin(), rightList.end()); + + // Calculate total distance Can this be done in just one loop?? + int totalDistance = 0; + for (size_t i = 0; i < leftList.size(); ++i) { + totalDistance += std::abs(leftList[i] - rightList[i]); + } + + // First result + int first = totalDistance; + /////////////// + int second = similarityScore; + // Second result + + // Output result + if (second_part == true) { + // Output for the second part + std::cout << second; + } else { + // Output for the first part + std::cout << first; + } + + std::cout << "HELLO"; + + // Old code from gpt + + // // Create some variables + // std::vector> + // numbers; // Vector to store the pairs of numbers + // std::string line; + // + // // Iterate over the file + // while (std::getline(inputFile, line)) { + // // Find the position of the delimiter " " + // size_t delimiterPos = line.find(" "); + // if (delimiterPos != std::string::npos) { + // try { + // // Extract the two numbers as substrings + // std::string part1 = line.substr(0, delimiterPos); + // std::string part2 = line.substr(delimiterPos + 3); + // + // // Convert substrings to integers + // int num1 = std::stoi(part1); + // int num2 = std::stoi(part2); + // + // // Add the pair to the vector + // numbers.emplace_back(num1, num2); + // } catch (const std::invalid_argument &e) { + // std::cerr << "Error: Invalid number in line \"" << line << "\"" + // << std::endl; + // } + // } else { + // std::cerr << "Error: Malformed line \"" << line << "\"" << std::endl; + // } + // } + + // Close the file + // inputFile.close(); + + // Print the output + // std::cout << "Parsed numbers:" << std::endl; + // auto minIt = std::min_element(numbers.begin(), numbers.end()); + // for (const auto &pair : numbers) { + // + // std::cout << pair.first << " " << pair.second << std::endl; + // } + + return 0; +} diff --git a/src/solutions/02.cpp b/src/solutions/02.cpp new file mode 100644 index 0000000..1f7bffe --- /dev/null +++ b/src/solutions/02.cpp @@ -0,0 +1,159 @@ +// Include the libs (essesntials) +#include +#include +#include +#include +#include +#include +#include + +// Setting the constants +const std::string DAYNUMBER = "02"; +const bool DEBUG = 0; + +// Some Macros +#define DBG(expr) \ + (DEBUG ? (std::cerr << "[DBG] " << __FILE__ << ":" << __LINE__ << " (" \ + << #expr << ") = " << (expr) << "\n", \ + (expr)) \ + : (expr)) + +std::vector strToVec(const std::string &input) { + std::vector result; + std::stringstream ss(input); + int num; + while (ss >> num) { + result.push_back(num); + } + return result; +} + +// Helper functions for just this puzzle + +bool isValidLevelDifference(const std::vector &vec) { + for (size_t i = 1; i < vec.size(); ++i) { + int diff = std::abs(vec[i] - vec[i - 1]); + if (diff < 1 || diff > 3) { + return false; // Found a difference that is not between 1 and 3 + } + } + return true; +} + +bool isAscending(const std::vector &vec) { + for (size_t i = 1; i < vec.size(); ++i) { + if (vec[i] < vec[i - 1]) { + return false; // Found a pair that breaks the ascending order + } + } + return true; +} + +bool isDescending(const std::vector &vec) { + for (size_t i = 1; i < vec.size(); ++i) { + if (vec[i] > vec[i - 1]) { + return false; // Found a pair that breaks the descending order + } + } + return true; +} + +bool isSafeByRemovingOneLevel(const std::vector &vec) { + for (size_t i = 0; i < vec.size(); ++i) { + // Remove a level and check if it works + std::vector modifiedVec = vec; + modifiedVec.erase(modifiedVec.begin() + i); // Remove one level + + if (isValidLevelDifference(modifiedVec) && + (isAscending(modifiedVec) || isDescending(modifiedVec))) { + return true; + } + } + return false; +} + +int main(int argc, char *argv[]) { + /////////////////////////////// + // Preamble ////////////////// + ////////////////////////////// + + // Check for part + bool second_part; + if (argc > 1) { // Going to the part two when provided arguments + second_part = true; + } + + std::string file; + if (DEBUG) { + file = "src/examples/" + DAYNUMBER + ".ex"; + } else { + file = "src/inputs/" + DAYNUMBER + ".in"; + } + + std::ifstream inputFile(file); // Replace "data.txt" with your file name + + // Getting the stream + // Return when not found + if (!inputFile) { + return 1; + } + + /////////////////////////////////////////////// + /// Get the data ///////////////////////////// + ///////////////////////////////////////////// + + // Define the datastructures + std::string line; + + // Count variables for two parts + int count = 0; + int count2 = 0; + + // Read input and populate lists + while (std::getline(inputFile, line)) { + // Part 1 + std::vector row = strToVec(line); + if (isValidLevelDifference(row) && + (isAscending(row) || isDescending((row)))) { + count += 1; + count2 += 1; + continue; + } + + // Part 2 + if (isSafeByRemovingOneLevel(row)) { + count2 += 1; + } + } + + // Closing the file (all the information is in cpp data structures now) + inputFile.close(); + + //////////////////////////////////////// + // Evaluate the collected data ///////// + //////////////////////////////////////// + + /// Algorithms go here + /// Dont need anything here + + /////////////////////////////////////// + /// Output results /////////////////// + ///////////////////////////////////// + + // First result + int first = count; + /////////////// + int second = count2; + // Second result + + // Print results + if (!DEBUG) { + if (second_part == true) { + std::cout << second; + } else { + std::cout << first; + } + } + + return 0; +} diff --git a/src/solutions/03.cpp b/src/solutions/03.cpp new file mode 100644 index 0000000..0a8d2ae --- /dev/null +++ b/src/solutions/03.cpp @@ -0,0 +1,122 @@ +// Include the libs (essesntials) +#include +#include +#include +#include +#include +#include +#include +#include + +// Setting the constants +const int DAYNUMBER = 3; +const bool DEBUG = 0; + +#define DBG(expr) \ + (std::cerr << "[DBG] " << __FILE__ << ":" << __LINE__ << " (" << #expr \ + << ") = " << (expr) << "\n", \ + (expr)) + +// Defining structures +struct Struktur {}; + +int ex2int(char *ex) { return 0; } + +int main(int argc, char *argv[]) { + /////////////////////////////// + // Preamble ////////////////// + ////////////////////////////// + + // Check for part + bool second_part; + if (argc > 1) { // Going to the part two when provided arguments + second_part = true; + } + + // This messed everything up!! + std::ifstream inputFile("src/inputs/0" + std::to_string(DAYNUMBER) + ".in"); + // std::ifstream inputFile("examples/" + std::to_string(DAYNUMBER) + ".ex"); + + // Return when not found + if (!inputFile) { + return 1; + } + + /////////////////////////////////////////////// + /// Get the data ///////////////////////////// + ///////////////////////////////////////////// + + // Define the datastructures + + // Read to string + std::stringstream buffer; + buffer << inputFile.rdbuf(); // Dump the file content into the buffer + std::string text = buffer.str(); + + // Setup for regexing + std::string line; + std::regex pattern(R"(do\(\)|don't\(\)|mul\(\s*(\d+)\s*,\s*(\d+)\s*\))"); + std::smatch match; + std::vector> captures; + + auto begin = std::sregex_iterator(text.begin(), text.end(), pattern); + auto end = std::sregex_iterator(); + bool enabled = true; + int sum = 0; + + // Iterate through all matches + for (auto it = begin; it != end; ++it) { + std::smatch match = *it; + // Store the captures in a vector + if (match[0] == "do()") { + enabled = true; + } else if (match[0] == "don't()") { + if (second_part) { + enabled = false; + } + } else if (enabled) { + int x = std::stoi(match[1]); + int y = std::stoi(match[2]); + sum += x * y; + captures.push_back( + {std::stoi(match[1].str()), std::stoi(match[2].str())}); + } + } + + // Closing the file (all the information is in cpp data structures now) + inputFile.close(); + + //////////////////////////////////////// + // Evaluate the collected data ///////// + //////////////////////////////////////// + + /// Algorithms go here + // Part 1 + int res = 0; + // Print the captured groups + for (const auto &capture : captures) { + // Adding to the result + // May do this with a fold in the future + res += (capture[0] * capture[1]); + } + + /////////////////////////////////////// + /// Output results /////////////////// + ///////////////////////////////////// + + // First result + int first = res; + /////////////// + int second = sum; + // Second result + // + // + // Print results + if (second_part == true) { + std::cout << "Second: " << second << std::endl; + } else { + std::cout << "First: " << first << std::endl; + } + + return 0; +} diff --git a/src/solutions/04.cpp b/src/solutions/04.cpp new file mode 100644 index 0000000..cf81af8 --- /dev/null +++ b/src/solutions/04.cpp @@ -0,0 +1,324 @@ +#include +#include +#include +#include +#include +#include +#include + +const int daynumber = 4; +const bool debug = 0; + +const std::regex horizontal_regex("(?=(XMAS|SAMX))"); +const std::regex mas_regex("(?=(MAS|SAM))"); + +#define dbg(expr) \ + (debug ? (std::cerr << "[dbg] " << __LINE__ << " (" << #expr \ + << ") = " << (expr) << "\n", \ + (expr)) \ + : (expr)) + +using smat = std::vector; +using arr2 = std::array; + +// Check if a substring matches "MAS" or "SAM" +int is_mas(const std::string &mas) { return (mas == "MAS" || mas == "SAM"); } + +// Check for the "X-MAS" pattern at grid[row][col] +int check_xmas(const std::vector &grid, int row, int col) { + int n = grid.size(); + int m = grid[0].size(); + + if (row < 1 || row >= n - 1 || col < 1 || col >= m - 1) + return 0; // Out of bounds for the "X" pattern + + std::string mas1 = {grid[row - 1][col - 1], grid[row][col], + grid[row + 1][col + 1]}; + std::string mas2 = {grid[row - 1][col + 1], grid[row][col], + grid[row + 1][col - 1]}; + + return is_mas(mas1) && is_mas(mas2); +} + +int count_matches(const smat &rows, const std::regex &re) { + int count = 0; + for (const auto &row : rows) + count += std::distance(std::sregex_iterator(row.begin(), row.end(), re), + std::sregex_iterator()); + return count; +} + +smat rotate90(const smat &rows) { + smat rotated(rows[0].size()); + for (const auto &row : rows) + for (size_t i = 0; i < row.size(); ++i) + rotated[i] += row[i]; + return rotated; +} + +smat diagonalize(const smat &rows, bool reverse) { + smat result(rows[0].size() + rows.size() - 1); + for (size_t r = 0; r < rows.size(); ++r) + for (size_t c = 0; c < rows[0].size(); ++c) + result[reverse ? r + c : rows[0].size() - c - 1 + r] += rows[r][c]; + return result; +} + +int main(int argc, char *argv[]) { + bool second_part = (argc > 1); + std::ifstream inputfile( + debug ? "src/examples/0" + std::to_string(daynumber) + ".ex" + : "src/inputs/0" + std::to_string(daynumber) + ".in"); + if (!inputfile) + return 1; + + smat rows; + for (std::string line; std::getline(inputfile, line);) + rows.push_back(line); + + int count1 = count_matches(rows, horizontal_regex) + + count_matches(rotate90(rows), horizontal_regex) + + count_matches(diagonalize(rows, false), horizontal_regex) + + count_matches(diagonalize(rows, true), horizontal_regex); + + dbg(count1); + if (!second_part) { + if (!debug) + std::cout << count1 << "\n"; + return 0; + } + + int count2 = 0; + + // Iterate through the grid to count "X-MAS" patterns + for (int i = 0; i < rows.size(); i++) { + for (int j = 0; j < rows[i].size(); j++) { + count2 += check_xmas(rows, i, j); + } + } + + dbg(count2); + if (!debug) + std::cout << count2 << std::endl; + + return 0; +} + +////// include the libs (essesntials) +// #include +// #include +// #include +// #include +// #include +// #include +// #include +// #include +// #include +// +//// maybe used +//// dont care here when they are not used +// #include +// #include +// #include +// #include +// #include +// +//// setting the constants +// const int daynumber = 4; +// const bool debug = 1; +// +//// defining the regex +// const std::regex horizontal_regex("(?=(xmas|samx))"); +// const std::regex mas_regex("(?=(mas|sam))"); +// +// #d efine d bg( expr) \ +// (debug ? (std::cerr << "[dbg] " << __line__ << " (" << #expr \ +// << ") = " << (expr) << "\n", \ +// (expr)) \ +// : (expr)) +// +//// check occurences of xmas +// int occ_mas(std::vector rows) { +// int count = 0; +// /// algorithms go here +// for (std::string row : rows) { +// // getting the horizontal words +// auto words_begin = +// std::sregex_iterator(row.begin(), row.end(), horizontal_regex); +// auto words_end = std::sregex_iterator(); +// count += std::distance(words_begin, words_end); +// } +// return count; +// } +// +//// rotate the matrix +// std::vector rotate90(std::vector rows) { +// std::vector rot_rows(rows[0].length()); +// { +// for (std::string row : rows) { +// // getting the horizontal words +// size_t index = 0; +// for (char c : row) { +// rot_rows[index] += c; +// ++index; +// }; +// } +// } +// return rot_rows; +// } +// +//// diagonalize the matrix +// std::vector diag(std::vector rows, bool rev) { +// std::vector dia_rows(rows[0].length() + (rows.size() - 1)); +// int rowi = 0; +// for (std::string row : rows) { +// int coli = 0; +// for (char c : row) { +// // here you have a loop over every char! +// if (rev) { +// dia_rows[rowi + coli] += c; +// coli++; +// continue; +// } +// dia_rows[rows[0].length() - coli - 1 + rowi] += c; +// coli++; +// } +// rowi++; +// } +// return dia_rows; +// } +// +//// types +// using smat = std::vector; +// using arr2 = std::array; +// +//// helpers +// void print_mat(smat mat) { +// std::cout << "printing mat:\n"; +// for (std::string row : mat) { +// std::cout << row << std::endl; +// } +// } +// +// int main(int argc, char *argv[]) { +// bool second_part; +// if (argc > 1) { // going to the part two when provided arguments +// second_part = true; +// } +// std::string file; +// if (debug) { +// file = "examples/" + std::to_string(daynumber) + ".ex"; +// } else { +// file = "inputs/" + std::to_string(daynumber) + ".in"; +// } +// std::ifstream inputfile(file); // replace "data.txt" with your file name +// // return when not found +// if (!inputfile) { +// return 1; +// } +// +// /////////////////////////////////////////////// +// /// get the data ///////////////////////////// +// ///////////////////////////////////////////// +// +// std::string line; +// std::vector rows; +// while (std::getline(inputfile, line)) { +// rows.push_back(line); +// } +// inputfile.close(); +// +// //////////////////////////////////////// +// // evaluate the collected data ///////// +// //////////////////////////////////////// +// +// // part 1 +// +// int count1 = 0; +// +// // get normals +// count1 += occ_mas(rows); +// +// // get the rotated +// count1 += occ_mas(rotate90(rows)); +// +// // get the diagonals +// count1 += occ_mas(diag(rows, false)); +// count1 += occ_mas(diag(rows, true)); +// +// // part 2 +// +// int count2 = 0; +// +// // here we only need the diagonal matrixes +// smat diagr = diag(rows, true); +// smat diagl = diag(rows, false); +// +// print_mat(diagr); +// print_mat(diagl); +// +// std::vector> rstarts; +// std::vector> lstarts; +// +// int matnum = 0; // 0 for right 1 for left +// for (smat diagmm : {diagr, diagl}) { +// int rowi = 0; +// for (std::string row : diagmm) { +// // reversing helps?? +// // std::reverse(row.begin(), row.end()); +// +// auto begin = std::sregex_iterator(row.begin(), row.end(), mas_regex); +// auto end = std::sregex_iterator(); +// +// // loop through all matches +// for (auto it = begin; it != end; ++it) { +// // get the match +// std::smatch match = *it; +// +// // get the beginning pos in diagonal format (need to convert back to +// // kart) +// int position = +// match.position(0); // get the position of the current match +// // +// // +// std::cout << row << std::endl; +// +// // calculate the column here (very bad) +// if (matnum == 0) { +// rstarts.push_back(arr2{position, rowi}); +// } else { +// lstarts.push_back(arr2{position, rowi}); +// } +// } +// // going to the next row(of translated one) +// rowi++; +// } +// // traversing the other matrix +// matnum++; +// } +// +// // here is the logic for finding crosses from starts +// // hit is c, r (c, y) +// for (arr2 hit : rstarts) { +// for (arr2 cmp : lstarts) { +// if (hit[1] - 1 == cmp[1] && cmp[0] == hit[0] - 1) +// count2++; +// } +// } +// +// dbg(count2); +// +// /////////////////////////////////////// +// /// output results /////////////////// +// ///////////////////////////////////// +// +// if (debug == false) { +// if (second_part == true) { +// std::cout << count2; +// } else { +// std::cout << count1; +// } +// } +// +// return 0; +// } diff --git a/src/solutions/05.cpp b/src/solutions/05.cpp new file mode 100644 index 0000000..aad6a17 --- /dev/null +++ b/src/solutions/05.cpp @@ -0,0 +1,243 @@ +// Include the libs (essesntials) +#include +#include +#include +#include +#include + +// Maybe used +// Dont care here when they are not used +#include +#include +#include +#include +#include + +// Setting the constants +const int DAYNUMBER = 5; +const bool DEBUG = 0; + +// Some Macros +#define DBG(expr) \ + (DEBUG ? (std::cerr << "[DBG] " << __FILE__ << ":" << __LINE__ << " (" \ + << #expr << ") = " << (expr) << "\n", \ + (expr)) \ + : (expr)) + +// Defining structures +struct Struktur {}; + +struct rule { + int first; + int second; + + rule(const std::string &str) { + auto separator_pos = str.find('|'); + if (separator_pos == std::string::npos) { + throw std::invalid_argument("Invalid format: Missing '|' separator"); + } + try { + first = std::stoi(str.substr(0, separator_pos)); + second = std::stoi(str.substr(separator_pos + 1)); + } catch (const std::exception &e) { + throw std::invalid_argument("Invalid format: Non-integer values"); + } + } + + // Overload << operator for printing + friend std::ostream &operator<<(std::ostream &os, const rule &obj) { + os << "first: " << obj.first << ", second: " << obj.second; + return os; + } + + void print() const { + std::cout << "first: " << first << ", second: " << second << std::endl; + } +}; + +struct instruction { + std::vector jobs; + + // Constructor: Parse a comma-separated string into the jobs vector + instruction(const std::string &str) { + std::istringstream ss(str); + std::string token; + while (std::getline(ss, token, ',')) { + try { + jobs.push_back(std::stoi(token)); + } catch (const std::exception &e) { + throw std::invalid_argument("Invalid input format for instruction: " + + str); + } + } + } + + // Overload << operator for printing + friend std::ostream &operator<<(std::ostream &os, const instruction &obj) { + os << "Jobs: ["; + for (size_t i = 0; i < obj.jobs.size(); ++i) { + os << obj.jobs[i]; + if (i != obj.jobs.size() - 1) { + os << ", "; + } + } + os << "]"; + return os; + } + + // Print method (optional, but << is usually preferred) + void print() const { + std::cout << *this << '\n'; // Reuse the << operator + } +}; + +int main(int argc, char *argv[]) { + /////////////////////////////// + // Preamble ////////////////// + ////////////////////////////// + + // Check for part + // This works by just providing a random argument to the execution + bool second_part; + if (argc > 1) { // Going to the part two when provided arguments + second_part = true; + } + + std::string file; + if (DEBUG) { + file = "src/examples/0" + std::to_string(DAYNUMBER) + ".ex"; + } else { + file = "src/inputs/0" + std::to_string(DAYNUMBER) + ".in"; + } + + std::ifstream inputFile(file); // Replace "data.txt" with your file name + // Return when not found + if (!inputFile) { + return 1; + } + + /////////////////////////////////////////////// + /// Get the data ///////////////////////////// + ///////////////////////////////////////////// + + // Define the datastructures + std::string line; + + // Here are the rules and instructions stored + std::vector rules; + std::vector instructions; + + // Here for every job there is a list mapped that contains all jobs that + // should be higher than this one + std::map> highers; + + // Read input and populate lists + int section = 0; + while (std::getline(inputFile, line, '\n')) { + if (line.empty()) { // A blank line switches the section + section++; + } else { + if (section == 0) { + rules.push_back(line); + } else { + instructions.push_back(line); + } + } + } + + // Populate the higher list + for (rule rule : rules) { + highers[rule.first].push_back(rule.second); + } + + // Closing the file (all the information is in cpp data structures now) + inputFile.close(); + + //////////////////////////////////////// + // Evaluate the collected data ///////// + //////////////////////////////////////// + + /// Algorithms go here + + // Store the mid values + std::vector middles; + + // Store the wrong instructions for part 2 + std::vector wrongs; + + // Part 1 + + for (instruction instr_set : instructions) { + // get the jobs + std::vector jobs = instr_set.jobs; + + // Not failed by default + bool failed = false; + + // Iterating over the jobs in order + int job_num = 0; + for (int job : jobs) { + if (job_num == 0) { + } else { + int prev = instr_set.jobs[job_num - 1]; + for (rule rule : rules) { + if (rule.first == job && rule.second == prev) { + // The Instrucdtion is wrong + failed = true; + } + } + } + job_num++; + } + + // Passed all rules + if (!failed) { + middles.push_back(instr_set.jobs[jobs.size() / 2]); + } else { + // Push back the wrong for second part + wrongs.push_back(instr_set); + } + } + + // Summing the middle values + int count = 0; + for (int mid : middles) { + count += mid; + } + + // Part 2 + + int count2 = 0; + + // Sort the wrongs + for (instruction &wrong_set : wrongs) { + std::vector &jobs = wrong_set.jobs; + std::sort(jobs.begin(), jobs.end(), [&](int a, int b) { + return std::count(highers[a].begin(), highers[a].end(), b) == 0; + }); + count2 += jobs[jobs.size() / 2]; + } + + DBG(count2); + + /////////////////////////////////////// + /// Output results /////////////////// + ///////////////////////////////////// + + // First result + int first = count; + /////////////// + int second = count2; + // Second result + + // Print results + if (DEBUG == false) { + if (second_part == true) { + std::cout << second; + } else { + std::cout << first; + } + } + + return 0; +} diff --git a/src/solutions/06.cpp b/src/solutions/06.cpp new file mode 100644 index 0000000..c86926e --- /dev/null +++ b/src/solutions/06.cpp @@ -0,0 +1,281 @@ +// Parse to vec +// Find the start [sy, sx] +// R X C; [y, x] Start at 0 +// +// < size() for checking if out of bounds +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// Include the libs (essesntials) +#include +#include +#include +#include +#include + +// Maybe used +// Dont care here when they are not used +#include +#include +#include +#include +#include +#include +#include + +// This needs to be changed to ../ +// #include "helpers.h" + +// Setting the constants +const std::string DAYNUMBER = "06"; +const bool DEBUG = true; + +// Some Macros +#define dbg(expr) \ + (DEBUG ? (std::cerr << "[DBG] " << __FILE__ << ":" << __LINE__ << " (" \ + << #expr << ") = " << (expr) << "\n", \ + (expr)) \ + : (expr)) + +// Defining structures +struct Struktur {}; + +// Defining classes +class Klasse; + +// Defining types +using vint = std::vector; // int array +using vstr = std::vector; // int array +using pos = std::array; // int array +using str = std::string; + +// Defining enums +enum orientation { + UP, + RIGHT, + DOWN, + LEFT, +}; + +void rotate(orientation &o) { + if (o == UP) { + o = RIGHT; + } else if (o == DOWN) { + o = LEFT; + } else if (o == RIGHT) { + o = DOWN; + } else { + o = UP; + } +} + +void step(pos &p, orientation o) { + if (o == UP) { + p[0]--; + } else if (o == DOWN) { + p[0]++; + } else if (o == RIGHT) { + p[1]++; + } else { + p[1]--; + } +} + +bool obstacle(pos &p, orientation o, vstr &g) { + if (o == UP) { + return g[p[0] - 1][p[1]] == '#'; + } else if (o == DOWN) { + return g[p[0] + 1][p[1]] == '#'; + } else if (o == RIGHT) { + return g[p[0]][p[1] + 1] == '#'; + } else { + return g[p[0]][p[1] - 1] == '#'; + } +} + +bool hittank(pos &p, orientation o, pos t) { + if (o == UP) { + return p[0] - 1 == t[0] && p[1] == t[1]; + } else if (o == DOWN) { + return p[0] + 1 == t[0] && p[1] == t[1]; + } else if (o == RIGHT) { + return p[0] == t[0] && p[1] + 1 == t[1]; + } else { + return p[0] == t[0] && p[1] - 1 == t[1]; + } +} + +//////////////////////// Main ////////////////////////// + +int main(int argc, char *argv[]) { + /////////////////////////////// + // Preamble ////////////////// + ////////////////////////////// + + // Check for part + // This works by just providing a random argument to the execution + bool second_part; + if (argc > 1) { // Going to the part two when provided arguments + second_part = true; + } + + std::string file; + if (DEBUG) { + file = "src/examples/" + DAYNUMBER + ".ex"; + } else { + file = "src/inputs/" + DAYNUMBER + ".in"; + } + + std::ifstream inputFile(file); + // Return when not found + if (!inputFile) { + return 1; + } + + /////////////////////////////////////////////// + /// Get the data ///////////////////////////// + ///////////////////////////////////////////// + + // Define the datastructures + std::string line; + + int res1 = 0; // Start at 0 + int res2 = 0; + + // Container for rows + vstr rows; + + std::set trace; + + // Read input and populate lists + while (std::getline(inputFile, line)) { + // Push back while wrapping in 'X' + rows.push_back('X' + line + 'X'); + } + + // Wrap the input + str deckel(rows[0].size(), 'X'); + rows.insert(rows.begin(), deckel); + rows.push_back(deckel); + + // Closing the file (all the information is in cpp data structures now) + inputFile.close(); + + //////////////////////////////////////// + // Evaluate the collected data ///////// + //////////////////////////////////////// + + /// Algorithms go here + + // Current position + pos cpos; + pos spos; + orientation o(UP); + + // Find the start + int rowi = 0; + for (str row : rows) { + dbg(row); + int coli = 0; + for (char chr : row) { + if (chr == '^') { + cpos = {rowi, coli}; + spos = cpos; + } + coli++; + } + rowi++; + } + + // Part 1 + + while (rows[cpos[0]][cpos[1]] != 'X') { + // Insert the starting pos + + // Check for obstacle + if (obstacle(cpos, o, rows)) { + rotate(o); + } else { + trace.insert(cpos); + step(cpos, o); + } + } + + res1 = std::distance(trace.begin(), trace.end()); + + // Part 2: Calculate positions that cause the guard to get stuck in a loop + + // Iterate over all positions in the trace to test possible obstacle + // placements + for (const pos &tank : trace) { + // Skip the starting position + if (tank == spos) { + continue; + } + + // Simulate guard's patrol with the obstacle at `tank` + pos cpos2 = spos; + orientation o2 = UP; + std::set visited_positions; + + bool loop_detected = false; + + while (rows[cpos2[0]][cpos2[1]] != 'X') { + // Mark the current position as visited + + // Check for obstacle or if guard hits the proposed tank + if (obstacle(cpos2, o2, rows) || hittank(cpos2, o2, tank)) { + rotate(o2); // Rotate if blocked + } else { + step(cpos2, o2); // Otherwise, move forward + if (cpos2 == spos) { + loop_detected = true; + break; + } + } + + // Check if we've returned to a previously visited position + } + + // If a loop is detected, count this tank position as valid + if (loop_detected) { + res2++; + } + } + dbg(res2); + + /////////////////////////////////////// + /// Output results /////////////////// + ///////////////////////////////////// + + // First result + int first = res1 | 000; + /////////////// + int second = res2 | 000; + // Second result + + // Print results + if (DEBUG == false) { + if (second_part == true) { + std::cout << second; + } else { + std::cout << first; + } + } + + return 0; +} diff --git a/src/solutions/07.cpp b/src/solutions/07.cpp new file mode 100644 index 0000000..2774739 --- /dev/null +++ b/src/solutions/07.cpp @@ -0,0 +1,304 @@ +// Include the libs (essesntials) +#include +#include +#include +#include +#include +#include +#include +#include + +// Setting the constants +const std::string DAYNUMBER = "07"; +const bool DEBUG = true; + +// Some Macros +#define dbg(expr) \ + (DEBUG ? (std::cerr << "[DBG] " << __FILE__ << ":" << __LINE__ << " (" \ + << #expr << ") = " << (expr) << "\n", \ + (expr)) \ + : (expr)) + +// Class to store big ints represented as strings +class BigInt { +private: + std::string value; // Store the number as a string + bool isNegative; + + // Helper function to add two positive numbers as strings + static std::string addStrings(const std::string &num1, + const std::string &num2) { + std::string result; + int carry = 0, sum = 0; + int n1 = num1.size(), n2 = num2.size(); + + // Perform addition digit by digit + for (int i = 0; i < std::max(n1, n2) || carry; ++i) { + int digit1 = (i < n1) ? num1[n1 - i - 1] - '0' : 0; + int digit2 = (i < n2) ? num2[n2 - i - 1] - '0' : 0; + sum = digit1 + digit2 + carry; + result.push_back((sum % 10) + '0'); + carry = sum / 10; + } + std::reverse(result.begin(), result.end()); + return result; + } + + // Helper function to multiply two positive numbers as strings + static std::string multiplyStrings(const std::string &num1, + const std::string &num2) { + int n1 = num1.size(), n2 = num2.size(); + std::vector product(n1 + n2, 0); + + // Perform multiplication digit by digit + for (int i = n1 - 1; i >= 0; --i) { + for (int j = n2 - 1; j >= 0; --j) { + int mul = (num1[i] - '0') * (num2[j] - '0'); + int sum = product[i + j + 1] + mul; + product[i + j + 1] = sum % 10; + product[i + j] += sum / 10; + } + } + + // Convert the product vector to a string + std::string result; + for (int num : product) { + if (!result.empty() || num != 0) // Skip leading zeros + result.push_back(num + '0'); + } + return result.empty() ? "0" : result; + } + +public: + // Constructor + BigInt(const std::string &str = "0") : value(str), isNegative(false) { + if (str[0] == '-') { + isNegative = true; + value = str.substr(1); + } + } + + // Addition + BigInt operator+(const BigInt &other) const { + return BigInt(addStrings(this->value, other.value)); + } + + // Comparison operators + bool operator==(const BigInt &other) const { + return isNegative == other.isNegative && value == other.value; + } + + // Multiplication + BigInt operator*(const BigInt &other) const { + return BigInt(multiplyStrings(this->value, other.value)); + } + + // Function to get the value + std::string get_value() { return value; } + + // Print the value + friend std::ostream &operator<<(std::ostream &os, const BigInt &bigint) { + if (bigint.isNegative) + os << '-'; + os << bigint.value; + return os; + } +}; + +// Structure to strore and parse equations +struct equation { + BigInt res; + std::vector numbers; + + // Constructor + equation(const std::string &str) { + // Set the seperator + auto separator_pos = str.find(':'); + + if (separator_pos == std::string::npos) { + throw std::invalid_argument("Invalid format: Missing ':' separator"); + } + try { + // Parse the result + res = BigInt(str.substr(0, separator_pos)); + + // Parse the numbers + std::stringstream iss(str.substr(separator_pos + 1)); + std::string number; + while (iss >> number) + numbers.push_back(BigInt(number)); + + } catch (const std::exception &e) { + throw std::invalid_argument("Invalid format: Non-integer values"); + } + } +}; + +// Gnererate a bitmap of combinatinons +std::vector> generateCombinations(int n, int m) { + std::vector> combinations; + int totalCombinations = 1; + + // Calculate m^n combinations + for (int i = 0; i < n; ++i) { + totalCombinations *= m; + } + + for (int i = 0; i < totalCombinations; ++i) { + std::vector combination; + int current = i; + + // Generate a combination by extracting each digit in base m + for (int j = 0; j < n; ++j) { + combination.push_back(current % m); + current /= m; + } + + // Since we're generating from least to most significant digits, reverse the + // combination + std::reverse(combination.begin(), combination.end()); + + combinations.push_back(combination); + } + + return combinations; +} + +//////////////////////// Main ////////////////////////// + +int main(int argc, char *argv[]) { + /////////////////////////////// + // Preamble ////////////////// + ////////////////////////////// + + // Check for part + // This works by just providing a random argument to the execution + bool second_part; + if (argc > 1) { // Going to the part two when provided arguments + second_part = true; + } + + std::string file; + if (DEBUG) { + file = "src/examples/" + DAYNUMBER + ".ex"; + } else { + file = "src/inputs/" + DAYNUMBER + ".in"; + } + + std::ifstream inputFile(file); + // Return when not found + if (!inputFile) { + return 1; + } + + /////////////////////////////////////////////// + /// Get the data ///////////////////////////// + ///////////////////////////////////////////// + + // Define the datastructures + std::string line; + + BigInt res1; // Start at 0 + BigInt res2; + + // Store the equations + std::vector equations; + + // Read input and populate lists + while (std::getline(inputFile, line)) { + equations.push_back(equation(line)); + } + + // Closing the file (all the information is in cpp data structures now) + inputFile.close(); + + //////////////////////////////////////// + // Evaluate the collected data ///////// + //////////////////////////////////////// + + /// Algorithms go here + + // Part 2 + + // Iterate over equations + for (equation eq : equations) { + // This is what we need + BigInt goal = eq.res; + BigInt result; + + std::vector> combinations = + generateCombinations(eq.numbers.size() - 1, 2); + + // Iterate over possible arrangements of operators + for (std::vector combination : combinations) { + // Get the result for this combination + int i = 0; + BigInt p = eq.numbers[0]; + for (int op : combination) { + if (op) { + p = p + eq.numbers[i + 1]; + } else { + p = p * eq.numbers[i + 1]; + } + i++; + } + + // Check the result + if (p.get_value() == goal.get_value()) { + res1 = res1 + goal; + break; + } + } + } + + // Part2 + + // Iterate over equations + for (equation eq : equations) { + // This is what we need + BigInt goal = eq.res; + BigInt result = BigInt("0"); + + std::vector> combinations = + generateCombinations(eq.numbers.size() - 1, 3); + + // Iterate over possible arrangements of operators + for (std::vector combination : combinations) { + // Get the result for this combination + int i = 0; + BigInt p = eq.numbers[0]; + for (int op : combination) { + if (op == 0) { + p = p + eq.numbers[i + 1]; + } else if (op == 1) { + p = p * eq.numbers[i + 1]; + } else { + p = BigInt(p.get_value() + eq.numbers[i + 1].get_value()); + } + i++; + } + + // Check the result + if (p == goal) { + res2 = res2 + goal; + break; + } + } + } + + /////////////////////////////////////// + /// Output results /////////////////// + ///////////////////////////////////// + + // First result + BigInt first = res1; + /////////////// + BigInt second = res2; + // Second result + + // Print results + std::cout << "First: " << first << std::endl; + std::cout << "Second: " << second << std::endl; + + return 0; +} diff --git a/src/solutions/08.cpp b/src/solutions/08.cpp new file mode 100644 index 0000000..a328128 --- /dev/null +++ b/src/solutions/08.cpp @@ -0,0 +1,179 @@ +// Include the libs (essesntials) +#include +#include +#include +#include +#include + +// Maybe used +// Dont care here when they are not used +#include +#include +#include +#include +#include +#include +#include +#include + +// This needs to be changed to ../ +// #include "helpers.h" + +// Setting the constants +const std::string DAYNUMBER = "08"; +const bool DEBUG = 0; + +// Some Macros +#define dbg(expr) \ + (DEBUG ? (std::cerr << "[DBG] " << __FILE__ << ":" << __LINE__ << " (" \ + << #expr << ") = " << (expr) << "\n", \ + (expr)) \ + : (expr)) + +// Defining structures +struct Struktur {}; + +// Defining classes +class Klasse; + +// Defining types +using inta = std::vector; // int array +using pos = std::array; // int array +// + +bool checkbounds(pos p, int row_size, int column_size) { + return 0 <= p[0] && p[0] < row_size && 0 <= p[1] && p[1] < column_size; +} + +//////////////////////// Main ////////////////////////// + +int main(int argc, char *argv[]) { + /////////////////////////////// + // Preamble ////////////////// + ////////////////////////////// + + // Check for part + // This works by just providing a random argument to the execution + bool second_part; + if (argc > 1) { // Going to the part two when provided arguments + second_part = true; + } + + std::string file; + if (DEBUG) { + file = "src/examples/" + DAYNUMBER + ".ex"; + } else { + file = "src/inputs/" + DAYNUMBER + ".in"; + } + + std::ifstream inputFile(file); + // Return when not found + if (!inputFile) { + return 1; + } + + /////////////////////////////////////////////// + /// Get the data ///////////////////////////// + ///////////////////////////////////////////// + + // Define the datastructures + std::string line; + + int res1 = 0; // Start at 0 + int res2 = 0; + + // Datastructs for this problem + std::map> antennas; + + int row_size = 0, column_size = 0, ci; + + // Read input and populate lists + + while (std::getline(inputFile, line)) { + // Populate antennas + ci = 0; + for (char c : line) { + if (c != '.') { + antennas[c].push_back({row_size, ci}); + } + ci++; + } + + // Set the sizes of the map + if (!column_size) + column_size = line.length(); + row_size++; + } + // Closing the file (all the information is in cpp data structures now) + inputFile.close(); + + //////////////////////////////////////// + // Evaluate the collected data ///////// + //////////////////////////////////////// + + /// Algorithms go here + + // Set of antinodes + std::set> antinodes; + std::set> add_antinodes; + + // Iterate over the antenna lists + for (auto const &k : antennas) { + // Antenna list + std::vector p = k.second; + + // Size of the antenna list + int s = p.size(); + for (int i = 0; i < s; i++) { + for (int j = 0; j < s; j++) { + if (i != j) { + + // Calculate the antinodes here + pos d = {p[j][0] - p[i][0], p[j][1] - p[i][1]}; + pos di = {-d[0], -d[1]}; + + pos a1 = {p[j][0] + d[0], p[j][1] + d[1]}; + pos a2 = {p[i][0] + di[0], p[i][1] + di[1]}; + + if (checkbounds(a1, row_size, column_size)) + antinodes.insert(a1); + if (checkbounds(a2, row_size, column_size)) + antinodes.insert(a2); + + // Add the additional nodes here + + for (int o : {-1, 1}) { + pos n; + while (n[0] < row_size && n[1] < column_size) { + if (o == 1) { + + } else { + } + } + } + } + } + } + } + + /////////////////////////////////////// + /// Output results /////////////////// + ///////////////////////////////////// + + // First result + int first = antinodes.size() | 000; + /////////////// + int second = antinodes.size() + add_antinodes.size() | 000; + // Second result + + // Print results + if (DEBUG == false) { + if (second_part == true) { + std::cout << second; + } else { + std::cout << first; + } + } + + return 0; +} diff --git a/src/solutions/09.cpp b/src/solutions/09.cpp new file mode 100644 index 0000000..eb74d98 --- /dev/null +++ b/src/solutions/09.cpp @@ -0,0 +1,161 @@ +// Include the libs (essesntials) +#include +#include +#include +#include + +// Maybe used +// Dont care here when they are not used +#include +#include +#include +#include +#include +#include +#include + +// This needs to be changed to ../ +// #include "helpers.h" + +// Setting the constants +const std::string DAYNUMBER = "09"; +const bool DEBUG = false; + +// Some Macros +#define dbg(expr) \ + (DEBUG ? (std::cerr << "[DBG] " << __FILE__ << ":" << __LINE__ << " (" \ + << #expr << ") = " << (expr) << "\n", \ + (expr)) \ + : (expr)) + +// Defining structures +struct Struktur {}; + +// Defining classes +class Klasse; + +// Defining types +using inta = std::vector; // int array + +//////////////////////// Main ////////////////////////// + +int main(int argc, char *argv[]) { + /////////////////////////////// + // Preamble ////////////////// + ////////////////////////////// + + // Check for part + // This works by just providing a random argument to the execution + bool second_part; + if (argc > 1) { // Going to the part two when provided arguments + second_part = true; + } + + std::string file; + if (DEBUG) { + file = "src/examples/" + DAYNUMBER + ".ex"; + } else { + file = "src/inputs/" + DAYNUMBER + ".in"; + } + + std::ifstream inputFile(file); + // Return when not found + if (!inputFile) { + return 1; + } + + /////////////////////////////////////////////// + /// Get the data ///////////////////////////// + ///////////////////////////////////////////// + + // Define the datastructures + std::string line; + + long long res1 = 0; // Start at 0 + int res2 = 0; + + std::vector disk; + + int id = 0; + bool free = false; + // Read input and populate lists + while (std::getline(inputFile, line)) { + for (char c : line) { + // Get the number + int n = (int)c - 48; + + // Iterate over the input + if (free) { + for (int i = 0; i < n; i++) { + // -1 represents the dot here + disk.push_back(-1); + } + // Increment id + } else { + // Push_back with id + for (int i = 0; i < n; i++) { + disk.push_back(id); + } + id++; + } + // Change the input type + free = !free; + } + } + + // Closing the file (all the information is in cpp data structures now) + inputFile.close(); + + //////////////////////////////////////// + // Evaluate the collected data ///////// + //////////////////////////////////////// + + /// Algorithms go here + + bool found = 1; + while (found) { + // Get the last element + int n = disk[disk.size() - 1]; + + // Find the first free space + found = false; + for (int i = 0; i < disk.size(); i++) { + if (disk[i] == -1) { + // Sway the elemnents + disk[i] = n; + disk.pop_back(); + + // Break + found = true; + break; + } + } + } + + for (long long i = 0; i < disk.size(); i++) { + res1 += i * disk[i]; + } + + dbg(res1); + + /////////////////////////////////////// + /// Output results /////////////////// + ///////////////////////////////////// + + // First result + long long first = res1 | 000; + /////////////// + int second = res2 | 000; + // Second result + + // Print results + if (DEBUG == false) { + if (second_part == true) { + std::cout << second; + } else { + std::cout << first; + } + } + + return 0; +} diff --git a/src/solutions/10.cpp b/src/solutions/10.cpp new file mode 100644 index 0000000..327f05a --- /dev/null +++ b/src/solutions/10.cpp @@ -0,0 +1,6 @@ +#include + +int main(int argc, char *argv[]) { + std::cout << "HE"; + return 0; +} diff --git a/src/solutions/11.cpp b/src/solutions/11.cpp new file mode 100644 index 0000000..519d9bc --- /dev/null +++ b/src/solutions/11.cpp @@ -0,0 +1,109 @@ +// Include the libs (essesntials) +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +///////////////// PREAMBLE ///////////////////////////// + +// Settings +const std::string DAYNUMBER = "00"; +const bool DEBUG = true; + +// For efficient debugging +#define dbg(expr) \ + (DEBUG ? (std::cerr << "[DBG] " << __FILE__ << ":" << __LINE__ << " (" \ + << #expr << ") = " << (expr) << "\n", \ + (expr)) \ + : (expr)) + +// Strucutres +struct Struktur {}; + +// Classes +class Klasse; + +// New Types +using inta = std::vector; // int array +using str = std::string; // python like str +using stra = std::vector; // str array + +//////////////////////// Main ////////////////////////// + +int main(int argc, char *argv[]) { + /////////////////////////////// + // Preamble for Main ////////// + ////////////////////////////// + + // Check for part + // This works by just providing a random argument to the execution + bool second_part; + if (argc > 1) { // Going to the part two when provided arguments + second_part = true; + } + + std::string file; + if (DEBUG) { + file = "src/examples/" + DAYNUMBER + ".ex"; + } else { + file = "src/inputs/" + DAYNUMBER + ".in"; + } + + std::ifstream inputFile(file); + // Return when not found + if (!inputFile) { + return 1; + } + + /////////////////////////////////////////////// + /// Get the data ///////////////////////////// + ///////////////////////////////////////////// + + // Define the datastructures + std::string line; + + long res1 = 0, res2 = 0; // Starting at 0 + + // Read input and populate lists + while (std::getline(inputFile, line)) { + // Parsing goes here + } + + // Closing the file (all the information is in cpp data structures now) + inputFile.close(); + + //////////////////////////////////////// + // Evaluate the collected data ///////// + //////////////////////////////////////// + + /// Algorithms go here + + /////////////////////////////////////// + /// Output results /////////////////// + ///////////////////////////////////// + + // First result + long first = res1 | 000; + /////////////// + long second = res2 | 000; + // Second result + + // Print results + if (DEBUG == false) { + if (second_part == true) { + std::cout << second; + } else { + std::cout << first; + } + } + + return 0; +} diff --git a/src/solutions/12.cpp b/src/solutions/12.cpp new file mode 100644 index 0000000..519d9bc --- /dev/null +++ b/src/solutions/12.cpp @@ -0,0 +1,109 @@ +// Include the libs (essesntials) +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +///////////////// PREAMBLE ///////////////////////////// + +// Settings +const std::string DAYNUMBER = "00"; +const bool DEBUG = true; + +// For efficient debugging +#define dbg(expr) \ + (DEBUG ? (std::cerr << "[DBG] " << __FILE__ << ":" << __LINE__ << " (" \ + << #expr << ") = " << (expr) << "\n", \ + (expr)) \ + : (expr)) + +// Strucutres +struct Struktur {}; + +// Classes +class Klasse; + +// New Types +using inta = std::vector; // int array +using str = std::string; // python like str +using stra = std::vector; // str array + +//////////////////////// Main ////////////////////////// + +int main(int argc, char *argv[]) { + /////////////////////////////// + // Preamble for Main ////////// + ////////////////////////////// + + // Check for part + // This works by just providing a random argument to the execution + bool second_part; + if (argc > 1) { // Going to the part two when provided arguments + second_part = true; + } + + std::string file; + if (DEBUG) { + file = "src/examples/" + DAYNUMBER + ".ex"; + } else { + file = "src/inputs/" + DAYNUMBER + ".in"; + } + + std::ifstream inputFile(file); + // Return when not found + if (!inputFile) { + return 1; + } + + /////////////////////////////////////////////// + /// Get the data ///////////////////////////// + ///////////////////////////////////////////// + + // Define the datastructures + std::string line; + + long res1 = 0, res2 = 0; // Starting at 0 + + // Read input and populate lists + while (std::getline(inputFile, line)) { + // Parsing goes here + } + + // Closing the file (all the information is in cpp data structures now) + inputFile.close(); + + //////////////////////////////////////// + // Evaluate the collected data ///////// + //////////////////////////////////////// + + /// Algorithms go here + + /////////////////////////////////////// + /// Output results /////////////////// + ///////////////////////////////////// + + // First result + long first = res1 | 000; + /////////////// + long second = res2 | 000; + // Second result + + // Print results + if (DEBUG == false) { + if (second_part == true) { + std::cout << second; + } else { + std::cout << first; + } + } + + return 0; +} diff --git a/src/solutions/13.cpp b/src/solutions/13.cpp new file mode 100644 index 0000000..519d9bc --- /dev/null +++ b/src/solutions/13.cpp @@ -0,0 +1,109 @@ +// Include the libs (essesntials) +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +///////////////// PREAMBLE ///////////////////////////// + +// Settings +const std::string DAYNUMBER = "00"; +const bool DEBUG = true; + +// For efficient debugging +#define dbg(expr) \ + (DEBUG ? (std::cerr << "[DBG] " << __FILE__ << ":" << __LINE__ << " (" \ + << #expr << ") = " << (expr) << "\n", \ + (expr)) \ + : (expr)) + +// Strucutres +struct Struktur {}; + +// Classes +class Klasse; + +// New Types +using inta = std::vector; // int array +using str = std::string; // python like str +using stra = std::vector; // str array + +//////////////////////// Main ////////////////////////// + +int main(int argc, char *argv[]) { + /////////////////////////////// + // Preamble for Main ////////// + ////////////////////////////// + + // Check for part + // This works by just providing a random argument to the execution + bool second_part; + if (argc > 1) { // Going to the part two when provided arguments + second_part = true; + } + + std::string file; + if (DEBUG) { + file = "src/examples/" + DAYNUMBER + ".ex"; + } else { + file = "src/inputs/" + DAYNUMBER + ".in"; + } + + std::ifstream inputFile(file); + // Return when not found + if (!inputFile) { + return 1; + } + + /////////////////////////////////////////////// + /// Get the data ///////////////////////////// + ///////////////////////////////////////////// + + // Define the datastructures + std::string line; + + long res1 = 0, res2 = 0; // Starting at 0 + + // Read input and populate lists + while (std::getline(inputFile, line)) { + // Parsing goes here + } + + // Closing the file (all the information is in cpp data structures now) + inputFile.close(); + + //////////////////////////////////////// + // Evaluate the collected data ///////// + //////////////////////////////////////// + + /// Algorithms go here + + /////////////////////////////////////// + /// Output results /////////////////// + ///////////////////////////////////// + + // First result + long first = res1 | 000; + /////////////// + long second = res2 | 000; + // Second result + + // Print results + if (DEBUG == false) { + if (second_part == true) { + std::cout << second; + } else { + std::cout << first; + } + } + + return 0; +} diff --git a/src/solutions/14.cpp b/src/solutions/14.cpp new file mode 100644 index 0000000..519d9bc --- /dev/null +++ b/src/solutions/14.cpp @@ -0,0 +1,109 @@ +// Include the libs (essesntials) +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +///////////////// PREAMBLE ///////////////////////////// + +// Settings +const std::string DAYNUMBER = "00"; +const bool DEBUG = true; + +// For efficient debugging +#define dbg(expr) \ + (DEBUG ? (std::cerr << "[DBG] " << __FILE__ << ":" << __LINE__ << " (" \ + << #expr << ") = " << (expr) << "\n", \ + (expr)) \ + : (expr)) + +// Strucutres +struct Struktur {}; + +// Classes +class Klasse; + +// New Types +using inta = std::vector; // int array +using str = std::string; // python like str +using stra = std::vector; // str array + +//////////////////////// Main ////////////////////////// + +int main(int argc, char *argv[]) { + /////////////////////////////// + // Preamble for Main ////////// + ////////////////////////////// + + // Check for part + // This works by just providing a random argument to the execution + bool second_part; + if (argc > 1) { // Going to the part two when provided arguments + second_part = true; + } + + std::string file; + if (DEBUG) { + file = "src/examples/" + DAYNUMBER + ".ex"; + } else { + file = "src/inputs/" + DAYNUMBER + ".in"; + } + + std::ifstream inputFile(file); + // Return when not found + if (!inputFile) { + return 1; + } + + /////////////////////////////////////////////// + /// Get the data ///////////////////////////// + ///////////////////////////////////////////// + + // Define the datastructures + std::string line; + + long res1 = 0, res2 = 0; // Starting at 0 + + // Read input and populate lists + while (std::getline(inputFile, line)) { + // Parsing goes here + } + + // Closing the file (all the information is in cpp data structures now) + inputFile.close(); + + //////////////////////////////////////// + // Evaluate the collected data ///////// + //////////////////////////////////////// + + /// Algorithms go here + + /////////////////////////////////////// + /// Output results /////////////////// + ///////////////////////////////////// + + // First result + long first = res1 | 000; + /////////////// + long second = res2 | 000; + // Second result + + // Print results + if (DEBUG == false) { + if (second_part == true) { + std::cout << second; + } else { + std::cout << first; + } + } + + return 0; +} diff --git a/src/solutions/15.cpp b/src/solutions/15.cpp new file mode 100644 index 0000000..519d9bc --- /dev/null +++ b/src/solutions/15.cpp @@ -0,0 +1,109 @@ +// Include the libs (essesntials) +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +///////////////// PREAMBLE ///////////////////////////// + +// Settings +const std::string DAYNUMBER = "00"; +const bool DEBUG = true; + +// For efficient debugging +#define dbg(expr) \ + (DEBUG ? (std::cerr << "[DBG] " << __FILE__ << ":" << __LINE__ << " (" \ + << #expr << ") = " << (expr) << "\n", \ + (expr)) \ + : (expr)) + +// Strucutres +struct Struktur {}; + +// Classes +class Klasse; + +// New Types +using inta = std::vector; // int array +using str = std::string; // python like str +using stra = std::vector; // str array + +//////////////////////// Main ////////////////////////// + +int main(int argc, char *argv[]) { + /////////////////////////////// + // Preamble for Main ////////// + ////////////////////////////// + + // Check for part + // This works by just providing a random argument to the execution + bool second_part; + if (argc > 1) { // Going to the part two when provided arguments + second_part = true; + } + + std::string file; + if (DEBUG) { + file = "src/examples/" + DAYNUMBER + ".ex"; + } else { + file = "src/inputs/" + DAYNUMBER + ".in"; + } + + std::ifstream inputFile(file); + // Return when not found + if (!inputFile) { + return 1; + } + + /////////////////////////////////////////////// + /// Get the data ///////////////////////////// + ///////////////////////////////////////////// + + // Define the datastructures + std::string line; + + long res1 = 0, res2 = 0; // Starting at 0 + + // Read input and populate lists + while (std::getline(inputFile, line)) { + // Parsing goes here + } + + // Closing the file (all the information is in cpp data structures now) + inputFile.close(); + + //////////////////////////////////////// + // Evaluate the collected data ///////// + //////////////////////////////////////// + + /// Algorithms go here + + /////////////////////////////////////// + /// Output results /////////////////// + ///////////////////////////////////// + + // First result + long first = res1 | 000; + /////////////// + long second = res2 | 000; + // Second result + + // Print results + if (DEBUG == false) { + if (second_part == true) { + std::cout << second; + } else { + std::cout << first; + } + } + + return 0; +} diff --git a/src/solutions/16.cpp b/src/solutions/16.cpp new file mode 100644 index 0000000..519d9bc --- /dev/null +++ b/src/solutions/16.cpp @@ -0,0 +1,109 @@ +// Include the libs (essesntials) +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +///////////////// PREAMBLE ///////////////////////////// + +// Settings +const std::string DAYNUMBER = "00"; +const bool DEBUG = true; + +// For efficient debugging +#define dbg(expr) \ + (DEBUG ? (std::cerr << "[DBG] " << __FILE__ << ":" << __LINE__ << " (" \ + << #expr << ") = " << (expr) << "\n", \ + (expr)) \ + : (expr)) + +// Strucutres +struct Struktur {}; + +// Classes +class Klasse; + +// New Types +using inta = std::vector; // int array +using str = std::string; // python like str +using stra = std::vector; // str array + +//////////////////////// Main ////////////////////////// + +int main(int argc, char *argv[]) { + /////////////////////////////// + // Preamble for Main ////////// + ////////////////////////////// + + // Check for part + // This works by just providing a random argument to the execution + bool second_part; + if (argc > 1) { // Going to the part two when provided arguments + second_part = true; + } + + std::string file; + if (DEBUG) { + file = "src/examples/" + DAYNUMBER + ".ex"; + } else { + file = "src/inputs/" + DAYNUMBER + ".in"; + } + + std::ifstream inputFile(file); + // Return when not found + if (!inputFile) { + return 1; + } + + /////////////////////////////////////////////// + /// Get the data ///////////////////////////// + ///////////////////////////////////////////// + + // Define the datastructures + std::string line; + + long res1 = 0, res2 = 0; // Starting at 0 + + // Read input and populate lists + while (std::getline(inputFile, line)) { + // Parsing goes here + } + + // Closing the file (all the information is in cpp data structures now) + inputFile.close(); + + //////////////////////////////////////// + // Evaluate the collected data ///////// + //////////////////////////////////////// + + /// Algorithms go here + + /////////////////////////////////////// + /// Output results /////////////////// + ///////////////////////////////////// + + // First result + long first = res1 | 000; + /////////////// + long second = res2 | 000; + // Second result + + // Print results + if (DEBUG == false) { + if (second_part == true) { + std::cout << second; + } else { + std::cout << first; + } + } + + return 0; +} diff --git a/src/solutions/17.cpp b/src/solutions/17.cpp new file mode 100644 index 0000000..519d9bc --- /dev/null +++ b/src/solutions/17.cpp @@ -0,0 +1,109 @@ +// Include the libs (essesntials) +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +///////////////// PREAMBLE ///////////////////////////// + +// Settings +const std::string DAYNUMBER = "00"; +const bool DEBUG = true; + +// For efficient debugging +#define dbg(expr) \ + (DEBUG ? (std::cerr << "[DBG] " << __FILE__ << ":" << __LINE__ << " (" \ + << #expr << ") = " << (expr) << "\n", \ + (expr)) \ + : (expr)) + +// Strucutres +struct Struktur {}; + +// Classes +class Klasse; + +// New Types +using inta = std::vector; // int array +using str = std::string; // python like str +using stra = std::vector; // str array + +//////////////////////// Main ////////////////////////// + +int main(int argc, char *argv[]) { + /////////////////////////////// + // Preamble for Main ////////// + ////////////////////////////// + + // Check for part + // This works by just providing a random argument to the execution + bool second_part; + if (argc > 1) { // Going to the part two when provided arguments + second_part = true; + } + + std::string file; + if (DEBUG) { + file = "src/examples/" + DAYNUMBER + ".ex"; + } else { + file = "src/inputs/" + DAYNUMBER + ".in"; + } + + std::ifstream inputFile(file); + // Return when not found + if (!inputFile) { + return 1; + } + + /////////////////////////////////////////////// + /// Get the data ///////////////////////////// + ///////////////////////////////////////////// + + // Define the datastructures + std::string line; + + long res1 = 0, res2 = 0; // Starting at 0 + + // Read input and populate lists + while (std::getline(inputFile, line)) { + // Parsing goes here + } + + // Closing the file (all the information is in cpp data structures now) + inputFile.close(); + + //////////////////////////////////////// + // Evaluate the collected data ///////// + //////////////////////////////////////// + + /// Algorithms go here + + /////////////////////////////////////// + /// Output results /////////////////// + ///////////////////////////////////// + + // First result + long first = res1 | 000; + /////////////// + long second = res2 | 000; + // Second result + + // Print results + if (DEBUG == false) { + if (second_part == true) { + std::cout << second; + } else { + std::cout << first; + } + } + + return 0; +} diff --git a/src/solutions/18.cpp b/src/solutions/18.cpp new file mode 100644 index 0000000..519d9bc --- /dev/null +++ b/src/solutions/18.cpp @@ -0,0 +1,109 @@ +// Include the libs (essesntials) +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +///////////////// PREAMBLE ///////////////////////////// + +// Settings +const std::string DAYNUMBER = "00"; +const bool DEBUG = true; + +// For efficient debugging +#define dbg(expr) \ + (DEBUG ? (std::cerr << "[DBG] " << __FILE__ << ":" << __LINE__ << " (" \ + << #expr << ") = " << (expr) << "\n", \ + (expr)) \ + : (expr)) + +// Strucutres +struct Struktur {}; + +// Classes +class Klasse; + +// New Types +using inta = std::vector; // int array +using str = std::string; // python like str +using stra = std::vector; // str array + +//////////////////////// Main ////////////////////////// + +int main(int argc, char *argv[]) { + /////////////////////////////// + // Preamble for Main ////////// + ////////////////////////////// + + // Check for part + // This works by just providing a random argument to the execution + bool second_part; + if (argc > 1) { // Going to the part two when provided arguments + second_part = true; + } + + std::string file; + if (DEBUG) { + file = "src/examples/" + DAYNUMBER + ".ex"; + } else { + file = "src/inputs/" + DAYNUMBER + ".in"; + } + + std::ifstream inputFile(file); + // Return when not found + if (!inputFile) { + return 1; + } + + /////////////////////////////////////////////// + /// Get the data ///////////////////////////// + ///////////////////////////////////////////// + + // Define the datastructures + std::string line; + + long res1 = 0, res2 = 0; // Starting at 0 + + // Read input and populate lists + while (std::getline(inputFile, line)) { + // Parsing goes here + } + + // Closing the file (all the information is in cpp data structures now) + inputFile.close(); + + //////////////////////////////////////// + // Evaluate the collected data ///////// + //////////////////////////////////////// + + /// Algorithms go here + + /////////////////////////////////////// + /// Output results /////////////////// + ///////////////////////////////////// + + // First result + long first = res1 | 000; + /////////////// + long second = res2 | 000; + // Second result + + // Print results + if (DEBUG == false) { + if (second_part == true) { + std::cout << second; + } else { + std::cout << first; + } + } + + return 0; +} diff --git a/src/solutions/19.cpp b/src/solutions/19.cpp new file mode 100644 index 0000000..519d9bc --- /dev/null +++ b/src/solutions/19.cpp @@ -0,0 +1,109 @@ +// Include the libs (essesntials) +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +///////////////// PREAMBLE ///////////////////////////// + +// Settings +const std::string DAYNUMBER = "00"; +const bool DEBUG = true; + +// For efficient debugging +#define dbg(expr) \ + (DEBUG ? (std::cerr << "[DBG] " << __FILE__ << ":" << __LINE__ << " (" \ + << #expr << ") = " << (expr) << "\n", \ + (expr)) \ + : (expr)) + +// Strucutres +struct Struktur {}; + +// Classes +class Klasse; + +// New Types +using inta = std::vector; // int array +using str = std::string; // python like str +using stra = std::vector; // str array + +//////////////////////// Main ////////////////////////// + +int main(int argc, char *argv[]) { + /////////////////////////////// + // Preamble for Main ////////// + ////////////////////////////// + + // Check for part + // This works by just providing a random argument to the execution + bool second_part; + if (argc > 1) { // Going to the part two when provided arguments + second_part = true; + } + + std::string file; + if (DEBUG) { + file = "src/examples/" + DAYNUMBER + ".ex"; + } else { + file = "src/inputs/" + DAYNUMBER + ".in"; + } + + std::ifstream inputFile(file); + // Return when not found + if (!inputFile) { + return 1; + } + + /////////////////////////////////////////////// + /// Get the data ///////////////////////////// + ///////////////////////////////////////////// + + // Define the datastructures + std::string line; + + long res1 = 0, res2 = 0; // Starting at 0 + + // Read input and populate lists + while (std::getline(inputFile, line)) { + // Parsing goes here + } + + // Closing the file (all the information is in cpp data structures now) + inputFile.close(); + + //////////////////////////////////////// + // Evaluate the collected data ///////// + //////////////////////////////////////// + + /// Algorithms go here + + /////////////////////////////////////// + /// Output results /////////////////// + ///////////////////////////////////// + + // First result + long first = res1 | 000; + /////////////// + long second = res2 | 000; + // Second result + + // Print results + if (DEBUG == false) { + if (second_part == true) { + std::cout << second; + } else { + std::cout << first; + } + } + + return 0; +} diff --git a/src/solutions/20.cpp b/src/solutions/20.cpp new file mode 100644 index 0000000..519d9bc --- /dev/null +++ b/src/solutions/20.cpp @@ -0,0 +1,109 @@ +// Include the libs (essesntials) +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +///////////////// PREAMBLE ///////////////////////////// + +// Settings +const std::string DAYNUMBER = "00"; +const bool DEBUG = true; + +// For efficient debugging +#define dbg(expr) \ + (DEBUG ? (std::cerr << "[DBG] " << __FILE__ << ":" << __LINE__ << " (" \ + << #expr << ") = " << (expr) << "\n", \ + (expr)) \ + : (expr)) + +// Strucutres +struct Struktur {}; + +// Classes +class Klasse; + +// New Types +using inta = std::vector; // int array +using str = std::string; // python like str +using stra = std::vector; // str array + +//////////////////////// Main ////////////////////////// + +int main(int argc, char *argv[]) { + /////////////////////////////// + // Preamble for Main ////////// + ////////////////////////////// + + // Check for part + // This works by just providing a random argument to the execution + bool second_part; + if (argc > 1) { // Going to the part two when provided arguments + second_part = true; + } + + std::string file; + if (DEBUG) { + file = "src/examples/" + DAYNUMBER + ".ex"; + } else { + file = "src/inputs/" + DAYNUMBER + ".in"; + } + + std::ifstream inputFile(file); + // Return when not found + if (!inputFile) { + return 1; + } + + /////////////////////////////////////////////// + /// Get the data ///////////////////////////// + ///////////////////////////////////////////// + + // Define the datastructures + std::string line; + + long res1 = 0, res2 = 0; // Starting at 0 + + // Read input and populate lists + while (std::getline(inputFile, line)) { + // Parsing goes here + } + + // Closing the file (all the information is in cpp data structures now) + inputFile.close(); + + //////////////////////////////////////// + // Evaluate the collected data ///////// + //////////////////////////////////////// + + /// Algorithms go here + + /////////////////////////////////////// + /// Output results /////////////////// + ///////////////////////////////////// + + // First result + long first = res1 | 000; + /////////////// + long second = res2 | 000; + // Second result + + // Print results + if (DEBUG == false) { + if (second_part == true) { + std::cout << second; + } else { + std::cout << first; + } + } + + return 0; +} diff --git a/src/solutions/21.cpp b/src/solutions/21.cpp new file mode 100644 index 0000000..519d9bc --- /dev/null +++ b/src/solutions/21.cpp @@ -0,0 +1,109 @@ +// Include the libs (essesntials) +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +///////////////// PREAMBLE ///////////////////////////// + +// Settings +const std::string DAYNUMBER = "00"; +const bool DEBUG = true; + +// For efficient debugging +#define dbg(expr) \ + (DEBUG ? (std::cerr << "[DBG] " << __FILE__ << ":" << __LINE__ << " (" \ + << #expr << ") = " << (expr) << "\n", \ + (expr)) \ + : (expr)) + +// Strucutres +struct Struktur {}; + +// Classes +class Klasse; + +// New Types +using inta = std::vector; // int array +using str = std::string; // python like str +using stra = std::vector; // str array + +//////////////////////// Main ////////////////////////// + +int main(int argc, char *argv[]) { + /////////////////////////////// + // Preamble for Main ////////// + ////////////////////////////// + + // Check for part + // This works by just providing a random argument to the execution + bool second_part; + if (argc > 1) { // Going to the part two when provided arguments + second_part = true; + } + + std::string file; + if (DEBUG) { + file = "src/examples/" + DAYNUMBER + ".ex"; + } else { + file = "src/inputs/" + DAYNUMBER + ".in"; + } + + std::ifstream inputFile(file); + // Return when not found + if (!inputFile) { + return 1; + } + + /////////////////////////////////////////////// + /// Get the data ///////////////////////////// + ///////////////////////////////////////////// + + // Define the datastructures + std::string line; + + long res1 = 0, res2 = 0; // Starting at 0 + + // Read input and populate lists + while (std::getline(inputFile, line)) { + // Parsing goes here + } + + // Closing the file (all the information is in cpp data structures now) + inputFile.close(); + + //////////////////////////////////////// + // Evaluate the collected data ///////// + //////////////////////////////////////// + + /// Algorithms go here + + /////////////////////////////////////// + /// Output results /////////////////// + ///////////////////////////////////// + + // First result + long first = res1 | 000; + /////////////// + long second = res2 | 000; + // Second result + + // Print results + if (DEBUG == false) { + if (second_part == true) { + std::cout << second; + } else { + std::cout << first; + } + } + + return 0; +} diff --git a/src/solutions/22.cpp b/src/solutions/22.cpp new file mode 100644 index 0000000..519d9bc --- /dev/null +++ b/src/solutions/22.cpp @@ -0,0 +1,109 @@ +// Include the libs (essesntials) +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +///////////////// PREAMBLE ///////////////////////////// + +// Settings +const std::string DAYNUMBER = "00"; +const bool DEBUG = true; + +// For efficient debugging +#define dbg(expr) \ + (DEBUG ? (std::cerr << "[DBG] " << __FILE__ << ":" << __LINE__ << " (" \ + << #expr << ") = " << (expr) << "\n", \ + (expr)) \ + : (expr)) + +// Strucutres +struct Struktur {}; + +// Classes +class Klasse; + +// New Types +using inta = std::vector; // int array +using str = std::string; // python like str +using stra = std::vector; // str array + +//////////////////////// Main ////////////////////////// + +int main(int argc, char *argv[]) { + /////////////////////////////// + // Preamble for Main ////////// + ////////////////////////////// + + // Check for part + // This works by just providing a random argument to the execution + bool second_part; + if (argc > 1) { // Going to the part two when provided arguments + second_part = true; + } + + std::string file; + if (DEBUG) { + file = "src/examples/" + DAYNUMBER + ".ex"; + } else { + file = "src/inputs/" + DAYNUMBER + ".in"; + } + + std::ifstream inputFile(file); + // Return when not found + if (!inputFile) { + return 1; + } + + /////////////////////////////////////////////// + /// Get the data ///////////////////////////// + ///////////////////////////////////////////// + + // Define the datastructures + std::string line; + + long res1 = 0, res2 = 0; // Starting at 0 + + // Read input and populate lists + while (std::getline(inputFile, line)) { + // Parsing goes here + } + + // Closing the file (all the information is in cpp data structures now) + inputFile.close(); + + //////////////////////////////////////// + // Evaluate the collected data ///////// + //////////////////////////////////////// + + /// Algorithms go here + + /////////////////////////////////////// + /// Output results /////////////////// + ///////////////////////////////////// + + // First result + long first = res1 | 000; + /////////////// + long second = res2 | 000; + // Second result + + // Print results + if (DEBUG == false) { + if (second_part == true) { + std::cout << second; + } else { + std::cout << first; + } + } + + return 0; +} diff --git a/src/solutions/23.cpp b/src/solutions/23.cpp new file mode 100644 index 0000000..519d9bc --- /dev/null +++ b/src/solutions/23.cpp @@ -0,0 +1,109 @@ +// Include the libs (essesntials) +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +///////////////// PREAMBLE ///////////////////////////// + +// Settings +const std::string DAYNUMBER = "00"; +const bool DEBUG = true; + +// For efficient debugging +#define dbg(expr) \ + (DEBUG ? (std::cerr << "[DBG] " << __FILE__ << ":" << __LINE__ << " (" \ + << #expr << ") = " << (expr) << "\n", \ + (expr)) \ + : (expr)) + +// Strucutres +struct Struktur {}; + +// Classes +class Klasse; + +// New Types +using inta = std::vector; // int array +using str = std::string; // python like str +using stra = std::vector; // str array + +//////////////////////// Main ////////////////////////// + +int main(int argc, char *argv[]) { + /////////////////////////////// + // Preamble for Main ////////// + ////////////////////////////// + + // Check for part + // This works by just providing a random argument to the execution + bool second_part; + if (argc > 1) { // Going to the part two when provided arguments + second_part = true; + } + + std::string file; + if (DEBUG) { + file = "src/examples/" + DAYNUMBER + ".ex"; + } else { + file = "src/inputs/" + DAYNUMBER + ".in"; + } + + std::ifstream inputFile(file); + // Return when not found + if (!inputFile) { + return 1; + } + + /////////////////////////////////////////////// + /// Get the data ///////////////////////////// + ///////////////////////////////////////////// + + // Define the datastructures + std::string line; + + long res1 = 0, res2 = 0; // Starting at 0 + + // Read input and populate lists + while (std::getline(inputFile, line)) { + // Parsing goes here + } + + // Closing the file (all the information is in cpp data structures now) + inputFile.close(); + + //////////////////////////////////////// + // Evaluate the collected data ///////// + //////////////////////////////////////// + + /// Algorithms go here + + /////////////////////////////////////// + /// Output results /////////////////// + ///////////////////////////////////// + + // First result + long first = res1 | 000; + /////////////// + long second = res2 | 000; + // Second result + + // Print results + if (DEBUG == false) { + if (second_part == true) { + std::cout << second; + } else { + std::cout << first; + } + } + + return 0; +} diff --git a/src/solutions/24.cpp b/src/solutions/24.cpp new file mode 100644 index 0000000..519d9bc --- /dev/null +++ b/src/solutions/24.cpp @@ -0,0 +1,109 @@ +// Include the libs (essesntials) +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +///////////////// PREAMBLE ///////////////////////////// + +// Settings +const std::string DAYNUMBER = "00"; +const bool DEBUG = true; + +// For efficient debugging +#define dbg(expr) \ + (DEBUG ? (std::cerr << "[DBG] " << __FILE__ << ":" << __LINE__ << " (" \ + << #expr << ") = " << (expr) << "\n", \ + (expr)) \ + : (expr)) + +// Strucutres +struct Struktur {}; + +// Classes +class Klasse; + +// New Types +using inta = std::vector; // int array +using str = std::string; // python like str +using stra = std::vector; // str array + +//////////////////////// Main ////////////////////////// + +int main(int argc, char *argv[]) { + /////////////////////////////// + // Preamble for Main ////////// + ////////////////////////////// + + // Check for part + // This works by just providing a random argument to the execution + bool second_part; + if (argc > 1) { // Going to the part two when provided arguments + second_part = true; + } + + std::string file; + if (DEBUG) { + file = "src/examples/" + DAYNUMBER + ".ex"; + } else { + file = "src/inputs/" + DAYNUMBER + ".in"; + } + + std::ifstream inputFile(file); + // Return when not found + if (!inputFile) { + return 1; + } + + /////////////////////////////////////////////// + /// Get the data ///////////////////////////// + ///////////////////////////////////////////// + + // Define the datastructures + std::string line; + + long res1 = 0, res2 = 0; // Starting at 0 + + // Read input and populate lists + while (std::getline(inputFile, line)) { + // Parsing goes here + } + + // Closing the file (all the information is in cpp data structures now) + inputFile.close(); + + //////////////////////////////////////// + // Evaluate the collected data ///////// + //////////////////////////////////////// + + /// Algorithms go here + + /////////////////////////////////////// + /// Output results /////////////////// + ///////////////////////////////////// + + // First result + long first = res1 | 000; + /////////////// + long second = res2 | 000; + // Second result + + // Print results + if (DEBUG == false) { + if (second_part == true) { + std::cout << second; + } else { + std::cout << first; + } + } + + return 0; +} diff --git a/src/solutions/25.cpp b/src/solutions/25.cpp new file mode 100644 index 0000000..519d9bc --- /dev/null +++ b/src/solutions/25.cpp @@ -0,0 +1,109 @@ +// Include the libs (essesntials) +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +///////////////// PREAMBLE ///////////////////////////// + +// Settings +const std::string DAYNUMBER = "00"; +const bool DEBUG = true; + +// For efficient debugging +#define dbg(expr) \ + (DEBUG ? (std::cerr << "[DBG] " << __FILE__ << ":" << __LINE__ << " (" \ + << #expr << ") = " << (expr) << "\n", \ + (expr)) \ + : (expr)) + +// Strucutres +struct Struktur {}; + +// Classes +class Klasse; + +// New Types +using inta = std::vector; // int array +using str = std::string; // python like str +using stra = std::vector; // str array + +//////////////////////// Main ////////////////////////// + +int main(int argc, char *argv[]) { + /////////////////////////////// + // Preamble for Main ////////// + ////////////////////////////// + + // Check for part + // This works by just providing a random argument to the execution + bool second_part; + if (argc > 1) { // Going to the part two when provided arguments + second_part = true; + } + + std::string file; + if (DEBUG) { + file = "src/examples/" + DAYNUMBER + ".ex"; + } else { + file = "src/inputs/" + DAYNUMBER + ".in"; + } + + std::ifstream inputFile(file); + // Return when not found + if (!inputFile) { + return 1; + } + + /////////////////////////////////////////////// + /// Get the data ///////////////////////////// + ///////////////////////////////////////////// + + // Define the datastructures + std::string line; + + long res1 = 0, res2 = 0; // Starting at 0 + + // Read input and populate lists + while (std::getline(inputFile, line)) { + // Parsing goes here + } + + // Closing the file (all the information is in cpp data structures now) + inputFile.close(); + + //////////////////////////////////////// + // Evaluate the collected data ///////// + //////////////////////////////////////// + + /// Algorithms go here + + /////////////////////////////////////// + /// Output results /////////////////// + ///////////////////////////////////// + + // First result + long first = res1 | 000; + /////////////// + long second = res2 | 000; + // Second result + + // Print results + if (DEBUG == false) { + if (second_part == true) { + std::cout << second; + } else { + std::cout << first; + } + } + + return 0; +}