diff --git a/2024/day01/default.nix b/2024/day01/default.nix new file mode 100644 index 0000000..001c208 --- /dev/null +++ b/2024/day01/default.nix @@ -0,0 +1,43 @@ +{ pkgs, lib }: + +with lib; + +let + input = pipe (fileContents ./input.txt) [ + (splitString "\n") + (map (split "[[:space:]]+")) + (map (x: { + fst = elemAt x 0; + snd = elemAt x 2; + })) + (x: { + fst = catAttrs "fst" x; + snd = catAttrs "snd" x; + }) + ]; + + abs = x: if x < 0 then -x else x; + + answer1 = lib.pipe input [ + (mapAttrs (_: xs: sort lessThan (map toInt xs))) + ({ fst, snd }: zipListsWith (x: y: abs (x - y)) fst snd) + (foldl add 0) + toString + ]; + + similarity = left: right: let + rightCount = foldl (acc: x: acc // { ${x} = (acc.${x} or 0) + 1; }) { } right; + in foldl add 0 (map (x: (toInt x) * rightCount.${x} or 0) left); + + answer2 = lib.pipe input [ + ({ fst, snd }: similarity fst snd) + toString + ]; +in + pkgs.writeText "answers" '' + Task1: + ${answer1} + + Task2: + ${answer2} +'' diff --git a/2024/day01/input.txt b/2024/day01/input.txt new file mode 100644 index 0000000..ccd4dd4 --- /dev/null +++ b/2024/day01/input.txt @@ -0,0 +1,1000 @@ +57643 17620 +19062 47340 +11105 16109 +72032 30050 +16289 65967 +42361 35795 +45873 16124 +16167 65832 +57216 47340 +15920 71163 +22534 30837 +38721 64603 +27502 32313 +17094 50986 +84849 67526 +20884 64392 +21987 59516 +39419 98547 +10839 29910 +77870 15917 +94474 57604 +29876 18768 +72281 16109 +52066 21561 +11847 24044 +83711 11404 +47340 29941 +54869 62664 +63495 62664 +87421 46184 +12673 51492 +21401 77546 +13800 70131 +35534 46986 +51304 41199 +51515 39683 +25160 55295 +39133 88509 +68329 62664 +56917 84849 +68841 33033 +27693 78397 +82953 22601 +47353 27226 +70002 59980 +74154 16109 +86034 84849 +95639 62349 +45722 59516 +69049 22317 +51692 17620 +39166 65967 +30495 55388 +81255 17869 +60454 41199 +26224 81511 +74983 16124 +55752 90759 +22465 24501 +57854 22943 +94700 59516 +83099 31049 +26617 32773 +23277 52176 +34125 18754 +61685 11874 +49752 44170 +82839 26115 +28748 62664 +19753 73220 +76703 16124 +41076 60454 +94607 98100 +88668 47340 +56446 90759 +93070 65832 +25427 65524 +51967 16964 +23531 92947 +44724 76864 +32642 60237 +54203 22536 +62977 69799 +31242 64392 +94016 75284 +55953 84849 +35527 83890 +54207 16964 +44027 46184 +82186 60112 +72150 28927 +68617 89252 +57085 65832 +18164 39683 +28818 61894 +94464 96385 +73344 17681 +76429 27054 +25559 84215 +24143 65907 +12888 93195 +33654 52859 +13309 67042 +90824 55187 +42199 61494 +99525 33401 +60919 59516 +14832 74668 +83140 90759 +68116 75402 +35265 16124 +30971 57216 +84947 98547 +35362 15902 +98472 65832 +32851 30050 +47123 23601 +37165 73599 +64938 97672 +39094 16964 +32542 84849 +70739 89107 +59747 65832 +51960 87068 +75826 16109 +96621 92566 +80372 60656 +15595 92864 +17009 59796 +87108 16124 +70344 85636 +12951 89107 +25963 41199 +60994 12246 +26308 96930 +58823 37556 +18153 72254 +20975 11570 +42013 30141 +53539 39683 +40729 63401 +10964 17620 +76208 18768 +55734 12636 +29742 14160 +40999 33033 +61760 47123 +57734 85993 +32323 17620 +53967 71169 +41453 60454 +53895 39683 +99823 30156 +12983 20098 +71421 47829 +76964 33049 +82841 87433 +55517 47340 +75661 17620 +22232 16081 +36803 33033 +83930 32773 +54392 29132 +67783 27226 +78834 34040 +46044 60454 +97734 41199 +16374 82621 +23972 39787 +80360 33654 +48876 34378 +11260 16124 +53596 71313 +60950 65832 +37956 90734 +87063 64392 +66760 90734 +24341 90734 +13907 56662 +39084 64270 +30798 22591 +30370 22943 +57538 93797 +41199 60454 +79187 25199 +43099 18768 +13070 20881 +39307 45484 +89252 40350 +94161 81798 +91119 39683 +97429 39599 +64997 20578 +32145 98547 +13342 90759 +82088 58672 +61898 62664 +72616 78897 +17954 71652 +58825 68383 +44525 30658 +28074 33033 +17636 16124 +94958 61724 +48971 47340 +85361 48120 +82391 68794 +69603 23741 +64066 13582 +65092 45163 +49086 32773 +42231 98547 +56734 81797 +76829 30156 +99378 42745 +59516 22285 +18672 47123 +68792 97672 +46265 17620 +28964 77566 +14875 61068 +95708 23528 +38828 65832 +56799 51315 +40443 92737 +64615 32773 +27557 27226 +89585 76621 +67867 61305 +28621 65979 +88258 32773 +73478 16124 +98662 32773 +38098 90759 +76219 18768 +23664 32773 +70807 82839 +64392 16109 +39683 87325 +47297 91952 +25007 37572 +90841 32773 +82423 60454 +56193 59516 +83332 82839 +17826 59516 +95927 82839 +62664 88503 +33750 27771 +51457 90759 +47908 27341 +67000 30050 +66855 14734 +20055 52372 +60010 16109 +30431 95964 +12321 30156 +53585 88159 +55043 18768 +20000 73383 +28871 41199 +82812 89107 +13060 71616 +70027 36310 +80606 30050 +55151 27226 +63800 64392 +35192 66432 +78917 29589 +92483 32773 +10457 20728 +70963 57216 +67927 91119 +36688 67070 +93141 64392 +93362 16124 +81614 94940 +81186 66565 +56418 60166 +64292 70331 +43290 65832 +10656 27226 +38812 40982 +33000 16124 +18100 17109 +37989 85483 +14064 82711 +14399 16964 +22066 72604 +49658 47123 +29682 59516 +59980 19363 +91466 89107 +70211 30342 +35905 27226 +67755 17620 +75456 10664 +54074 65832 +23976 91119 +22224 80267 +78250 16081 +53819 26866 +99580 53011 +49653 89107 +13703 18768 +39210 33033 +13265 19583 +70869 74044 +42643 64392 +97800 80872 +33668 90759 +62475 21888 +64693 83264 +31715 99185 +83449 13990 +33033 91104 +39765 60517 +93890 60670 +23400 17620 +92189 93768 +63780 16109 +73093 50153 +13323 89107 +69167 61436 +48878 55630 +13718 57216 +27903 94896 +69456 16109 +46468 60454 +52145 30596 +20909 89107 +22536 67083 +80514 43159 +98390 36556 +78956 60454 +23497 55983 +15348 47123 +61890 90734 +89951 31879 +20728 79394 +49303 30713 +30422 57216 +73676 33033 +49698 81919 +76046 17620 +45242 84849 +25389 40202 +32448 47299 +59354 82839 +70423 89252 +89306 65967 +59766 27268 +37037 98547 +65021 18895 +54230 18768 +43969 63446 +50630 65832 +54139 88509 +85677 88746 +47692 37399 +21467 22536 +83644 67594 +21789 97672 +13648 90759 +28017 57216 +74883 49798 +16109 72646 +46184 30050 +36000 44597 +33728 22536 +44888 59516 +11222 30050 +36641 78012 +42426 18768 +93707 90734 +82249 39683 +86185 79158 +63476 45090 +52464 24645 +33497 47340 +51699 31223 +67877 36634 +16955 69854 +49928 61017 +16708 62664 +91134 29644 +24080 98547 +16031 91119 +49022 74628 +88710 44253 +22505 27651 +22483 33033 +10981 76873 +74260 90620 +53783 62664 +67774 16124 +56303 66706 +87017 74124 +25003 57216 +54386 20728 +55011 32773 +35564 45090 +43205 90759 +90317 96125 +65967 57216 +27412 88804 +26888 67612 +50833 83419 +90825 16964 +68203 18108 +51609 69179 +69744 65832 +56356 89107 +89107 54941 +88509 65832 +92237 90734 +44066 36406 +80980 58864 +98957 60659 +22264 41199 +60969 33654 +17620 40115 +90800 93572 +62862 64392 +27780 18768 +66419 60454 +70524 86222 +26486 27226 +72422 98298 +90508 30050 +28259 41199 +14239 39683 +21310 86711 +35507 62664 +77638 83310 +10307 33033 +71173 98232 +39165 57216 +92119 86108 +52470 17765 +18950 42325 +55271 29040 +25924 56949 +55619 20728 +48809 18768 +32300 53100 +60316 16153 +44763 74270 +25666 16964 +81291 67521 +60771 93797 +81653 16964 +67405 89107 +79747 52151 +47382 33033 +29989 34981 +50331 44690 +17848 60454 +89637 18768 +98116 64392 +80694 45090 +95798 10999 +78442 99645 +45090 94611 +23385 62664 +86919 59516 +71255 33033 +82002 97672 +89066 16109 +98896 86008 +27000 64545 +99089 90734 +13394 18768 +20748 89107 +88835 47340 +87101 16109 +61684 82505 +87896 16081 +97799 20728 +63040 62664 +85411 89107 +34131 74658 +65406 83937 +91155 99556 +65832 33674 +81208 55861 +85395 46184 +16926 99827 +35793 30050 +12707 57216 +67126 52814 +92795 88509 +91840 84607 +54768 65833 +52180 17819 +53100 30156 +73239 69810 +49380 49485 +80253 76262 +53209 49131 +11121 33033 +44463 39683 +53271 84849 +69448 76937 +36173 63218 +60547 75774 +54971 27226 +44418 65832 +66775 19905 +71561 21069 +32773 91318 +76204 81715 +98547 16081 +24876 22287 +33855 90759 +28306 16554 +30050 12914 +21242 90734 +19505 14213 +54591 48135 +72512 73973 +10186 72386 +98061 42401 +83084 32773 +38957 53473 +56756 98547 +36706 32773 +82325 47179 +24632 90734 +55788 34600 +21147 25888 +97814 89467 +76627 57216 +83496 45700 +35495 16109 +57929 30156 +44008 37332 +68284 20370 +58203 59516 +33603 91682 +91850 39247 +55632 16124 +48086 33894 +96381 10569 +77170 84849 +39336 85833 +74736 15527 +92977 93797 +74412 47340 +99801 58501 +51368 17620 +68476 27226 +21734 45090 +85160 91119 +67622 80512 +33195 32773 +99282 17620 +40016 59575 +70136 10061 +60848 67727 +79546 47112 +71409 16964 +48029 34780 +75919 45090 +26206 47123 +26139 17620 +98726 47340 +75480 16333 +60703 16081 +56290 16109 +20547 97672 +85264 17620 +72745 41885 +11648 15733 +89927 64392 +41626 22536 +40096 98547 +11676 97594 +38937 27226 +95166 92683 +45499 90759 +44553 19438 +58227 32773 +78021 33033 +31576 78113 +25095 59274 +62956 43830 +87587 48890 +37318 26768 +31960 84849 +44972 30050 +47152 55462 +48034 69405 +99245 57216 +51671 20728 +31412 92094 +19038 53100 +30040 16109 +81022 24270 +28727 89381 +63343 62053 +44062 90734 +52098 20786 +32337 69696 +10627 47340 +86438 91119 +11359 97672 +79827 78893 +50991 73474 +41506 64392 +64427 58282 +30314 38013 +55147 51690 +24076 97672 +55139 30156 +84755 65832 +77418 39683 +65841 83092 +89026 17102 +43842 17620 +69091 92274 +45281 97447 +76721 57216 +85918 30383 +75795 30156 +25664 55704 +97570 15961 +52566 56257 +56772 46184 +66023 70725 +70877 60352 +58489 17620 +97243 16081 +90065 96590 +15509 87622 +16396 64392 +52851 96477 +27226 46960 +90734 16124 +69265 45713 +52153 56385 +62294 56305 +60456 47123 +22359 59516 +72820 22831 +16060 88509 +48347 11949 +93708 16109 +40506 97672 +34923 16152 +82726 16124 +75211 45090 +42580 26606 +55998 60454 +36766 57216 +49855 37173 +95715 64233 +88333 46280 +43573 94103 +58068 43319 +65789 67256 +26337 16081 +41559 39630 +94353 22943 +60210 48776 +31864 81825 +43486 89107 +89008 29137 +40463 22547 +69990 30050 +43940 56443 +77221 18768 +75112 98547 +10957 78948 +74710 12120 +59368 89107 +32133 33654 +75434 72998 +14918 89107 +78742 51635 +47615 59414 +92968 71551 +34542 22943 +38734 20291 +10118 56801 +43713 55518 +82778 90734 +90759 30050 +65951 35684 +60584 97672 +74575 65365 +79698 39683 +25005 97672 +87205 41199 +61821 69895 +91262 36850 +59774 16124 +25663 56501 +59643 18768 +91239 18768 +67918 27226 +90338 27226 +46014 25578 +83831 87690 +61964 47340 +93797 89252 +31368 90759 +25677 59638 +98724 62664 +45567 23553 +58366 44041 +97070 22943 +42402 45061 +30156 39747 +21792 97672 +88704 43711 +86958 65967 +87735 69189 +46436 97038 +67398 89243 +25402 95547 +75281 39683 +10908 56544 +13665 32898 +14289 22943 +78567 19318 +58378 27226 +70508 16670 +27417 79914 +39259 31265 +75173 18768 +67055 58536 +94446 58240 +13538 93924 +47472 98146 +73403 95703 +80112 90734 +53479 39683 +68774 79739 +15947 88002 +98908 95443 +34832 33654 +49962 97672 +37504 59516 +75818 52244 +61492 45090 +46636 36056 +60015 16109 +91286 46184 +37897 91119 +92495 32773 +86458 93797 +39276 61612 +22884 56365 +71464 45090 +32095 87760 +54595 27226 +24423 94229 +22187 91119 +82210 48731 +19488 88509 +65566 68008 +77921 62589 +17295 92247 +91582 45090 +24317 89107 +68159 94508 +81663 79967 +78357 23724 +36492 65832 +53202 85336 +64614 36692 +13683 30156 +46365 82672 +61031 18768 +52374 45090 +24823 97672 +90438 32489 +14871 87616 +65089 20993 +37779 16124 +39308 12698 +32476 80660 +61005 17620 +22943 46184 +87147 89107 +25126 13389 +16978 93342 +60815 72087 +84082 93797 +73857 67867 +18643 64984 +90549 61047 +30337 32773 +62788 84849 +36450 91530 +18667 27226 +31868 17135 +34793 50284 +87706 89107 +24983 76729 +49759 58359 +88262 76480 +75939 64392 +19997 88556 +62343 56462 +45616 97672 +45860 93888 +68344 11535 +55812 68813 +58211 30050 +57040 57926 +60518 32773 +71099 57155 +24428 57216 +54582 90308 +55276 55066 +58848 20728 +75393 97672 +11569 68342 +88739 60454 +92898 83347 +91074 19081 +68506 78420 +28953 64392 +40480 68489 +78476 33654 +52052 90759 +38383 69088 +94501 58424 +11804 92541 +88802 72137 +14159 20700 +31951 25669 +71802 90759 +51736 93797 +40245 33196 +76174 79841 +65410 39683 +77053 79537 +47630 62664 +22202 73334 +67248 27226 +18768 84849 +75554 41199 +91793 16109 +15692 97672 +78398 96505 +64570 60454 +85672 37902 +32952 93797 +72503 46027 +62594 47340 +14375 98105 +98715 68010 +68922 64392 +14526 19785 +47522 65951 +58875 93129 +90570 60939 +36853 47817 +72716 53863 +64202 27240 +18894 93797 +16184 62664 +18595 45090 +68531 45090 +29435 94452 +48615 33033 +90773 97672 +65539 16964 +37091 16124 +85835 90759 +93470 32585 +71460 16320 +67920 93186 +71775 80052 +31403 74944 +68444 89107 +57842 65832 +12734 35998 +14195 41229 +63687 73891 +19494 65967 +28761 70887 +64063 50742 +90511 17620 +47699 90759 +99339 74495 +64610 87080 +30124 39683 +44098 39683 +92946 60454 +63078 71049 +69198 19253 +81067 66283 +27276 62664 +60707 16124 +92750 10833 +15611 93797 +80632 22536 +81434 30050 +31643 89107 +12277 46282 +94027 98547 +65878 46619 +88364 49881 +66635 33033 +70736 46184 +94291 73977 +96756 21223 +74141 98354 +99623 64392 +47960 28999 +67373 91119 +44303 97672 +24370 41607 +41710 47340 +27632 22536 +14584 38508 +12530 20728 +99369 33033 +47344 18768 +69327 16541 +51570 11107 +29199 46184 +16964 61946 +95237 29761 +22379 90759 +85798 41199 +25053 27180 +61660 62664 +41800 95048 +16124 35616 +63219 28270 +81668 39683 +75520 79737 +99726 16081 +38012 93797 +38268 13109 +92610 26416 +27885 91119 +21596 24011 +67364 97672 +75268 98704 +91852 21659 +62389 84076 +10196 53612 +92074 47123 +29408 31697 +21662 32940 +13219 89107 +13114 21512 +48531 31805 +71249 20665 +67554 79621 +86260 59516 +87497 70849 +16230 46623 +38758 90759 +84298 30050 +84242 16124 +95389 86465 +77666 73820 +79652 44579 +83324 62664 +53778 57216 +43407 83484 +99150 59782 +16081 29507 +73980 17620 +63828 58641 +47913 59516 +67136 97390 +97672 90734 +98377 75087 +36910 16109 +61140 93797 +69501 96356 +91030 45251 +37044 16124 +71591 39683 +87886 64392 +51030 65967 +12076 32551 +82030 60454 +28642 95851 +45176 73711 +44774 92783 +35230 73053 +85460 78500 +95631 66420 +77427 84991 +26839 90759 +98740 64392 +55636 51814 +14543 16109 +71485 61007 +78254 68306 +28704 60454 diff --git a/2024/day02/default.nix b/2024/day02/default.nix new file mode 100644 index 0000000..438ef1f --- /dev/null +++ b/2024/day02/default.nix @@ -0,0 +1,40 @@ +{ pkgs, lib }: + +with lib; + +let + input = pipe (fileContents ./input.txt) [ + (splitString "\n") + (map (split "[[:space:]]+")) + (map (filter (x: x != []))) + (map (map toInt)) + ]; + + # - The levels are either all increasing or all decreasing. + # - Any two adjacent levels differ by at least one and at most three. + safeCondition = xs: let + zipped = zipLists xs (tail xs); + in (all ({ fst, snd }: let x = fst - snd; in 1 <= x && x <= 3) zipped) + || (all ({ fst, snd }: let x = fst - snd; in -1 >= x && x >= -3) zipped); + + answer1 = lib.pipe input [ + (filter safeCondition) + length + toString + ]; + + answer2 = lib.pipe input [ + (filter (xs: let + variants = genList (i: (take i xs) ++ (drop (i + 1) xs)) (length xs); + in any safeCondition variants)) + length + toString + ]; +in + pkgs.writeText "answers" '' + Task1: + ${answer1} + + Task2: + ${answer2} +'' diff --git a/2024/day02/input.txt b/2024/day02/input.txt new file mode 100644 index 0000000..1b7e435 --- /dev/null +++ b/2024/day02/input.txt @@ -0,0 +1,1000 @@ +55 56 59 62 61 +68 70 71 74 75 76 78 78 +52 55 56 58 62 +73 76 79 82 84 85 87 94 +1 4 5 6 3 4 +77 80 78 80 83 81 +69 72 73 71 71 +14 15 17 18 17 21 +39 42 43 45 47 46 53 +72 73 73 74 75 +48 49 51 51 53 54 51 +39 40 41 41 43 43 +14 16 19 20 23 23 25 29 +69 70 70 73 80 +79 80 81 84 88 89 92 93 +7 10 13 17 18 16 +67 70 73 75 79 81 84 84 +81 82 84 88 89 93 +76 79 81 83 84 88 94 +71 72 73 80 82 83 +24 26 29 36 33 +69 70 72 73 76 81 81 +6 9 12 17 21 +45 46 52 55 58 59 66 +24 23 24 25 26 29 32 +45 43 45 48 49 51 50 +3 2 5 6 7 9 11 11 +27 25 26 29 31 32 33 37 +17 15 18 19 22 24 30 +69 68 71 70 72 +38 36 38 41 44 41 38 +16 14 12 15 15 +37 34 36 33 36 39 40 44 +80 77 78 81 79 86 +57 55 57 57 60 +31 29 30 30 28 +77 76 79 79 79 +75 73 74 76 76 80 +14 11 11 12 15 22 +72 69 72 74 78 80 81 +80 77 79 83 85 87 86 +32 29 33 36 37 39 41 41 +7 5 9 10 14 +18 17 20 23 24 26 30 35 +86 84 87 89 94 95 98 +32 29 30 37 39 38 +27 26 28 30 31 38 41 41 +20 18 25 27 31 +84 81 83 88 89 94 +21 21 24 27 28 31 32 +15 15 18 21 24 22 +42 42 43 46 47 47 +35 35 38 39 43 +61 61 63 65 67 74 +23 23 21 24 27 29 +8 8 6 9 10 9 +84 84 83 86 86 +67 67 69 71 73 70 74 +85 85 84 87 93 +9 9 11 14 17 17 20 +33 33 34 34 31 +65 65 68 68 71 71 +60 60 62 62 63 67 +11 11 14 14 20 +18 18 21 24 26 28 32 34 +43 43 44 47 51 52 55 52 +58 58 61 65 67 68 68 +55 55 57 61 63 67 +72 72 76 78 79 80 85 +1 1 2 9 12 13 +80 80 83 89 90 93 92 +24 24 26 33 36 38 38 +17 17 18 19 26 30 +21 21 23 26 33 34 37 44 +30 34 37 39 41 44 +24 28 30 31 32 35 38 36 +84 88 90 91 92 95 95 +60 64 67 70 73 76 79 83 +9 13 15 16 19 21 22 27 +46 50 51 52 49 50 51 53 +68 72 71 73 74 72 +14 18 16 19 21 23 24 24 +50 54 55 58 55 58 62 +76 80 82 81 82 85 88 93 +66 70 73 73 76 78 81 83 +37 41 42 42 43 45 43 +7 11 14 14 14 +5 9 11 11 12 16 +10 14 17 17 18 21 22 28 +32 36 38 42 43 +51 55 59 62 63 64 65 63 +14 18 19 20 24 27 29 29 +33 37 38 39 41 45 46 50 +74 78 82 85 88 89 96 +56 60 65 67 69 +30 34 36 38 43 42 +74 78 79 80 85 85 +75 79 86 87 89 91 93 97 +78 82 84 90 92 93 99 +65 72 75 77 80 82 +82 89 91 93 94 95 93 +49 56 59 62 62 +18 25 27 28 30 34 +46 52 54 56 57 62 +13 19 21 22 23 21 23 +26 32 29 31 32 31 +91 96 98 95 95 +47 52 54 51 53 55 58 62 +79 84 81 82 83 90 +75 82 82 83 86 +76 83 83 84 86 84 +9 14 17 17 17 +26 32 35 37 39 39 40 44 +40 45 45 46 53 +58 65 69 71 72 74 +34 40 44 46 48 45 +46 53 55 56 60 63 63 +18 25 29 30 34 +4 9 10 11 15 22 +51 56 61 63 64 67 70 +13 18 23 25 28 31 32 29 +16 21 27 28 28 +25 32 34 41 43 47 +29 34 37 44 47 50 55 +36 34 33 31 28 25 22 23 +27 25 22 21 21 +15 12 9 7 6 5 1 +47 46 45 44 37 +80 78 79 77 74 73 70 +16 13 11 8 5 2 4 6 +51 50 48 49 47 46 43 43 +21 18 19 17 15 13 9 +41 40 38 40 39 33 +9 8 6 6 5 +44 41 41 40 38 41 +99 96 93 93 93 +40 38 36 36 33 30 27 23 +27 25 24 24 22 17 +93 92 88 86 85 83 81 +49 46 45 41 38 41 +71 69 65 63 61 59 58 58 +51 50 48 44 41 40 38 34 +44 41 37 34 32 31 30 25 +14 13 8 5 4 2 +32 31 28 21 20 19 16 18 +39 36 35 32 27 26 26 +49 48 46 39 35 +56 54 53 47 40 +54 55 54 52 49 48 47 +78 79 78 75 74 73 76 +95 96 94 91 89 86 85 85 +73 74 72 70 69 65 +91 93 92 90 88 83 +81 84 83 86 84 83 +48 50 49 47 49 48 45 46 +88 90 88 87 89 87 87 +47 49 48 46 43 46 42 +47 48 47 46 48 42 +23 24 21 18 18 17 +66 67 67 65 68 +50 53 52 51 51 48 48 +89 92 92 90 89 85 +92 93 91 88 87 85 85 80 +88 91 88 86 82 80 +74 77 73 72 73 +30 32 29 26 24 20 19 19 +88 89 88 84 80 +42 44 40 38 35 34 27 +94 95 94 88 86 +18 19 17 14 7 4 5 +70 72 69 63 62 62 +28 30 28 27 26 19 17 13 +57 60 58 56 55 50 44 +68 68 66 63 61 +45 45 42 41 42 +76 76 74 71 68 68 +81 81 79 78 77 73 +98 98 96 95 92 87 +58 58 57 60 57 54 53 +92 92 89 87 89 87 86 89 +83 83 80 79 82 80 80 +52 52 50 47 45 46 43 39 +41 41 43 40 38 33 +57 57 56 53 52 52 50 49 +88 88 85 84 83 83 84 +72 72 70 67 65 65 65 +61 61 61 60 56 +61 61 58 57 55 53 53 48 +59 59 58 54 53 52 51 50 +45 45 44 43 41 37 39 +78 78 76 74 73 69 69 +86 86 82 81 79 76 73 69 +36 36 32 30 23 +24 24 23 22 21 18 11 8 +15 15 13 6 4 5 +41 41 38 33 32 32 +13 13 7 5 1 +74 74 71 68 65 60 54 +88 84 82 79 78 75 72 70 +91 87 84 81 80 79 82 +74 70 68 67 67 +58 54 53 52 48 +95 91 89 86 79 +51 47 50 49 48 45 44 +36 32 31 29 31 29 26 29 +86 82 80 81 80 77 77 +43 39 36 39 36 32 +77 73 76 74 71 68 66 60 +95 91 91 88 85 +12 8 8 6 5 7 +53 49 48 48 47 46 46 +30 26 26 25 21 +68 64 62 60 58 58 57 51 +45 41 40 36 35 34 +23 19 15 12 15 +38 34 30 27 27 +54 50 46 45 43 40 36 +37 33 29 27 24 19 +56 52 51 49 43 42 +66 62 56 55 52 49 51 +65 61 58 56 54 51 44 44 +70 66 65 62 59 56 50 46 +98 94 92 85 83 82 81 75 +52 45 43 41 39 +43 38 37 34 37 +57 51 50 49 48 47 44 44 +38 31 29 27 26 23 19 +23 16 14 12 7 +36 30 31 29 28 +12 6 8 5 8 +20 13 12 11 12 9 9 +93 86 84 83 84 82 80 76 +55 48 49 47 42 +17 11 9 6 6 3 +32 26 26 23 20 23 +89 84 83 83 83 +79 72 70 70 66 +56 49 48 48 45 40 +61 54 50 48 45 44 +24 18 16 12 11 9 10 +69 62 61 57 57 +34 28 27 23 20 19 15 +85 78 74 72 70 69 66 61 +59 53 52 51 46 44 43 42 +65 58 51 48 49 +98 91 86 83 83 +48 42 41 35 33 29 +47 41 40 37 31 28 21 +52 53 56 59 60 58 +62 63 65 66 67 67 +62 65 66 68 71 75 +42 44 46 47 48 51 53 59 +89 91 94 93 96 99 +29 32 34 35 36 34 31 +28 29 26 28 31 31 +74 75 73 75 77 79 81 85 +46 47 44 47 48 54 +4 6 8 8 11 12 15 18 +80 81 81 82 79 +51 52 54 56 56 59 59 +49 51 51 53 56 60 +47 50 53 55 55 62 +6 8 12 15 17 19 21 +86 89 90 92 96 98 99 96 +77 78 80 83 87 87 +55 58 60 63 66 70 71 75 +55 57 61 64 69 +83 84 85 92 93 95 +77 78 83 84 83 +26 29 34 37 37 +20 21 23 26 27 33 35 39 +28 29 30 35 36 37 39 45 +62 61 64 67 68 70 +20 18 21 23 26 28 31 29 +72 70 73 76 79 80 80 +48 46 49 52 53 55 56 60 +9 6 7 8 9 10 13 19 +69 68 65 66 69 72 75 +40 38 39 40 39 40 38 +50 48 49 48 48 +81 79 80 79 83 +15 14 13 16 18 23 +10 9 12 14 14 16 18 20 +96 95 98 98 99 96 +79 77 79 79 79 +61 59 61 62 63 63 66 70 +17 16 17 18 19 19 21 28 +22 21 25 27 28 +35 33 34 38 41 39 +62 61 64 65 69 69 +46 44 47 51 53 55 59 +46 44 46 49 50 51 55 62 +41 39 46 48 50 +39 38 45 46 45 +78 75 82 85 85 +22 21 23 26 28 34 38 +6 5 12 13 15 18 24 +58 58 59 62 65 +21 21 23 24 26 29 32 31 +96 96 98 99 99 +84 84 85 87 91 +68 68 71 74 81 +6 6 7 10 11 10 11 14 +31 31 33 36 38 36 34 +54 54 55 57 59 61 60 60 +31 31 33 35 34 37 41 +25 25 27 24 25 30 +82 82 85 85 86 88 90 +39 39 41 43 43 46 45 +39 39 42 43 46 46 46 +88 88 91 91 95 +81 81 83 85 85 86 87 93 +36 36 40 41 43 44 46 +2 2 5 9 8 +8 8 11 12 16 18 18 +79 79 81 85 89 +47 47 50 54 61 +77 77 79 81 88 89 +60 60 63 66 68 74 75 74 +76 76 83 85 87 87 +34 34 41 43 47 +65 65 68 71 76 81 +3 7 8 11 12 14 17 +53 57 59 60 61 60 +28 32 33 34 36 37 37 +45 49 51 53 54 57 61 +55 59 61 63 68 +43 47 50 51 50 53 55 57 +1 5 7 10 13 12 11 +43 47 48 51 48 51 51 +80 84 82 83 85 89 +38 42 44 45 46 44 49 +41 45 47 48 50 53 53 56 +2 6 6 8 11 12 14 12 +10 14 17 20 20 21 24 24 +12 16 18 21 23 23 26 30 +30 34 37 39 42 44 44 49 +53 57 59 62 64 68 70 +68 72 76 77 75 +9 13 16 20 22 22 +78 82 83 87 89 91 92 96 +12 16 17 19 23 25 28 35 +76 80 86 89 90 93 +86 90 91 92 98 99 98 +61 65 68 71 76 76 +24 28 30 36 40 +31 35 37 40 41 46 49 56 +43 50 51 52 55 58 60 +43 48 51 54 56 59 58 +55 62 65 68 70 71 74 74 +10 16 19 20 21 23 25 29 +80 87 89 92 97 +91 96 94 97 99 +82 87 88 85 87 86 +16 23 20 21 24 24 +20 25 22 25 28 32 +27 34 37 36 37 38 45 +80 85 88 91 93 96 96 99 +47 52 54 54 57 60 58 +62 68 70 71 73 73 73 +21 28 29 29 31 34 35 39 +40 45 46 46 47 52 +61 68 70 74 77 79 80 81 +76 81 84 85 87 88 92 91 +79 85 86 90 90 +57 62 65 69 73 +11 18 21 25 28 29 31 37 +74 79 86 87 89 90 91 93 +5 12 14 19 21 23 24 22 +36 43 45 47 48 53 53 +27 34 39 40 44 +64 69 75 78 81 82 88 +55 54 52 51 52 +73 70 68 67 67 +83 82 81 80 79 76 73 69 +24 23 22 19 18 16 14 8 +99 97 95 96 95 92 +23 20 21 20 19 17 14 15 +25 23 24 23 21 18 18 +53 51 49 47 48 46 42 +87 84 82 85 80 +95 93 91 88 88 86 83 +90 87 85 84 83 83 85 +69 66 63 63 61 60 60 +13 11 11 10 6 +59 57 57 56 51 +43 40 37 35 33 29 26 25 +14 13 9 8 6 5 8 +77 74 72 70 66 64 64 +46 44 41 37 33 +59 58 54 51 46 +55 52 45 43 42 41 40 +39 36 35 34 33 28 29 +47 45 40 39 39 +47 45 43 37 35 33 32 28 +96 94 92 87 84 81 79 72 +43 46 45 44 42 40 37 +79 82 80 77 74 73 71 74 +42 44 43 41 40 37 37 +57 58 57 56 53 52 48 +78 79 78 75 74 71 66 +31 32 31 34 31 +25 28 27 29 30 +37 38 37 35 36 34 34 +68 71 70 73 71 67 +20 22 25 22 21 14 +98 99 98 95 95 94 +84 86 83 82 82 80 77 80 +57 59 57 57 56 55 55 +24 27 25 25 22 19 16 12 +53 54 51 48 48 45 38 +28 29 27 26 22 19 +42 44 43 39 36 38 +88 91 90 89 86 82 82 +91 94 92 88 86 82 +27 29 27 23 20 18 11 +16 17 16 10 9 +69 70 67 60 58 57 56 58 +28 31 30 27 26 19 18 18 +58 61 58 57 50 47 43 +69 72 71 66 64 63 61 55 +49 49 47 45 43 +38 38 35 32 29 32 +62 62 59 58 57 56 53 53 +79 79 78 77 73 +28 28 27 25 24 22 16 +49 49 51 50 47 46 +37 37 36 34 31 33 36 +36 36 37 35 35 +50 50 47 45 46 43 42 38 +39 39 38 36 39 34 +28 28 28 27 24 22 21 19 +21 21 19 17 15 15 13 14 +30 30 30 28 25 23 20 20 +79 79 79 78 75 73 70 66 +47 47 47 46 40 +72 72 70 66 64 62 +49 49 45 44 45 +82 82 80 76 74 72 72 +26 26 22 20 16 +71 71 67 64 63 60 54 +95 95 93 87 86 +15 15 14 13 12 6 8 +69 69 66 64 58 58 +36 36 34 33 26 23 22 18 +22 22 17 15 10 +33 29 27 26 25 22 +25 21 18 15 14 17 +71 67 64 61 61 +71 67 65 62 59 58 54 +89 85 82 79 77 74 72 67 +52 48 47 50 47 46 44 42 +55 51 49 46 49 46 48 +8 4 2 5 5 +86 82 84 83 79 +38 34 32 31 28 29 24 +49 45 42 40 40 38 35 32 +24 20 17 15 15 12 15 +72 68 65 65 65 +67 63 61 58 56 53 53 49 +45 41 40 38 36 36 29 +44 40 37 33 30 28 +24 20 17 13 11 8 10 +60 56 54 50 49 48 48 +30 26 25 21 17 +26 22 20 17 13 12 5 +32 28 26 20 17 +43 39 38 33 30 28 26 29 +94 90 85 82 82 +81 77 71 68 66 62 +99 95 94 89 88 81 +21 16 15 14 13 12 +83 76 75 74 73 70 69 71 +73 68 66 65 63 62 59 59 +44 37 35 32 28 +91 86 83 82 81 79 78 72 +96 90 92 89 86 +33 27 25 28 25 23 24 +32 27 24 22 20 23 20 20 +64 57 60 57 53 +43 36 33 30 28 31 26 +10 5 5 3 2 +65 60 58 58 55 58 +69 63 63 61 61 +70 65 62 61 61 57 +56 51 50 48 45 45 42 36 +75 70 66 65 62 +17 11 7 5 6 +36 29 25 22 20 19 18 18 +26 20 18 14 13 9 +43 38 35 34 32 30 26 19 +66 60 54 52 49 +54 47 41 38 37 35 36 +40 33 26 25 25 +31 26 24 22 19 13 12 8 +80 73 71 68 62 57 +11 8 9 16 17 19 22 22 +25 25 27 26 25 24 22 20 +71 75 78 82 85 88 91 +24 26 29 33 34 37 40 42 +39 45 45 46 47 49 51 +42 42 44 45 48 52 +92 95 92 92 92 +53 56 55 53 53 50 46 +79 75 72 71 70 67 67 +26 26 23 19 18 14 +86 85 88 91 92 95 96 98 +35 35 38 37 38 +12 12 13 11 6 +27 23 26 24 23 23 +35 39 42 43 46 49 52 54 +30 24 24 21 18 15 14 14 +61 55 52 50 48 46 43 46 +9 7 9 10 8 +67 68 66 59 55 +52 56 59 60 63 64 68 65 +11 14 16 19 22 29 30 35 +52 58 59 65 66 +40 45 48 53 55 59 +47 47 50 52 56 58 62 +37 41 41 44 47 50 +22 19 16 15 18 +21 21 23 27 30 +68 72 73 74 76 77 80 84 +61 66 67 71 72 75 73 +60 63 62 55 54 +46 50 53 55 55 59 +60 58 59 58 55 51 +72 68 61 58 56 55 58 +25 24 27 28 30 34 38 +14 17 18 20 22 25 23 23 +47 40 37 35 34 +57 58 59 65 67 66 +74 69 62 61 60 57 58 +4 10 14 16 17 20 +13 18 19 20 19 22 29 +54 54 51 50 45 +72 69 71 73 70 74 +84 79 77 80 79 74 +25 25 25 24 22 +86 86 85 85 82 80 77 79 +68 65 67 72 73 74 +29 29 27 27 24 21 21 +59 61 63 62 65 69 +45 42 41 38 36 32 31 +45 38 39 37 33 +79 76 76 73 72 +31 32 31 27 21 +9 9 8 9 10 12 14 17 +47 51 54 57 57 +26 25 26 29 30 37 +91 90 88 85 81 78 74 +53 56 52 50 50 +51 47 46 43 42 39 33 +84 77 76 72 69 63 +41 40 39 41 39 38 37 37 +74 78 76 79 79 +64 64 59 57 56 56 +69 72 69 70 72 75 82 +27 32 35 36 34 +31 26 25 21 20 19 15 +67 67 70 76 79 84 +33 35 36 37 39 41 42 39 +35 32 32 29 29 +57 54 52 49 47 46 46 47 +1 5 8 10 12 13 10 13 +37 38 42 45 46 49 55 +86 91 92 94 94 92 +88 86 83 80 78 77 73 +3 5 6 10 10 +24 24 27 30 30 34 +17 15 13 16 18 15 +57 54 52 52 51 50 46 +46 43 45 46 49 51 51 52 +70 68 65 63 58 +49 55 59 60 60 +53 46 45 45 42 41 40 35 +47 51 52 58 65 +27 29 26 23 25 +23 19 16 10 8 5 1 +98 91 91 89 92 +59 59 58 55 54 53 51 +56 63 60 62 64 67 69 +3 9 9 11 14 14 +86 83 84 82 80 74 +74 77 80 80 83 85 88 88 +24 20 20 17 10 +56 62 64 65 66 69 73 +1 5 7 9 15 12 +60 63 67 70 69 +63 66 69 70 76 79 82 +38 38 36 34 32 30 31 +44 47 46 45 44 44 41 40 +66 66 67 64 71 +1 7 8 9 11 14 +13 16 15 14 12 11 11 +75 72 66 65 64 64 +56 59 56 59 57 56 52 +27 20 17 16 10 6 +19 23 27 30 30 +95 98 97 93 90 +33 37 37 40 42 40 +36 42 44 42 43 46 50 +94 88 82 79 78 71 +17 13 11 9 5 4 4 +88 88 89 91 92 95 95 92 +97 93 90 88 85 88 86 83 +15 12 12 14 17 24 +7 10 9 8 11 8 2 +59 55 54 51 47 +60 57 59 57 58 +74 79 82 85 89 94 +24 19 15 12 10 7 +12 7 5 2 2 +38 36 33 34 37 38 38 +36 32 32 31 27 +15 20 21 28 31 37 +79 79 80 82 80 +95 91 90 89 86 83 80 81 +89 86 86 87 89 93 +3 6 4 6 3 4 +65 61 59 56 55 53 52 51 +27 26 28 31 38 39 45 +81 84 87 91 95 +71 71 68 66 65 62 59 59 +28 28 27 25 25 19 +90 94 96 97 94 +63 63 67 68 69 66 +68 68 66 65 60 59 58 51 +92 92 86 85 82 80 76 +26 27 24 25 26 25 +73 78 84 86 88 91 91 +42 44 43 40 42 40 40 +73 80 82 85 85 +44 44 46 53 56 +29 25 22 20 16 15 18 +33 30 35 38 39 42 44 48 +87 87 85 80 79 78 +37 44 45 43 42 +87 87 89 91 95 97 97 +82 82 83 83 84 86 88 88 +90 90 88 90 92 95 97 97 +82 85 88 87 84 83 82 81 +70 70 73 75 77 83 +57 55 54 56 57 59 +26 19 16 11 9 +64 65 63 61 57 54 57 +81 85 86 87 92 93 95 +10 14 18 21 22 25 32 +70 66 63 61 58 52 49 46 +35 30 27 25 22 25 23 +71 77 77 79 81 82 83 90 +17 16 17 18 17 19 21 28 +31 30 23 21 24 +47 47 50 51 54 56 59 59 +74 74 71 73 70 67 64 60 +6 11 15 17 18 22 +59 55 55 53 51 51 +51 45 42 39 42 41 41 +22 29 32 30 32 32 +58 56 57 61 62 63 66 68 +16 16 12 9 7 6 8 +61 57 53 52 50 44 +60 58 55 58 55 +45 45 50 52 54 57 60 64 +31 28 29 31 35 37 40 40 +86 86 89 91 94 +32 25 23 16 13 13 +83 82 81 78 75 72 69 69 +52 56 59 61 62 63 61 66 +56 50 49 46 40 +15 18 18 17 20 +18 15 11 8 6 8 +72 72 71 67 62 +85 87 85 79 81 +36 39 37 35 33 31 31 24 +41 40 37 33 30 29 22 +63 67 67 69 71 72 79 +41 39 41 45 44 +20 23 25 26 28 29 32 36 +45 49 52 49 51 52 54 58 +48 46 40 37 30 +52 54 54 57 63 +8 11 14 17 19 18 19 +99 99 92 90 93 +14 12 13 14 20 21 24 22 +56 60 61 62 63 65 70 +38 34 36 33 31 30 28 24 +35 33 32 30 28 26 19 15 +66 68 65 62 55 48 +15 9 11 10 7 5 7 +82 82 85 92 95 97 97 +80 80 81 80 82 83 84 88 +40 36 38 35 33 28 +97 95 92 90 87 85 84 +76 77 80 83 84 87 88 90 +81 80 78 77 75 74 +94 93 91 89 88 86 +85 82 79 76 74 73 72 71 +73 71 69 66 64 63 +17 18 21 24 26 29 30 +72 73 76 79 82 84 +16 14 11 10 9 8 6 +25 27 30 33 35 +30 31 34 37 39 +82 84 87 90 93 95 +21 19 16 14 13 11 9 +43 46 49 50 52 55 57 +70 69 67 66 65 63 61 60 +29 26 23 22 20 17 14 +74 73 71 68 66 65 64 +85 83 80 79 77 76 73 71 +10 11 14 16 17 18 20 +47 44 42 39 38 35 32 30 +67 68 70 71 74 76 77 79 +35 37 40 43 45 46 48 51 +66 64 61 58 55 53 52 49 +76 79 80 81 82 83 86 +56 54 51 49 47 +67 64 63 60 58 57 54 52 +10 12 14 16 18 21 24 +79 82 83 84 86 87 89 90 +79 76 75 74 73 70 67 +48 51 52 53 54 57 +42 41 38 35 34 32 29 28 +2 5 6 8 10 11 14 15 +77 75 73 72 69 67 +81 84 87 90 92 93 94 +29 32 35 36 39 42 43 44 +25 24 23 20 19 17 16 +64 67 69 70 73 74 +17 19 20 21 22 24 25 +42 43 44 45 48 50 52 54 +45 42 41 38 37 +80 78 75 72 69 66 63 62 +8 9 11 14 15 18 20 22 +52 51 50 47 44 +23 20 19 18 16 15 14 +18 21 24 25 26 +86 88 89 91 93 94 95 97 +5 6 9 11 14 17 18 +74 73 72 71 70 68 +70 73 75 77 80 +56 59 60 61 62 64 67 +21 24 26 29 32 34 35 37 +31 34 36 37 38 +18 15 13 10 8 7 4 +36 39 42 44 45 47 +71 74 76 77 78 79 82 +31 34 36 38 39 42 +20 22 23 24 26 28 29 +72 71 70 67 64 62 61 58 +71 74 75 76 77 78 80 82 +49 50 53 56 57 58 61 +15 14 13 10 7 6 3 +28 26 24 21 19 16 14 +50 47 46 45 43 +37 36 35 32 30 +71 69 66 63 62 61 60 +62 64 66 68 69 72 74 76 +40 41 42 45 48 50 +20 17 16 15 12 11 10 +9 10 13 15 17 20 23 24 +38 39 42 43 44 45 +18 19 20 23 24 27 28 29 +5 8 9 12 14 16 17 +58 55 54 53 51 49 +15 18 21 23 25 +20 19 18 16 15 13 +69 67 66 63 60 58 57 +64 61 60 57 54 52 50 49 +20 22 25 26 27 28 +42 45 48 50 52 55 57 +18 17 15 13 12 10 +22 19 16 15 14 11 9 +67 64 61 58 55 53 51 +50 52 53 56 59 62 65 68 +52 55 57 58 60 62 +40 38 37 35 32 31 30 +69 68 66 65 63 61 58 +49 48 45 42 40 37 34 +37 36 34 31 28 +52 53 56 59 60 +39 41 42 43 45 48 51 52 +15 16 19 22 23 +84 86 89 91 92 95 97 99 +83 86 88 90 92 95 +63 64 67 68 71 +90 87 85 83 82 79 +56 58 60 62 63 64 66 69 +14 12 10 9 6 +43 42 41 40 37 +18 16 15 14 11 +57 58 59 61 64 66 +60 59 56 55 52 49 48 +19 21 22 23 26 29 +49 47 46 43 40 +84 85 87 89 91 94 96 +61 60 58 56 53 50 47 44 +66 67 70 73 75 78 80 81 +27 25 22 19 18 15 13 10 +44 47 48 49 52 53 54 56 +17 14 11 9 6 4 +94 91 88 86 85 +58 57 55 52 51 +90 89 87 85 84 81 80 78 +35 37 38 41 44 45 +38 39 40 41 43 +89 90 92 93 94 97 98 +62 59 58 55 54 52 51 49 +9 12 14 16 17 19 22 24 +94 92 89 86 85 84 81 78 +28 30 31 34 35 36 38 41 +59 61 64 65 66 69 70 72 +77 76 75 72 71 70 68 65 +55 54 52 49 48 47 44 +96 94 93 92 89 +40 41 42 45 46 48 50 53 +52 53 54 56 58 60 62 +98 97 94 92 89 88 87 86 +68 69 72 75 77 80 +49 48 47 44 41 39 36 +57 56 53 51 50 48 47 +11 14 15 17 20 23 26 28 +21 19 18 16 14 +49 51 54 57 60 63 66 69 +50 47 46 44 42 41 39 +45 42 41 39 36 33 32 30 +47 48 49 52 53 55 56 +79 80 82 83 85 86 87 90 +31 28 27 26 23 +3 6 7 10 13 +84 85 88 91 94 95 96 +59 57 55 52 50 49 +55 52 49 48 45 44 +13 14 16 18 19 20 +70 71 74 77 78 80 83 +36 38 39 42 45 46 49 50 +95 93 90 87 86 85 83 +14 17 20 22 25 +20 18 16 15 14 13 12 9 +32 34 35 36 39 40 41 +31 34 36 37 39 40 43 +73 72 70 67 64 +47 48 50 53 54 +91 88 85 84 83 81 79 77 +49 46 44 41 39 37 36 +20 19 18 17 16 15 12 +86 88 89 92 93 96 +78 80 81 84 87 88 90 91 +22 20 19 18 16 13 +2 3 6 7 10 11 +41 38 37 34 33 30 28 +28 27 24 23 21 20 17 14 +74 77 80 81 82 84 +69 67 65 64 63 62 +81 79 78 76 73 72 +54 53 52 50 47 +17 16 15 13 11 +57 59 60 62 64 +23 25 27 30 32 34 +29 26 25 24 23 +30 28 26 25 22 19 18 +70 67 64 61 58 57 +62 64 65 68 71 +83 86 89 92 93 94 96 99 +47 45 44 43 40 37 35 34 +47 48 49 52 55 57 59 60 +3 4 7 10 13 15 18 +64 66 68 69 70 73 +18 21 24 25 27 29 +73 70 68 65 62 59 58 56 +68 65 62 60 59 57 54 52 +11 8 6 3 2 +28 29 31 32 34 35 36 +37 38 41 44 46 48 49 +60 61 64 67 70 73 75 76 +22 23 25 28 29 +84 87 90 92 95 96 99 +31 33 34 35 37 40 41 42 +70 68 67 65 63 +82 84 87 88 90 92 94 95 +86 88 89 92 94 +72 69 68 67 65 64 63 +79 82 85 86 87 90 +29 30 32 33 36 37 39 +36 38 39 42 43 45 47 50 +70 67 66 63 62 60 58 55 +25 26 27 28 31 34 +82 80 77 75 74 73 72 70 +3 6 8 11 12 15 +29 30 33 35 38 41 42 43 +44 45 48 49 52 55 57 +47 49 51 53 56 58 +60 59 57 55 52 +22 25 28 29 31 33 +22 21 19 16 14 13 +19 21 24 26 29 32 34 37 +49 46 43 42 40 37 34 +40 37 35 33 31 29 27 25 +84 82 80 77 74 71 70 +75 73 70 67 64 61 59 +55 52 51 49 48 +71 74 76 77 79 81 +57 59 61 63 64 67 70 +55 54 53 52 50 49 46 45 +44 47 49 51 52 53 55 57 +84 87 88 91 94 +79 77 76 73 70 67 65 64 +48 47 44 42 39 38 36 35 +38 36 35 34 32 29 27 26 +58 61 64 67 70 +83 85 87 89 90 91 93 +70 69 68 66 64 62 60 58 +25 22 20 17 16 +59 62 64 67 70 73 74 +56 55 54 51 50 +36 37 38 41 43 44 47 +48 46 45 42 41 40 37 +41 40 39 37 35 33 31 29 +52 49 46 44 43 42 +72 73 75 76 78 79 81 84 +75 77 80 81 84 87 88 90 +28 29 31 32 34 37 +20 22 24 27 28 31 33 34 +39 37 34 31 29 26 23 20 +15 16 18 19 21 24 +36 38 40 41 44 47 48 49 +10 12 14 17 18 19 22 +27 24 23 22 19 +90 87 86 85 82 79 76 +34 35 36 37 40 42 45 +66 64 62 59 56 55 54 +60 62 64 65 66 67 70 +37 38 40 41 42 43 +79 78 77 74 73 70 68 65 +22 21 19 18 15 +95 94 93 92 89 88 +75 72 69 66 65 +25 22 19 16 14 13 12 9 +30 31 32 33 35 +5 6 7 9 10 13 14 17 +82 83 85 87 89 92 93 94 +54 52 51 48 46 45 +35 32 29 28 27 25 23 20 +51 49 46 43 42 40 +39 38 35 32 30 27 +48 45 42 40 38 37 35 +59 58 56 53 51 48 45 +76 75 73 70 68 66 63 +68 71 74 77 80 81 82 +28 29 31 34 35 +88 90 91 92 94 95 98 99 +69 68 65 64 62 +88 86 83 81 80 +85 88 89 92 93 94 96 +38 36 34 33 30 27 26 25 +69 70 71 73 74 77 +22 24 27 29 32 33 35 +80 81 83 85 87 89 91 92 +47 49 51 53 54 56 58 +45 44 41 38 36 33 30 +16 18 19 21 24 25 26 29 +69 70 73 76 77 80 82 +86 85 83 82 80 77 +7 8 10 11 12 13 +68 65 62 60 57 +20 17 16 14 13 12 +90 87 86 85 83 82 80 79 +20 18 16 14 13 10 +36 38 41 44 47 48 +64 66 69 70 72 +94 91 88 85 83 80 +25 26 29 32 33 36 +26 24 21 18 17 +63 60 59 56 54 +40 39 38 35 32 30 +60 63 65 67 69 71 72 +16 15 12 10 9 +49 51 54 57 58 59 62 +48 49 52 54 55 58 61 +36 35 32 31 29 +73 70 69 66 63 61 59 +16 18 19 22 25 +32 30 28 26 25 22 20 +39 42 45 48 51 54 +70 72 73 74 76 79 80 81 +37 34 31 30 29 +15 16 17 19 21 24 +31 30 28 25 23 20 18 17 +81 82 83 86 89 91 92 94 +78 76 74 72 71 +24 25 28 30 31 32 +80 79 76 75 73 72 71 +71 72 74 76 78 81 84 86 +8 11 14 15 18 +46 43 42 41 38 35 34 +20 18 17 15 14 +84 82 80 79 77 76 +43 44 47 48 50 diff --git a/2024/flake.lock b/2024/flake.lock new file mode 100644 index 0000000..d0b67c2 --- /dev/null +++ b/2024/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1733015953, + "narHash": "sha256-t4BBVpwG9B4hLgc6GUBuj3cjU7lP/PJfpTHuSqE+crk=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "ac35b104800bff9028425fec3b6e8a41de2bbfff", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/2024/flake.nix b/2024/flake.nix new file mode 100644 index 0000000..7eebd92 --- /dev/null +++ b/2024/flake.nix @@ -0,0 +1,15 @@ +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + }; + + outputs = { self, nixpkgs }: let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in { + packages.${system} = { + day01 = pkgs.callPackage ./day01 { }; + day02 = pkgs.callPackage ./day02 { }; + }; + }; +} diff --git a/2024/template/default.nix b/2024/template/default.nix new file mode 100644 index 0000000..7ab9076 --- /dev/null +++ b/2024/template/default.nix @@ -0,0 +1,24 @@ +{ pkgs, lib }: + +with lib; + +let + input = pipe (fileContents ./input.txt) [ + (splitString "\n") + ]; + + answer1 = lib.pipe input [ + (_: "TODO") + ]; + + answer2 = lib.pipe input [ + (_: "TODO") + ]; +in + pkgs.writeText "answers" '' + Task1: + ${answer1} + + Task2: + ${answer2} +'' diff --git a/2024/template/input.nix b/2024/template/input.nix new file mode 100644 index 0000000..e69de29