From f2ea7c157e00115882c63cd05e2564a1e6a4a6c4 Mon Sep 17 00:00:00 2001 From: shockrah Date: Tue, 3 Dec 2024 00:39:30 -0800 Subject: [PATCH] first 3 days --- 1/1.input | 1000 +++++++++++++++++++++++++++++++++++++++++++++++ 1/1.py | 13 + 1/2.py | 28 ++ 1/sample.input | 6 + 2/1.py | 24 ++ 2/2.py | 30 ++ 2/data.input | 1000 +++++++++++++++++++++++++++++++++++++++++++++++ 2/new.input | 1000 +++++++++++++++++++++++++++++++++++++++++++++++ 2/sample.input | 6 + 3/1.py | 14 + 3/2.py | 21 + 3/data.input | 6 + 3/sample.input | 1 + 3/sample2.input | 1 + 14 files changed, 3150 insertions(+) create mode 100644 1/1.input create mode 100644 1/1.py create mode 100644 1/2.py create mode 100644 1/sample.input create mode 100644 2/1.py create mode 100644 2/2.py create mode 100644 2/data.input create mode 100644 2/new.input create mode 100644 2/sample.input create mode 100644 3/1.py create mode 100644 3/2.py create mode 100644 3/data.input create mode 100644 3/sample.input create mode 100644 3/sample2.input diff --git a/1/1.input b/1/1.input new file mode 100644 index 0000000..6f7f9fe --- /dev/null +++ b/1/1.input @@ -0,0 +1,1000 @@ +37033 48086 +80098 34930 +88073 69183 +54342 63061 +98409 87908 +81400 96222 +42062 53621 +55208 48086 +10847 20622 +53237 11766 +12609 19507 +31524 33054 +83455 96879 +53344 76641 +94982 66380 +69183 70224 +35580 12846 +87598 24335 +82193 11774 +69512 57198 +59322 57031 +68842 58244 +44042 39233 +16249 57139 +85264 31175 +10891 68793 +40085 98617 +91566 98409 +87478 49199 +39821 33343 +74610 62695 +68536 31524 +68470 52968 +49918 78866 +22935 44471 +76024 92757 +65243 98409 +93508 26529 +89938 19767 +74104 28327 +95395 51124 +57361 30769 +17053 38420 +89386 27077 +66052 49634 +31107 86173 +20356 70681 +32859 77448 +61081 68078 +66997 11420 +47491 52799 +52909 18865 +98231 14451 +78232 81629 +13844 65959 +42821 44935 +42441 17048 +43148 63037 +64953 17930 +94799 43046 +36346 50323 +62122 36926 +12807 35501 +62695 49155 +70681 87913 +44566 67881 +84508 75693 +53457 53621 +81188 75898 +18550 78193 +78314 72664 +28118 75012 +55363 82133 +55936 96958 +71769 62301 +64882 55809 +22070 52069 +80402 18865 +87887 59381 +19262 90572 +85007 46788 +36926 95926 +19398 39233 +38479 40232 +32794 85776 +82010 48505 +44551 59594 +52215 96042 +47295 62695 +23560 64868 +41516 29134 +78567 96879 +56100 44280 +37923 53621 +23366 20622 +88384 38143 +32427 93236 +28815 77641 +64098 70832 +63820 52069 +65685 41926 +77989 34282 +19213 73228 +90916 59042 +34392 59594 +53405 20622 +61530 85362 +67067 58244 +15915 52074 +84869 45493 +16808 52099 +83066 30481 +60279 34507 +18216 69308 +43386 89121 +48876 20622 +81226 81863 +13439 96879 +33538 20803 +57046 57031 +97890 31524 +49650 81758 +83353 53621 +97124 11654 +42320 55708 +15216 67981 +41159 54382 +23511 59594 +69428 62695 +75545 54382 +40455 50323 +14796 17517 +64841 54382 +45297 98409 +85055 15951 +54382 89121 +75123 48014 +77380 73118 +89593 29398 +65102 84571 +29684 50323 +78501 98409 +22658 48086 +69048 37242 +78675 43046 +42018 64394 +20090 98409 +73590 59594 +77407 70588 +54617 60692 +31801 30470 +94282 59594 +23846 84393 +80158 75833 +41973 18865 +10733 72754 +21476 89327 +53199 42757 +57875 22438 +80198 27009 +78998 36146 +46245 29134 +50181 37209 +65481 89603 +11531 16038 +33594 38324 +57846 75210 +92753 46215 +16725 78130 +67071 32249 +58481 81278 +79423 50340 +97039 64868 +87562 54382 +43046 90102 +39144 51352 +59594 15951 +84863 15951 +17517 18865 +49574 65630 +32557 63961 +46236 13439 +97729 58376 +71110 50323 +96590 53621 +94510 30481 +71029 34573 +86457 21887 +28954 17350 +35852 31524 +93863 39233 +47572 73683 +97380 18865 +30754 30481 +60704 89447 +92001 69183 +32801 66142 +81487 31524 +18073 52639 +35906 59208 +43812 17762 +98364 54382 +63099 93285 +23874 11420 +23929 15951 +63965 58244 +13509 50297 +67586 72452 +38100 76429 +57896 36516 +31621 59594 +68378 13399 +98229 89945 +37332 42762 +39317 13399 +29751 70681 +23350 49329 +94426 54530 +51125 98409 +13568 25793 +40634 93771 +76318 20622 +56797 62352 +77125 92452 +92723 78193 +52702 97941 +71042 48086 +75241 48086 +82106 86471 +43549 51785 +57031 93563 +45097 85133 +39233 38284 +44072 23577 +78219 48086 +10218 75355 +34441 52069 +27486 64929 +94555 15951 +36126 33020 +50417 20622 +97392 18353 +59162 90002 +43315 19287 +28705 67881 +29116 18865 +54164 39121 +41481 91282 +81138 85776 +85885 67495 +96203 95531 +11050 37542 +12902 95734 +23499 10033 +86109 18865 +13588 75493 +11234 42933 +58393 31524 +74806 69463 +81423 40663 +56077 58244 +55377 18865 +19426 52069 +46626 54382 +37701 33145 +57512 74160 +27195 70681 +14778 22306 +24054 25503 +23289 29807 +37933 36926 +61780 11400 +50323 83188 +33579 91321 +63956 13439 +99407 96879 +91416 76077 +88001 95578 +62066 33499 +24116 98790 +47745 19497 +64915 31524 +15961 93427 +68594 81210 +34351 59202 +40327 98303 +72705 67448 +12525 23334 +43151 82488 +35068 49777 +68599 69183 +94043 78193 +13678 98199 +81582 69183 +73934 36346 +55739 43046 +85642 75087 +91889 62893 +67778 92891 +35695 73450 +55718 78193 +63959 34907 +38017 98409 +66723 17517 +74248 43974 +88967 64011 +83130 20258 +99204 59594 +70476 66058 +61286 50220 +48510 31524 +79991 38603 +19872 59594 +87662 98303 +19340 52069 +43964 15951 +90112 80030 +43191 15951 +98554 72878 +21344 54382 +19604 98409 +33237 10812 +51468 40519 +38791 85794 +74239 29333 +66680 95424 +24080 97635 +90972 18626 +87429 97643 +91221 28641 +72127 62326 +24113 72380 +81008 23132 +99596 15951 +33037 17517 +90429 94990 +95722 78709 +44529 11954 +40869 74940 +85270 98409 +61916 88339 +94503 31524 +57636 10919 +34500 53621 +67881 27216 +93866 48086 +95505 41472 +60258 13439 +73971 96879 +78155 84381 +52246 30293 +42752 11420 +91033 69183 +91316 64187 +99667 30481 +26343 66657 +47584 85776 +88747 93445 +48170 29134 +82355 98303 +72601 67372 +59362 16525 +23719 70681 +73439 89676 +41361 45165 +91378 13419 +23936 33954 +98014 13399 +15650 65042 +64527 77524 +57963 13032 +24657 39982 +71342 37777 +48315 75222 +54519 66142 +76974 53621 +85608 27055 +20837 93663 +54927 24425 +13139 20622 +15005 11420 +84490 76060 +89171 70473 +17832 96879 +18470 54382 +45260 83667 +17276 27108 +52681 32349 +61355 13439 +47525 11420 +36905 70681 +59209 75250 +95591 47770 +14642 68650 +40203 73611 +52858 61463 +48675 42759 +98405 64868 +80951 82870 +53621 79358 +25327 78193 +87475 48086 +51819 24117 +27015 17111 +98465 66142 +72427 73936 +71733 96879 +89121 60064 +22901 30122 +10856 48527 +36754 64868 +50122 50538 +52355 73026 +40825 40951 +80386 16069 +83603 36182 +58594 13717 +31497 71550 +40053 48086 +38188 39233 +18994 96329 +79861 50323 +23321 85776 +61404 10062 +95531 53621 +34909 98952 +23995 93754 +13871 98442 +54796 30148 +35319 93955 +64282 26287 +83133 82959 +56071 47244 +67009 47394 +92507 47341 +85776 46164 +30709 57965 +59236 35175 +20724 66427 +33428 94891 +11751 44280 +36923 59594 +76810 42646 +35667 96679 +42268 98409 +57684 38466 +40804 66142 +76968 66990 +99714 52069 +57148 28084 +16707 54930 +16915 32950 +18508 45796 +84647 62099 +24717 15951 +97165 52069 +88312 54080 +44527 62695 +13285 75521 +15532 45721 +83771 98303 +69300 69450 +33929 98294 +63656 85776 +58244 89121 +98243 65914 +79896 43809 +61035 98303 +66387 66433 +35297 91503 +60092 18889 +93026 91504 +73054 33258 +64475 70681 +54041 12197 +23521 20243 +91854 58244 +95611 62695 +70144 14591 +46105 93466 +13551 22559 +98318 32023 +72900 96879 +17675 99283 +21850 56050 +50581 44825 +49017 89297 +26268 73032 +76642 24749 +57925 72795 +63723 27403 +32025 20622 +15951 48086 +85672 58244 +24553 57031 +49464 62695 +67767 85776 +58337 85776 +74953 59594 +69307 20622 +54291 39233 +52996 15951 +65777 98303 +66534 75432 +23911 73020 +35599 53621 +80629 79286 +59328 98303 +88093 18865 +25517 18865 +19457 58244 +12955 55118 +90990 19917 +45463 45747 +77714 64511 +56882 42004 +25038 31524 +85217 20622 +99959 36346 +79460 26413 +86151 41237 +48086 30398 +31177 36926 +15315 83228 +73930 58503 +31633 37808 +25732 52462 +72722 22108 +21950 54382 +32065 92741 +45641 26363 +97024 96879 +44240 57089 +59276 20622 +42165 57163 +72746 70681 +70771 36926 +38232 78721 +71104 91763 +93422 84268 +82725 93116 +38739 25006 +93983 67881 +66261 37918 +45318 60554 +29927 61543 +75323 14960 +76535 13439 +95437 57747 +70363 58272 +79957 15661 +67064 32990 +20092 96879 +12567 69183 +52045 86433 +56000 76650 +72348 62567 +68077 58244 +51346 64868 +90427 68815 +55238 84016 +63141 23115 +44187 48086 +73242 46883 +37067 74850 +22831 78193 +33348 54605 +36004 75163 +69742 62695 +97982 85776 +81147 69183 +30121 44534 +89460 70312 +65414 48502 +41797 70681 +97715 59594 +11895 62739 +53566 36346 +88592 13685 +44867 18865 +38494 93238 +90302 57031 +29959 77575 +14477 64868 +95081 94031 +80618 98409 +31630 59639 +11480 15771 +57197 12243 +69484 97473 +15324 54382 +85375 28233 +70310 39233 +29134 66142 +17677 70681 +10533 50323 +32670 13399 +65046 89121 +27250 57826 +50565 18865 +10750 15951 +86359 36926 +17412 20622 +56284 58734 +24630 32786 +51890 31524 +62891 15178 +90991 54171 +18599 35575 +18865 35025 +26344 13399 +18002 85776 +61277 96879 +37141 57031 +86471 75319 +55111 37439 +41036 72230 +57319 96257 +44621 10761 +63452 89121 +64428 44023 +94409 64868 +97533 68365 +44422 53621 +82027 13439 +12954 54919 +47142 25744 +85528 66521 +81778 62695 +67727 32777 +66391 39630 +24686 62695 +81899 59594 +23924 99354 +28401 50030 +25839 98409 +80138 30520 +54999 14824 +93520 54172 +75113 64190 +60779 18923 +10355 41820 +32709 20332 +54938 70681 +49081 57031 +59825 82761 +38481 66142 +17642 85776 +93320 64868 +86185 89121 +90785 20622 +78441 70270 +15058 58554 +13159 99885 +71048 82807 +18657 62823 +25375 54382 +86493 57461 +68185 49281 +36666 48086 +57255 76149 +69221 70681 +13455 45466 +44124 44225 +12571 79912 +22123 18865 +41374 19055 +14066 88458 +42576 53164 +54786 71358 +48734 32761 +72366 76013 +38118 52069 +28516 98303 +84839 92356 +33967 51873 +39686 42909 +97775 58244 +97891 20622 +95436 31524 +40160 26365 +45663 83105 +73959 62695 +83007 21673 +34716 18865 +42940 60190 +30448 98303 +54016 56062 +98158 11420 +76233 67511 +71248 14271 +33181 52757 +73295 59594 +42588 69183 +28020 18683 +65760 13399 +51626 35859 +23978 66142 +26564 53338 +34634 15951 +47149 30575 +28625 20989 +78780 85370 +98473 26689 +66142 58244 +37914 48086 +91597 96879 +42550 89165 +79970 74953 +73019 69183 +21908 27351 +96153 79995 +58843 53621 +91807 12526 +92395 71081 +21579 48086 +79524 98282 +34060 85776 +27571 41575 +62300 37578 +88423 72261 +66840 95531 +39956 44045 +77892 67881 +10204 80385 +55417 42304 +34672 18865 +40908 48086 +97799 20148 +25065 53621 +62503 98409 +96437 67881 +74378 31222 +61972 70681 +89255 70681 +80855 18865 +54885 38371 +64050 15556 +21358 10464 +25723 92679 +95201 53621 +61421 49146 +86050 89893 +93226 78113 +42266 75153 +11881 17646 +69987 30481 +71028 85327 +24743 32122 +48190 85312 +45256 64868 +19567 11420 +89596 50323 +49101 86202 +68965 39233 +50874 13439 +17159 24728 +50369 35203 +78343 56136 +55351 73651 +48074 59594 +11532 42633 +82644 92794 +95771 34677 +59150 28294 +38484 64868 +48890 64382 +68966 28298 +51394 66142 +69899 91877 +20622 27299 +47091 19931 +81236 72834 +78009 41686 +48131 52069 +34760 83087 +54872 88748 +99903 44280 +75164 77528 +98303 81353 +89179 47262 +93330 85776 +64653 62695 +75680 59594 +28615 46658 +24345 58244 +79606 36346 +48948 97944 +98505 89997 +56392 90073 +76055 90144 +82417 29331 +62098 20173 +17254 59594 +48731 89213 +91622 10612 +96177 62695 +52069 59594 +13399 98409 +32967 62695 +80796 97619 +77193 28072 +55904 13399 +84250 81410 +53217 64868 +10500 80320 +67277 53621 +72249 93147 +65047 54902 +17107 63592 +76194 12779 +27559 83996 +79679 50585 +61580 69975 +65266 31524 +88473 84465 +79876 62695 +65441 16454 +80352 69183 +82496 39233 +52114 67176 +51220 91015 +50000 53335 +42335 68722 +53404 43046 +99871 66142 +32080 89121 +31786 17440 +92788 21713 +56249 44735 +61367 48207 +62686 18865 +96072 82701 +20243 17083 +12117 35213 +19815 26817 +79102 94396 +44142 48396 +69916 20622 +55931 67881 +31342 63716 +39653 62400 +77941 81859 +11114 80231 +52176 70681 +57866 95927 +16866 98409 +58810 52495 +30481 13399 +47222 62695 +44280 37037 +14384 62695 +87330 99383 +36889 98303 +87970 58244 +53739 41685 +40509 84262 +87526 11810 +34019 89121 +66761 29134 +82984 80221 +83300 43046 +31073 13399 +38528 10345 +42647 69040 +78499 66142 +65835 13399 +11888 52069 +16021 52069 +77506 18865 +37718 48194 +30087 28445 +11104 52070 +16603 52069 +32201 52069 +80129 87617 +30931 20174 +55331 36346 +88876 58551 +78652 57031 +81997 26780 +44346 20622 +31652 15430 +97390 65924 +84105 42911 +51646 52069 +73632 39233 +22774 58432 +67720 10485 +94677 22142 +15291 23118 +97553 91441 +13036 16132 +66370 89121 +47010 64499 +14579 36926 +71383 38714 +36373 44545 +80180 48086 +30591 52069 +90029 94693 +99057 45433 +96879 59594 +30934 96879 +40909 64001 +83174 44065 +99020 88105 +11420 41090 +52834 64349 +29417 40615 +23216 84918 +61489 62695 +69615 63436 +64767 37178 +28368 31524 +29166 83509 +88181 26952 +92376 46034 +56924 13399 +16465 18865 +29356 68035 +54993 36926 +18295 67097 +82237 43901 +78347 15951 +31212 15951 +36998 54208 +72196 14327 +10596 59594 +40421 66142 +10375 71778 +53059 29196 +33476 68714 +88721 27093 +82358 83161 +45486 51031 +61135 70681 +25501 16321 +12221 62619 +98976 89121 +83483 36480 +24673 41710 +36211 39233 +65135 61232 +64780 43227 +80301 70681 +45462 68721 +67491 81035 +79555 81549 +58586 95531 +52960 12428 +49575 44280 +65496 13439 +66682 98303 +93266 13399 +30310 69183 +21871 50286 +53042 52803 +22862 21603 +78193 85776 +87258 87131 +76615 84237 +88433 86471 +11880 74358 +27516 54382 +90874 52601 +95239 98303 +35641 18223 +93150 13439 +23926 14395 +68954 80564 +67708 28415 +54348 11420 +32006 70313 +89793 59594 +47625 20243 +42304 15951 +48069 91705 +44492 92921 +18981 42304 +13501 71398 +64868 18580 +38280 87499 +40480 96879 +76161 87470 +53440 26034 +99706 54382 +22102 95972 +23433 56267 +70986 83482 +49356 98303 +25792 48432 +87046 20622 +44220 54382 +19076 22755 +66811 96311 +90099 15951 +33595 70999 +19173 20622 +12964 56430 \ No newline at end of file diff --git a/1/1.py b/1/1.py new file mode 100644 index 0000000..2474bd1 --- /dev/null +++ b/1/1.py @@ -0,0 +1,13 @@ +def distances(left: list[int], right: list[int]) -> list[int]: + left, right = sorted(left), sorted(right) + return [abs(l-r) for l, r in zip(left, right)] + +if __name__ == '__main__': + with open('1.input') as file: + left, right = [], [] + for line in file: + l, r = line.split() + l, r = int(l), int(r) + left.append(l) + right.append(r) + print(sum(distances(left, right))) \ No newline at end of file diff --git a/1/2.py b/1/2.py new file mode 100644 index 0000000..9ff4ae9 --- /dev/null +++ b/1/2.py @@ -0,0 +1,28 @@ +def counts(nums: list[int]) -> dict[int, int]: + ret = {} + for n in nums: + if n in ret: + ret[n] += 1 + else: + ret[n] = 1 + return ret + + +if __name__ == '__main__': + with open('1.input') as file: + left, right = [], [] + for line in file: + l, r = line.split() + l, r = int(l), int(r) + left.append(l) + right.append(r) + # how many times does each number apear in each list + right = counts(right) + score = 0 + for n in left: + if n not in right: continue + score += n * right[n] + print(score) + + + \ No newline at end of file diff --git a/1/sample.input b/1/sample.input new file mode 100644 index 0000000..dfca0b1 --- /dev/null +++ b/1/sample.input @@ -0,0 +1,6 @@ +3 4 +4 3 +2 5 +1 3 +3 9 +3 3 \ No newline at end of file diff --git a/2/1.py b/2/1.py new file mode 100644 index 0000000..6aee529 --- /dev/null +++ b/2/1.py @@ -0,0 +1,24 @@ +def safe(levels: list[int]) -> bool: + i = 0 + # figure out the diffs + diffs = [] + while i < len(levels) - 1: + curr, nxt = levels[i], levels[i+1] + diffs.append(curr - nxt) + i += 1 + if 0 in diffs: + return False + neg = len(list(filter(lambda d: d < 0, diffs))) + pos = len(list(filter(lambda d: d > 0, diffs))) + big = len(list(filter(lambda d: abs(d) > 3, diffs))) + if big > 0: + return False + return (neg == 0 and pos == len(diffs)) or (neg == len(diffs) and pos == 0) + + + +with open('1.input') as file: + reports = [[int(i) for i in line.split()] for line in file] + + +print(sum([1 if r else 0 for r in [safe(report) for report in reports]])) \ No newline at end of file diff --git a/2/2.py b/2/2.py new file mode 100644 index 0000000..2a3087b --- /dev/null +++ b/2/2.py @@ -0,0 +1,30 @@ +def error_count(levels: list[int]) -> bool: + i = 0 + # figure out the diffs + diffs = [] + while i < len(levels) - 1: + curr, nxt = levels[i], levels[i+1] + diffs.append(curr - nxt) + i += 1 + neg = len(list(filter(lambda d: d < 0, diffs))) + pos = len(list(filter(lambda d: d > 0, diffs))) + big = len(list(filter(lambda d: abs(d) > 3, diffs))) + zer = len(list(filter(lambda d: d == 0, diffs))) + errors = big + zer + errors += int((neg == 0 and pos == len(diffs))) + int((neg == len(diffs) and pos == 0)) + return errors + + + +with open('data.input') as file: + reports = [[int(i) for i in line.split()] for line in file] + + + +# 0 or 1 is now tolerable +safe = 0 +for report in reports: + # print(error_count(report)) + safe += int(error_count(report) <= 1) +else: + print('safe', safe) diff --git a/2/data.input b/2/data.input new file mode 100644 index 0000000..f2cd7db --- /dev/null +++ b/2/data.input @@ -0,0 +1,1000 @@ +45 47 48 51 54 56 54 +76 79 81 84 84 +30 32 35 36 38 40 44 +72 74 77 78 85 +54 55 58 57 60 +61 64 67 66 68 67 +5 7 6 9 12 14 16 16 +82 83 84 82 85 88 91 95 +38 40 43 46 49 47 53 +23 26 28 31 34 35 35 36 +74 75 78 80 81 81 79 +11 13 16 17 18 18 20 20 +20 21 22 23 23 27 +63 64 64 65 68 71 73 79 +44 47 49 53 55 56 58 59 +81 82 84 87 88 92 89 +32 35 38 40 44 44 +53 55 59 60 62 64 65 69 +53 55 56 58 62 67 +57 59 62 68 71 73 74 75 +22 24 25 30 33 35 38 36 +15 17 20 25 28 30 32 32 +83 85 88 94 98 +74 77 78 80 87 92 +57 55 58 61 63 64 65 67 +74 71 73 74 75 73 +32 31 34 35 35 +35 32 34 36 38 40 42 46 +35 32 33 34 36 41 +69 67 66 67 70 71 74 75 +93 91 89 91 94 93 +95 93 92 94 96 96 +23 22 21 22 23 24 28 +27 24 25 26 28 26 29 36 +86 84 86 86 88 +2 1 2 3 3 6 9 7 +35 33 35 35 36 36 +15 13 14 14 16 18 19 23 +73 70 70 71 78 +21 20 23 25 28 32 33 35 +27 25 27 28 32 34 31 +40 39 40 44 44 +67 64 67 71 75 +31 28 29 32 33 37 44 +9 8 11 14 17 19 25 28 +42 41 46 49 51 50 +22 21 26 28 31 33 36 36 +20 19 26 28 32 +32 29 30 37 40 43 48 +20 20 23 25 28 31 32 35 +69 69 72 75 76 75 +51 51 53 54 54 +46 46 47 48 49 53 +72 72 75 76 77 78 80 85 +53 53 54 52 54 +79 79 78 79 78 +72 72 75 73 75 75 +47 47 49 52 54 51 55 +19 19 20 18 21 26 +84 84 85 85 88 91 93 94 +29 29 29 31 33 36 33 +15 15 17 18 21 21 21 +61 61 61 64 67 71 +62 62 63 64 64 70 +64 64 67 71 72 75 77 79 +60 60 63 67 70 68 +76 76 79 81 85 87 88 88 +20 20 23 26 28 31 35 39 +29 29 33 35 42 +25 25 30 32 35 +50 50 52 59 60 62 60 +60 60 61 63 68 69 69 +81 81 83 86 87 92 96 +68 68 73 76 81 +21 25 26 28 31 32 35 38 +38 42 43 44 45 43 +35 39 42 44 46 46 +19 23 24 26 28 29 33 +54 58 60 63 65 67 73 +33 37 38 40 42 39 42 44 +65 69 70 67 68 65 +9 13 10 13 13 +78 82 79 81 83 87 +34 38 40 38 40 41 48 +15 19 19 21 24 +36 40 42 42 39 +4 8 9 9 9 +52 56 57 60 61 61 65 +50 54 56 57 57 60 66 +26 30 32 36 37 +9 13 16 20 22 23 20 +55 59 61 65 65 +45 49 50 53 57 60 63 67 +74 78 82 84 90 +41 45 50 53 56 +72 76 82 83 85 82 +1 5 11 12 12 +72 76 79 81 82 89 93 +54 58 64 65 70 +66 72 74 77 79 81 84 87 +47 53 55 57 60 62 59 +71 78 79 81 82 84 84 +52 57 59 62 64 65 69 +59 64 67 69 71 74 76 83 +78 83 85 82 83 85 86 89 +27 32 34 37 40 37 35 +37 42 40 41 44 44 +44 51 54 51 53 57 +18 24 27 30 32 31 36 +57 63 66 68 68 69 71 72 +65 70 70 71 73 72 +32 37 37 39 42 42 +43 50 52 52 55 58 61 65 +20 26 28 28 29 30 33 38 +50 55 59 62 64 65 66 +44 51 52 56 57 58 61 59 +12 17 18 21 25 26 28 28 +2 9 11 15 19 +61 68 72 73 78 +17 22 28 30 33 +58 64 67 72 74 71 +72 78 79 85 88 90 90 +69 74 76 83 85 89 +24 31 34 35 36 42 49 +22 19 16 14 12 10 9 12 +74 72 70 67 66 66 +42 40 39 36 32 +95 93 92 91 85 +70 68 67 66 65 67 66 63 +82 79 77 74 77 74 77 +74 72 70 71 68 68 +97 95 94 96 93 91 87 +13 11 9 10 8 2 +13 10 8 8 6 4 +80 78 75 75 73 70 72 +64 63 63 60 60 +54 51 50 50 46 +35 32 29 28 28 27 21 +87 85 81 80 78 +27 25 22 18 17 14 17 +94 92 88 85 82 79 78 78 +19 16 15 11 10 7 3 +46 44 42 41 37 34 29 +54 52 49 44 43 41 40 +29 27 26 20 21 +97 95 92 85 85 +55 54 52 47 46 42 +32 31 28 26 23 21 16 9 +43 44 42 40 39 38 +14 15 14 12 11 10 13 +48 50 47 46 46 +90 93 90 87 85 82 78 +78 80 77 74 72 69 68 62 +32 35 37 35 32 29 28 26 +15 16 17 15 14 13 16 +62 65 63 65 65 +75 77 75 78 74 +4 7 5 7 6 1 +98 99 96 93 93 90 +52 55 55 54 57 +76 79 79 78 75 75 +75 77 74 74 73 70 66 +21 23 22 21 21 19 17 12 +79 81 80 76 75 +69 71 69 65 63 61 59 60 +71 73 71 70 69 65 64 64 +59 61 59 56 54 50 46 +86 89 85 84 83 77 +53 55 54 48 47 44 42 39 +13 16 15 14 12 5 6 +63 64 63 60 54 52 52 +55 56 54 47 43 +33 36 33 32 27 22 +30 30 28 27 25 24 21 19 +14 14 12 11 10 12 +34 34 32 31 30 27 24 24 +18 18 17 16 12 +21 21 19 16 10 +26 26 27 24 21 20 +68 68 67 66 64 66 63 64 +77 77 80 78 76 73 73 +71 71 73 71 69 66 65 61 +25 25 24 23 21 19 20 15 +46 46 46 45 44 41 38 37 +73 73 72 70 68 68 67 68 +54 54 54 53 51 49 49 +47 47 47 46 44 43 39 +72 72 70 69 67 67 62 +93 93 90 89 85 82 81 78 +54 54 53 49 47 48 +24 24 20 19 19 +93 93 89 87 83 +30 30 28 24 22 20 14 +97 97 90 88 87 +76 76 71 68 67 66 65 66 +81 81 75 72 72 +50 50 45 42 41 37 +75 75 69 67 61 +49 45 42 41 38 36 +56 52 50 49 46 45 47 +31 27 24 22 19 18 18 +42 38 37 34 33 30 26 +77 73 71 70 67 65 63 58 +36 32 29 26 24 23 25 22 +46 42 39 41 43 +85 81 82 80 78 78 +49 45 43 45 41 +63 59 62 59 54 +91 87 85 85 82 +68 64 62 59 59 61 +9 5 5 4 4 +74 70 68 68 67 63 +25 21 19 18 16 13 13 7 +69 65 64 60 57 54 +68 64 60 59 58 57 60 +94 90 89 87 85 84 80 80 +28 24 20 18 16 12 +26 22 20 16 11 +95 91 89 83 80 +36 32 29 28 23 24 +82 78 75 70 70 +58 54 49 47 44 40 +52 48 47 45 39 32 +98 93 92 90 89 86 84 +32 25 23 20 18 15 17 +26 19 18 15 14 13 10 10 +33 28 26 23 20 18 15 11 +84 78 75 74 73 70 69 64 +86 79 78 76 74 77 74 +73 67 65 62 63 64 +90 84 81 83 83 +94 87 86 84 87 83 +40 33 32 30 33 32 29 24 +25 19 18 18 15 14 +86 80 79 79 78 77 76 77 +10 4 3 3 3 +55 48 48 47 43 +98 92 91 90 87 87 81 +21 16 12 11 9 7 4 2 +27 22 19 15 14 11 12 +22 17 13 12 10 10 +97 90 89 86 82 81 77 +99 94 91 87 82 +72 67 64 63 62 55 53 +63 56 54 53 52 51 44 46 +46 39 36 33 31 26 26 +48 42 37 35 31 +27 20 14 13 11 8 1 +15 17 18 21 23 25 26 24 +65 68 71 74 77 80 81 81 +23 26 28 29 31 32 36 +84 86 87 90 92 93 98 +89 90 91 94 96 95 96 +24 25 26 28 25 26 25 +34 37 34 37 37 +24 26 29 28 32 +72 74 72 73 75 80 +91 93 93 94 97 +21 23 25 25 22 +29 32 35 37 37 37 +52 54 54 56 57 61 +21 23 23 24 30 +16 18 19 23 26 28 29 32 +81 84 88 89 91 94 95 92 +55 57 61 63 63 +77 79 80 82 84 87 91 95 +18 20 21 24 28 31 34 40 +22 23 26 32 35 +29 32 33 35 36 41 38 +25 28 29 31 33 34 39 39 +1 4 9 12 16 +31 33 34 41 44 51 +90 87 89 90 92 93 95 96 +32 30 31 33 31 +85 82 83 85 88 90 90 +76 73 76 78 80 81 82 86 +26 25 27 30 33 35 38 43 +66 64 67 69 71 70 73 +56 53 52 54 57 60 59 +78 75 73 74 74 +7 5 7 5 9 +57 55 53 55 58 61 64 71 +78 76 77 77 79 82 +54 52 52 54 51 +53 50 53 53 53 +88 86 89 91 92 94 94 98 +85 83 83 85 86 92 +6 3 7 9 12 14 +17 16 18 22 24 26 23 +20 17 20 23 24 28 30 30 +58 56 58 59 63 67 +8 5 9 10 17 +77 74 75 77 78 80 87 89 +82 81 82 84 85 87 94 92 +81 78 79 84 84 +60 58 60 61 64 71 75 +66 63 65 71 76 +62 62 65 68 70 72 +22 22 24 26 24 +16 16 18 21 21 +30 30 33 36 38 42 +46 46 47 50 51 52 59 +3 3 4 2 4 6 9 11 +15 15 12 14 16 17 19 17 +32 32 35 34 34 +92 92 95 92 93 94 98 +73 73 70 73 76 83 +18 18 18 21 22 +39 39 42 42 43 41 +88 88 89 92 92 94 96 96 +27 27 27 30 32 36 +63 63 65 66 66 72 +31 31 35 38 39 40 41 +10 10 12 16 17 19 17 +38 38 42 43 45 45 +57 57 61 62 63 65 68 72 +11 11 14 18 21 23 24 31 +63 63 69 71 74 75 +8 8 13 16 15 +22 22 23 26 33 35 35 +7 7 10 13 16 21 25 +20 20 23 24 29 34 +79 83 86 88 91 93 +38 42 44 45 48 51 53 51 +36 40 42 43 45 45 +23 27 29 31 35 +69 73 74 76 81 +14 18 21 22 25 24 27 30 +36 40 37 38 40 42 40 +9 13 11 14 16 16 +73 77 75 78 82 +29 33 31 33 39 +23 27 30 30 32 34 +57 61 64 65 68 68 69 67 +16 20 20 23 24 26 26 +23 27 30 30 31 32 36 +72 76 76 79 86 +53 57 59 60 64 65 67 68 +63 67 71 74 71 +86 90 91 95 96 99 99 +62 66 69 73 77 +61 65 69 70 75 +23 27 30 36 39 40 41 42 +30 34 37 38 39 42 47 46 +50 54 56 61 61 +21 25 27 32 36 +22 26 27 33 36 38 45 +29 34 37 39 40 42 +31 36 38 39 40 43 46 43 +34 39 42 43 46 48 51 51 +29 35 36 37 40 43 46 50 +23 30 33 34 37 40 43 50 +90 95 96 93 95 +58 64 66 69 67 66 +29 34 37 40 37 40 43 43 +24 29 32 35 38 39 37 41 +11 18 17 19 20 27 +49 56 59 59 62 +87 93 96 97 97 96 +5 11 11 12 15 16 16 +45 50 50 51 53 57 +65 71 74 74 81 +35 42 46 47 48 51 54 +76 81 82 83 87 89 87 +2 7 8 11 15 17 17 +30 36 39 43 46 50 +48 53 54 56 60 63 64 70 +75 81 87 88 90 91 +27 32 34 36 41 39 +81 88 95 98 98 +32 38 45 46 49 52 53 57 +45 50 52 58 59 66 +75 72 69 67 68 +16 13 10 9 8 6 6 +96 95 94 91 88 87 83 +44 41 39 37 35 32 27 +34 32 33 30 27 +64 61 60 58 56 54 55 58 +56 55 54 57 54 51 51 +41 39 42 41 39 38 34 +26 25 24 26 25 19 +21 19 17 17 16 +89 86 85 84 83 83 80 83 +15 12 12 9 9 +52 49 47 47 43 +50 49 49 46 43 41 38 31 +97 95 94 92 91 87 86 +39 37 36 33 32 29 25 26 +77 76 73 72 70 67 63 63 +22 20 16 14 11 7 +34 32 31 28 24 23 16 +31 29 26 24 17 15 13 11 +81 79 77 70 67 65 66 +67 64 58 55 55 +22 19 17 14 12 11 6 2 +36 35 34 33 31 30 23 17 +14 15 12 10 7 +15 17 14 11 13 +3 6 5 4 3 3 +68 71 69 67 64 62 58 +34 37 35 32 25 +29 32 29 28 25 27 24 +20 21 24 22 20 19 21 +86 87 84 81 83 82 82 +16 19 17 14 13 11 13 9 +27 28 31 29 28 23 +61 62 62 59 56 55 54 +28 31 29 29 26 28 +78 79 79 76 73 70 70 +18 20 19 17 17 13 +40 41 40 40 38 36 35 28 +87 88 87 83 81 78 +41 44 41 40 39 35 33 35 +88 90 89 85 85 +25 27 23 22 19 18 14 +97 98 95 94 90 87 82 +90 93 87 85 84 82 79 +87 90 89 86 84 78 81 +67 70 65 64 61 61 +94 97 94 92 89 83 79 +57 59 57 52 46 +66 66 63 62 59 +39 39 36 35 32 29 32 +64 64 62 59 57 54 54 +27 27 26 24 21 20 16 +41 41 40 38 36 35 28 +78 78 76 73 70 68 70 69 +54 54 52 51 54 53 50 52 +55 55 54 51 54 53 53 +30 30 29 32 31 27 +97 97 96 99 98 93 +86 86 86 83 80 78 75 72 +93 93 91 89 89 90 +97 97 97 95 95 +62 62 60 57 57 56 52 +75 75 73 73 71 69 62 +50 50 46 44 41 40 +80 80 79 75 73 71 68 69 +38 38 36 33 29 29 +98 98 95 91 87 +78 78 75 73 69 68 63 +84 84 82 79 76 74 67 66 +19 19 16 10 8 11 +32 32 25 22 20 19 16 16 +23 23 22 21 19 13 10 6 +80 80 73 72 71 68 62 +81 77 75 73 72 71 70 69 +65 61 60 58 61 +17 13 10 8 8 +90 86 83 81 77 +69 65 63 62 61 55 +46 42 39 36 38 35 34 +58 54 53 55 56 +80 76 73 76 74 74 +63 59 57 54 53 56 54 50 +45 41 43 42 35 +23 19 19 16 14 +55 51 50 49 49 48 47 48 +96 92 90 87 84 81 81 81 +86 82 80 77 77 74 70 +95 91 90 90 84 +44 40 38 37 36 32 29 +95 91 87 85 82 85 +96 92 91 87 85 85 +66 62 59 55 51 +40 36 32 31 29 27 22 +77 73 71 68 62 61 58 55 +87 83 81 79 73 72 71 74 +52 48 47 41 38 36 36 +88 84 81 76 74 71 67 +89 85 82 79 73 70 63 +87 80 77 75 72 71 +18 12 11 9 7 6 9 +98 92 89 88 88 +78 73 70 69 66 63 60 56 +41 35 32 30 29 23 +39 33 31 28 30 29 +69 64 65 62 64 +59 54 51 52 51 49 47 47 +69 62 64 61 57 +54 48 45 42 41 43 41 34 +60 53 50 48 45 44 44 41 +52 46 46 45 48 +37 30 27 27 24 24 +91 84 84 82 80 76 +94 87 86 83 83 76 +38 32 28 25 23 20 19 17 +17 11 7 6 4 5 +65 58 57 55 52 48 47 47 +60 55 51 48 44 +63 58 55 52 50 46 43 36 +37 30 28 22 19 +96 89 87 81 78 79 +24 18 17 16 14 9 6 6 +40 33 28 25 23 21 20 16 +67 60 57 55 53 47 45 38 +48 50 53 56 57 60 62 59 +47 48 50 52 55 57 57 +34 35 37 38 41 42 45 49 +59 60 61 63 64 66 73 +42 45 47 50 49 51 53 +18 21 23 25 23 24 23 +30 33 32 33 36 38 39 39 +48 49 52 55 58 56 57 61 +54 57 56 57 62 +16 18 19 22 22 24 +74 77 80 81 82 82 79 +17 19 19 22 22 +27 29 31 32 32 33 36 40 +30 31 31 33 34 37 38 45 +77 80 81 82 84 88 89 +56 58 60 61 65 63 +86 88 92 95 95 +58 59 60 61 65 67 71 +55 57 58 62 64 66 73 +39 41 42 49 50 52 55 +8 11 18 21 22 24 26 24 +32 34 40 41 42 42 +35 36 38 41 48 51 55 +63 65 71 73 76 82 +89 88 89 91 92 94 +34 33 36 37 35 +65 64 65 66 69 70 71 71 +24 23 24 26 27 31 +10 9 12 13 14 17 20 25 +47 44 45 46 47 46 49 +51 48 50 47 44 +40 38 39 36 38 38 +75 73 74 71 73 77 +47 46 49 50 47 48 50 56 +12 10 10 12 15 17 +28 26 27 27 30 27 +10 7 10 10 11 13 15 15 +85 84 84 85 89 +35 32 33 35 35 38 44 +70 68 71 73 74 76 80 81 +75 72 76 77 79 80 83 82 +86 84 85 89 92 95 95 +12 9 11 13 16 17 21 25 +6 4 6 10 16 +36 35 37 40 43 50 53 56 +68 65 66 68 71 77 74 +85 83 86 93 95 96 97 97 +25 23 25 27 34 35 38 42 +41 38 45 47 48 54 +46 46 47 49 51 52 53 54 +30 30 33 34 36 37 36 +43 43 45 48 50 51 51 +87 87 89 92 96 +1 1 4 7 8 11 18 +91 91 94 96 99 97 99 +48 48 51 54 53 52 +73 73 76 77 80 82 80 80 +66 66 67 68 70 67 71 +72 72 70 71 77 +7 7 10 13 13 14 +73 73 73 76 79 77 +51 51 52 55 57 57 59 59 +15 15 16 16 20 +70 70 73 76 79 82 82 87 +19 19 23 26 27 29 +40 40 44 46 43 +6 6 9 13 15 18 18 +16 16 20 23 25 27 30 34 +72 72 75 77 79 83 90 +43 43 46 53 54 57 58 +5 5 6 11 13 10 +10 10 13 15 21 21 +29 29 30 37 39 43 +71 71 78 81 87 +45 49 50 51 52 54 +21 25 28 29 32 29 +38 42 43 46 46 +10 14 15 18 19 20 21 25 +10 14 17 18 19 22 23 29 +8 12 11 14 17 19 21 +58 62 61 62 61 +32 36 33 35 35 +1 5 6 4 8 +69 73 74 75 72 75 81 +54 58 59 59 61 +54 58 58 59 60 62 59 +61 65 65 68 71 74 74 +84 88 89 89 93 +51 55 56 56 58 59 60 65 +10 14 17 21 22 +13 17 20 21 25 26 25 +45 49 53 54 54 +80 84 88 90 91 94 98 +19 23 24 26 27 28 32 37 +42 46 48 54 55 +49 53 58 59 62 65 62 +60 64 70 73 75 75 +53 57 60 67 68 72 +27 31 33 35 41 44 51 +20 25 27 28 29 30 33 34 +37 42 45 46 44 +42 49 51 54 55 58 59 59 +36 42 44 47 50 52 56 +11 18 21 22 29 +77 82 79 81 82 +9 14 15 12 9 +37 44 41 43 43 +30 35 33 35 38 39 43 +45 52 53 55 57 59 58 64 +26 31 31 34 36 39 41 +38 43 44 45 47 50 50 49 +10 16 18 18 20 20 +18 24 25 28 29 29 31 35 +52 59 61 64 67 67 68 75 +18 25 26 29 32 33 37 38 +21 28 32 35 33 +24 31 35 36 38 41 41 +47 54 55 59 63 +60 66 70 71 74 75 80 +65 71 72 79 82 85 87 +59 65 66 72 70 +33 38 39 42 47 50 50 +22 29 30 31 33 34 39 43 +5 10 11 18 20 21 26 +91 89 88 85 84 85 +75 73 71 69 69 +23 21 19 17 15 13 12 8 +52 50 48 45 43 38 +34 33 32 31 32 29 26 +41 38 40 38 39 +72 70 69 72 72 +18 15 17 16 13 10 6 +86 85 82 83 77 +28 25 22 19 18 17 17 14 +95 92 92 91 89 91 +80 77 76 76 73 73 +23 20 18 18 17 15 14 10 +60 58 56 56 49 +23 21 17 15 14 +33 30 26 25 23 20 23 +97 96 93 89 89 +51 50 48 45 44 40 36 +84 82 80 79 75 72 71 64 +76 75 68 67 64 62 +97 94 88 86 89 +89 87 81 78 77 77 +97 94 91 86 83 81 80 76 +17 15 13 12 7 2 +24 27 25 23 20 19 17 16 +28 30 27 24 23 21 18 21 +8 9 8 7 6 5 2 2 +51 54 51 49 46 42 +41 43 41 38 36 31 +54 56 55 54 53 56 53 +68 71 69 70 67 65 67 +6 9 8 9 8 6 4 4 +51 53 51 49 47 49 48 44 +40 43 45 43 42 36 +49 50 50 47 45 42 40 38 +4 7 6 4 4 2 3 +98 99 99 98 98 +53 56 54 54 50 +81 82 79 79 77 71 +88 89 86 82 80 +55 58 56 54 51 47 44 45 +58 61 58 57 55 52 48 48 +28 29 28 24 23 19 +56 59 58 54 47 +85 88 86 79 76 +95 98 97 90 88 86 88 +52 53 50 49 47 42 41 41 +60 63 60 54 52 50 46 +55 57 56 55 49 48 45 39 +54 54 51 48 45 43 41 40 +60 60 57 54 53 55 +60 60 59 58 55 53 51 51 +44 44 41 40 36 +81 81 78 77 74 71 70 65 +46 46 43 46 44 +67 67 66 64 65 63 66 +74 74 72 69 66 64 67 67 +61 61 60 61 59 58 54 +48 48 46 48 47 44 39 +25 25 25 24 23 +88 88 88 86 88 +19 19 19 17 14 11 9 9 +70 70 67 65 65 64 60 +17 17 14 12 12 11 8 2 +99 99 96 92 90 +56 56 54 52 48 47 50 +80 80 77 73 72 69 69 +28 28 26 22 20 17 13 +70 70 66 64 58 +93 93 88 86 83 81 79 77 +40 40 34 31 34 +47 47 45 42 39 34 34 +89 89 82 79 78 74 +98 98 97 96 90 87 84 79 +47 43 41 38 35 34 32 29 +63 59 58 55 53 50 51 +80 76 74 71 68 65 65 +47 43 42 41 39 38 37 33 +84 80 77 75 74 67 +87 83 80 78 81 79 +18 14 16 13 16 +31 27 30 28 27 27 +15 11 8 11 9 6 2 +22 18 17 20 17 11 +52 48 47 44 44 41 40 +39 35 35 32 29 27 26 29 +50 46 45 45 43 42 40 40 +91 87 85 85 81 +56 52 50 50 43 +25 21 19 18 14 13 +78 74 70 69 67 69 +21 17 16 15 13 9 9 +59 55 54 51 47 43 +96 92 90 88 84 83 82 77 +49 45 40 37 35 +53 49 43 42 41 44 +50 46 44 38 35 35 +56 52 46 45 43 41 37 +46 42 40 37 30 25 +63 58 56 54 51 48 47 45 +55 50 49 48 47 44 47 +26 21 18 15 15 +65 58 57 55 53 49 +94 89 87 85 84 81 75 +65 59 57 55 56 55 +12 5 4 5 6 +24 17 20 17 17 +17 12 9 7 6 8 7 3 +44 37 39 36 30 +19 12 12 9 7 4 3 +99 94 92 89 87 87 90 +18 13 12 12 12 +65 60 60 58 54 +27 20 17 16 14 12 12 5 +22 15 11 10 8 +67 61 57 55 57 +37 32 29 28 25 21 21 +94 87 83 82 79 78 75 71 +60 54 51 47 44 38 +57 52 49 46 40 38 +84 79 78 73 70 72 +46 39 36 31 30 30 +85 80 79 73 71 67 +52 46 45 39 38 37 32 +76 78 76 74 69 68 66 66 +93 93 92 91 88 86 83 84 +2 1 3 5 8 6 +77 71 69 67 63 61 58 59 +17 10 7 6 6 +93 94 95 96 98 99 98 +66 71 72 74 78 81 +10 13 17 18 21 23 23 +48 48 45 43 37 30 +26 28 28 29 27 +93 91 90 92 95 95 +75 72 71 68 66 65 62 56 +36 40 42 43 46 45 44 +29 33 34 35 35 37 38 39 +20 25 26 28 30 32 36 34 +2 2 4 5 9 12 12 +59 63 66 70 70 +95 95 98 96 94 92 87 +63 56 54 52 55 49 +4 8 11 18 20 17 +54 56 53 51 48 50 47 +99 96 93 91 90 90 88 88 +39 39 41 43 45 49 +23 23 29 31 34 35 +62 58 55 53 46 41 +56 59 57 55 55 54 52 48 +47 50 53 54 55 57 58 +18 16 14 13 10 9 +26 29 31 34 36 39 +61 59 57 55 54 52 49 +34 35 37 39 41 42 44 +54 57 58 59 61 64 66 67 +24 23 22 19 16 15 +63 65 66 67 70 71 72 73 +97 96 93 90 87 84 81 +84 82 80 79 76 74 72 71 +21 23 24 26 28 30 32 33 +77 75 74 72 69 67 66 64 +65 67 70 72 75 77 79 +21 22 24 25 27 28 30 +77 79 81 82 83 +52 51 48 45 42 +21 20 17 15 14 11 10 +50 47 46 43 40 37 34 +50 52 53 56 59 61 63 +74 75 76 77 80 83 +85 86 87 89 90 92 94 96 +16 14 13 12 9 7 5 4 +92 89 86 85 82 81 78 +37 36 33 31 30 27 26 25 +55 53 51 50 48 46 44 41 +4 6 8 11 14 16 17 +31 34 36 37 40 +21 22 25 28 29 +26 28 30 33 35 38 41 +49 46 44 41 40 39 38 36 +66 67 69 72 75 +72 69 66 65 64 61 59 56 +88 91 92 95 98 +11 14 16 19 20 23 +64 62 61 59 58 56 55 53 +82 83 85 86 87 89 92 94 +91 88 85 84 82 +94 93 90 87 84 82 79 +11 14 15 16 19 +39 36 35 32 30 27 24 21 +79 80 81 84 87 +49 50 53 56 59 62 +41 40 39 38 37 +15 14 12 9 6 5 4 1 +9 11 13 15 18 19 20 +67 68 71 74 77 +86 89 92 93 94 97 98 +9 11 13 15 17 19 +81 83 85 88 91 92 +54 52 50 48 47 45 43 +25 24 22 20 19 +91 89 86 83 80 79 77 75 +22 21 19 18 15 14 +64 63 61 60 58 55 +14 17 19 22 24 26 +52 54 57 59 62 65 +11 12 14 17 20 21 +90 89 88 86 85 84 81 +81 82 84 87 89 92 93 +55 53 52 49 47 44 43 +28 26 24 23 21 19 18 17 +83 80 79 78 76 74 71 +95 92 89 86 83 +69 72 74 76 77 +51 54 57 59 62 64 67 +13 14 15 16 19 21 24 +47 46 44 43 41 40 37 36 +75 74 71 68 67 66 64 +30 33 34 36 38 40 41 43 +21 22 23 26 29 +32 35 36 37 38 40 43 45 +11 12 13 16 18 19 20 21 +20 18 16 15 13 10 9 8 +36 39 42 44 46 47 +53 51 49 47 44 43 40 +82 80 78 75 74 71 70 67 +26 25 22 21 20 19 18 17 +62 65 67 68 69 70 71 72 +85 84 81 79 78 77 75 74 +36 38 41 42 45 48 +56 54 53 50 49 48 +80 79 76 73 72 70 68 67 +40 38 37 34 31 +97 96 94 92 89 86 83 80 +62 59 58 56 54 52 +23 26 28 29 30 33 +12 15 17 18 21 22 25 +73 70 69 66 64 61 +34 32 30 29 26 23 +99 98 96 94 92 +67 70 72 74 75 76 +57 60 62 63 66 69 70 +76 74 72 69 68 67 66 63 +5 7 10 11 13 15 +36 38 41 44 46 +94 91 88 85 84 83 82 80 +13 15 16 17 19 22 25 26 +85 87 88 89 90 93 +19 17 16 15 13 10 8 5 +15 17 20 23 24 26 29 32 +93 92 91 88 85 83 80 +27 29 30 31 32 33 +68 70 71 72 74 77 80 +22 20 17 15 13 12 9 +23 20 18 15 14 12 +56 53 52 49 47 +19 16 14 11 10 +32 29 28 27 25 24 +98 96 93 90 88 +86 88 89 91 92 +69 66 65 62 60 59 +19 20 23 25 28 +56 57 60 63 65 68 70 72 +50 47 46 44 42 40 39 38 +54 53 52 50 49 46 44 +5 6 8 9 12 13 16 19 +38 41 43 44 47 50 +37 36 35 33 31 30 27 26 +73 76 78 81 83 84 85 +32 29 28 25 24 21 18 16 +84 86 87 89 91 94 95 +37 40 43 45 48 50 51 54 +91 93 94 96 97 +20 22 24 27 30 +56 59 60 63 64 +58 61 62 65 68 69 +43 40 37 36 34 31 28 26 +33 36 37 38 39 42 +49 47 45 43 42 41 39 38 +82 84 87 89 90 93 +26 23 20 18 17 +71 70 69 67 64 63 +67 69 72 73 74 +99 97 96 93 92 +38 41 42 43 44 45 48 +12 15 16 19 22 24 +72 74 76 79 82 84 85 87 +97 96 93 91 90 +55 52 50 48 47 46 +16 14 12 11 9 7 6 5 +99 96 94 91 88 87 85 83 +87 86 84 82 81 +13 14 15 16 19 21 23 +38 41 42 44 47 48 +19 18 17 16 13 10 +29 30 32 33 35 38 39 +35 34 33 31 30 +86 87 88 90 93 95 +35 32 31 29 27 +68 67 64 61 59 +80 77 74 72 71 +71 70 69 66 65 +15 17 18 19 20 21 +42 45 47 50 51 +33 31 29 28 27 25 24 +73 72 71 69 68 67 65 64 +43 46 48 51 53 54 +39 42 45 48 51 53 +53 52 50 49 47 +47 50 51 54 56 +26 29 30 33 36 37 40 42 +39 36 34 33 30 27 24 +65 66 68 70 72 75 76 77 +51 53 56 57 59 60 62 63 +53 52 50 48 47 45 44 +21 20 18 16 13 12 10 8 +84 85 88 90 92 93 +62 64 67 70 71 73 +33 34 37 40 41 42 +35 32 31 29 26 25 +9 10 13 15 16 18 20 23 +94 93 90 87 86 85 83 +12 9 8 6 5 3 2 +15 18 19 20 22 23 25 28 +96 94 93 90 88 86 85 +89 90 91 93 94 96 +77 76 74 73 70 +48 51 52 53 54 +32 29 27 26 25 +36 39 41 42 45 48 51 +48 50 52 53 54 56 59 +78 77 75 73 72 71 +82 81 78 77 74 73 72 71 +14 13 11 9 6 5 3 2 +69 72 75 77 80 82 83 +75 73 70 68 65 63 +91 89 87 85 82 81 78 76 +98 95 93 92 89 +74 72 69 67 64 62 61 +67 66 64 63 61 59 +73 71 69 68 66 +48 50 53 54 55 58 59 +38 41 43 46 47 49 50 +25 26 27 30 32 33 +62 64 66 67 69 71 72 +22 19 18 16 15 13 +40 38 36 35 34 32 +47 48 50 51 53 +26 29 31 33 35 38 39 +53 52 50 48 46 +57 58 59 62 65 +40 42 43 44 45 48 50 +10 12 14 17 20 +47 46 45 44 42 40 +70 71 73 75 76 78 81 +8 10 12 15 18 +50 51 52 54 56 58 59 +78 80 83 85 86 88 +89 86 85 84 83 81 +52 50 48 45 44 41 +54 51 48 47 46 +26 28 30 32 35 36 +56 59 61 63 66 69 70 +27 25 24 21 18 +79 80 81 84 87 90 93 +24 27 28 30 31 34 37 39 +9 10 13 15 17 +20 21 23 25 27 29 31 +42 39 36 33 31 30 28 27 +75 72 70 68 67 +38 37 34 31 28 +43 46 48 49 51 52 +38 39 41 43 45 +89 88 85 84 83 82 81 +42 39 38 35 33 31 +14 13 11 9 7 4 2 +39 41 42 43 45 46 48 +74 75 78 81 84 87 88 91 +65 68 70 71 73 +60 63 66 68 71 74 76 79 \ No newline at end of file diff --git a/2/new.input b/2/new.input new file mode 100644 index 0000000..f2cd7db --- /dev/null +++ b/2/new.input @@ -0,0 +1,1000 @@ +45 47 48 51 54 56 54 +76 79 81 84 84 +30 32 35 36 38 40 44 +72 74 77 78 85 +54 55 58 57 60 +61 64 67 66 68 67 +5 7 6 9 12 14 16 16 +82 83 84 82 85 88 91 95 +38 40 43 46 49 47 53 +23 26 28 31 34 35 35 36 +74 75 78 80 81 81 79 +11 13 16 17 18 18 20 20 +20 21 22 23 23 27 +63 64 64 65 68 71 73 79 +44 47 49 53 55 56 58 59 +81 82 84 87 88 92 89 +32 35 38 40 44 44 +53 55 59 60 62 64 65 69 +53 55 56 58 62 67 +57 59 62 68 71 73 74 75 +22 24 25 30 33 35 38 36 +15 17 20 25 28 30 32 32 +83 85 88 94 98 +74 77 78 80 87 92 +57 55 58 61 63 64 65 67 +74 71 73 74 75 73 +32 31 34 35 35 +35 32 34 36 38 40 42 46 +35 32 33 34 36 41 +69 67 66 67 70 71 74 75 +93 91 89 91 94 93 +95 93 92 94 96 96 +23 22 21 22 23 24 28 +27 24 25 26 28 26 29 36 +86 84 86 86 88 +2 1 2 3 3 6 9 7 +35 33 35 35 36 36 +15 13 14 14 16 18 19 23 +73 70 70 71 78 +21 20 23 25 28 32 33 35 +27 25 27 28 32 34 31 +40 39 40 44 44 +67 64 67 71 75 +31 28 29 32 33 37 44 +9 8 11 14 17 19 25 28 +42 41 46 49 51 50 +22 21 26 28 31 33 36 36 +20 19 26 28 32 +32 29 30 37 40 43 48 +20 20 23 25 28 31 32 35 +69 69 72 75 76 75 +51 51 53 54 54 +46 46 47 48 49 53 +72 72 75 76 77 78 80 85 +53 53 54 52 54 +79 79 78 79 78 +72 72 75 73 75 75 +47 47 49 52 54 51 55 +19 19 20 18 21 26 +84 84 85 85 88 91 93 94 +29 29 29 31 33 36 33 +15 15 17 18 21 21 21 +61 61 61 64 67 71 +62 62 63 64 64 70 +64 64 67 71 72 75 77 79 +60 60 63 67 70 68 +76 76 79 81 85 87 88 88 +20 20 23 26 28 31 35 39 +29 29 33 35 42 +25 25 30 32 35 +50 50 52 59 60 62 60 +60 60 61 63 68 69 69 +81 81 83 86 87 92 96 +68 68 73 76 81 +21 25 26 28 31 32 35 38 +38 42 43 44 45 43 +35 39 42 44 46 46 +19 23 24 26 28 29 33 +54 58 60 63 65 67 73 +33 37 38 40 42 39 42 44 +65 69 70 67 68 65 +9 13 10 13 13 +78 82 79 81 83 87 +34 38 40 38 40 41 48 +15 19 19 21 24 +36 40 42 42 39 +4 8 9 9 9 +52 56 57 60 61 61 65 +50 54 56 57 57 60 66 +26 30 32 36 37 +9 13 16 20 22 23 20 +55 59 61 65 65 +45 49 50 53 57 60 63 67 +74 78 82 84 90 +41 45 50 53 56 +72 76 82 83 85 82 +1 5 11 12 12 +72 76 79 81 82 89 93 +54 58 64 65 70 +66 72 74 77 79 81 84 87 +47 53 55 57 60 62 59 +71 78 79 81 82 84 84 +52 57 59 62 64 65 69 +59 64 67 69 71 74 76 83 +78 83 85 82 83 85 86 89 +27 32 34 37 40 37 35 +37 42 40 41 44 44 +44 51 54 51 53 57 +18 24 27 30 32 31 36 +57 63 66 68 68 69 71 72 +65 70 70 71 73 72 +32 37 37 39 42 42 +43 50 52 52 55 58 61 65 +20 26 28 28 29 30 33 38 +50 55 59 62 64 65 66 +44 51 52 56 57 58 61 59 +12 17 18 21 25 26 28 28 +2 9 11 15 19 +61 68 72 73 78 +17 22 28 30 33 +58 64 67 72 74 71 +72 78 79 85 88 90 90 +69 74 76 83 85 89 +24 31 34 35 36 42 49 +22 19 16 14 12 10 9 12 +74 72 70 67 66 66 +42 40 39 36 32 +95 93 92 91 85 +70 68 67 66 65 67 66 63 +82 79 77 74 77 74 77 +74 72 70 71 68 68 +97 95 94 96 93 91 87 +13 11 9 10 8 2 +13 10 8 8 6 4 +80 78 75 75 73 70 72 +64 63 63 60 60 +54 51 50 50 46 +35 32 29 28 28 27 21 +87 85 81 80 78 +27 25 22 18 17 14 17 +94 92 88 85 82 79 78 78 +19 16 15 11 10 7 3 +46 44 42 41 37 34 29 +54 52 49 44 43 41 40 +29 27 26 20 21 +97 95 92 85 85 +55 54 52 47 46 42 +32 31 28 26 23 21 16 9 +43 44 42 40 39 38 +14 15 14 12 11 10 13 +48 50 47 46 46 +90 93 90 87 85 82 78 +78 80 77 74 72 69 68 62 +32 35 37 35 32 29 28 26 +15 16 17 15 14 13 16 +62 65 63 65 65 +75 77 75 78 74 +4 7 5 7 6 1 +98 99 96 93 93 90 +52 55 55 54 57 +76 79 79 78 75 75 +75 77 74 74 73 70 66 +21 23 22 21 21 19 17 12 +79 81 80 76 75 +69 71 69 65 63 61 59 60 +71 73 71 70 69 65 64 64 +59 61 59 56 54 50 46 +86 89 85 84 83 77 +53 55 54 48 47 44 42 39 +13 16 15 14 12 5 6 +63 64 63 60 54 52 52 +55 56 54 47 43 +33 36 33 32 27 22 +30 30 28 27 25 24 21 19 +14 14 12 11 10 12 +34 34 32 31 30 27 24 24 +18 18 17 16 12 +21 21 19 16 10 +26 26 27 24 21 20 +68 68 67 66 64 66 63 64 +77 77 80 78 76 73 73 +71 71 73 71 69 66 65 61 +25 25 24 23 21 19 20 15 +46 46 46 45 44 41 38 37 +73 73 72 70 68 68 67 68 +54 54 54 53 51 49 49 +47 47 47 46 44 43 39 +72 72 70 69 67 67 62 +93 93 90 89 85 82 81 78 +54 54 53 49 47 48 +24 24 20 19 19 +93 93 89 87 83 +30 30 28 24 22 20 14 +97 97 90 88 87 +76 76 71 68 67 66 65 66 +81 81 75 72 72 +50 50 45 42 41 37 +75 75 69 67 61 +49 45 42 41 38 36 +56 52 50 49 46 45 47 +31 27 24 22 19 18 18 +42 38 37 34 33 30 26 +77 73 71 70 67 65 63 58 +36 32 29 26 24 23 25 22 +46 42 39 41 43 +85 81 82 80 78 78 +49 45 43 45 41 +63 59 62 59 54 +91 87 85 85 82 +68 64 62 59 59 61 +9 5 5 4 4 +74 70 68 68 67 63 +25 21 19 18 16 13 13 7 +69 65 64 60 57 54 +68 64 60 59 58 57 60 +94 90 89 87 85 84 80 80 +28 24 20 18 16 12 +26 22 20 16 11 +95 91 89 83 80 +36 32 29 28 23 24 +82 78 75 70 70 +58 54 49 47 44 40 +52 48 47 45 39 32 +98 93 92 90 89 86 84 +32 25 23 20 18 15 17 +26 19 18 15 14 13 10 10 +33 28 26 23 20 18 15 11 +84 78 75 74 73 70 69 64 +86 79 78 76 74 77 74 +73 67 65 62 63 64 +90 84 81 83 83 +94 87 86 84 87 83 +40 33 32 30 33 32 29 24 +25 19 18 18 15 14 +86 80 79 79 78 77 76 77 +10 4 3 3 3 +55 48 48 47 43 +98 92 91 90 87 87 81 +21 16 12 11 9 7 4 2 +27 22 19 15 14 11 12 +22 17 13 12 10 10 +97 90 89 86 82 81 77 +99 94 91 87 82 +72 67 64 63 62 55 53 +63 56 54 53 52 51 44 46 +46 39 36 33 31 26 26 +48 42 37 35 31 +27 20 14 13 11 8 1 +15 17 18 21 23 25 26 24 +65 68 71 74 77 80 81 81 +23 26 28 29 31 32 36 +84 86 87 90 92 93 98 +89 90 91 94 96 95 96 +24 25 26 28 25 26 25 +34 37 34 37 37 +24 26 29 28 32 +72 74 72 73 75 80 +91 93 93 94 97 +21 23 25 25 22 +29 32 35 37 37 37 +52 54 54 56 57 61 +21 23 23 24 30 +16 18 19 23 26 28 29 32 +81 84 88 89 91 94 95 92 +55 57 61 63 63 +77 79 80 82 84 87 91 95 +18 20 21 24 28 31 34 40 +22 23 26 32 35 +29 32 33 35 36 41 38 +25 28 29 31 33 34 39 39 +1 4 9 12 16 +31 33 34 41 44 51 +90 87 89 90 92 93 95 96 +32 30 31 33 31 +85 82 83 85 88 90 90 +76 73 76 78 80 81 82 86 +26 25 27 30 33 35 38 43 +66 64 67 69 71 70 73 +56 53 52 54 57 60 59 +78 75 73 74 74 +7 5 7 5 9 +57 55 53 55 58 61 64 71 +78 76 77 77 79 82 +54 52 52 54 51 +53 50 53 53 53 +88 86 89 91 92 94 94 98 +85 83 83 85 86 92 +6 3 7 9 12 14 +17 16 18 22 24 26 23 +20 17 20 23 24 28 30 30 +58 56 58 59 63 67 +8 5 9 10 17 +77 74 75 77 78 80 87 89 +82 81 82 84 85 87 94 92 +81 78 79 84 84 +60 58 60 61 64 71 75 +66 63 65 71 76 +62 62 65 68 70 72 +22 22 24 26 24 +16 16 18 21 21 +30 30 33 36 38 42 +46 46 47 50 51 52 59 +3 3 4 2 4 6 9 11 +15 15 12 14 16 17 19 17 +32 32 35 34 34 +92 92 95 92 93 94 98 +73 73 70 73 76 83 +18 18 18 21 22 +39 39 42 42 43 41 +88 88 89 92 92 94 96 96 +27 27 27 30 32 36 +63 63 65 66 66 72 +31 31 35 38 39 40 41 +10 10 12 16 17 19 17 +38 38 42 43 45 45 +57 57 61 62 63 65 68 72 +11 11 14 18 21 23 24 31 +63 63 69 71 74 75 +8 8 13 16 15 +22 22 23 26 33 35 35 +7 7 10 13 16 21 25 +20 20 23 24 29 34 +79 83 86 88 91 93 +38 42 44 45 48 51 53 51 +36 40 42 43 45 45 +23 27 29 31 35 +69 73 74 76 81 +14 18 21 22 25 24 27 30 +36 40 37 38 40 42 40 +9 13 11 14 16 16 +73 77 75 78 82 +29 33 31 33 39 +23 27 30 30 32 34 +57 61 64 65 68 68 69 67 +16 20 20 23 24 26 26 +23 27 30 30 31 32 36 +72 76 76 79 86 +53 57 59 60 64 65 67 68 +63 67 71 74 71 +86 90 91 95 96 99 99 +62 66 69 73 77 +61 65 69 70 75 +23 27 30 36 39 40 41 42 +30 34 37 38 39 42 47 46 +50 54 56 61 61 +21 25 27 32 36 +22 26 27 33 36 38 45 +29 34 37 39 40 42 +31 36 38 39 40 43 46 43 +34 39 42 43 46 48 51 51 +29 35 36 37 40 43 46 50 +23 30 33 34 37 40 43 50 +90 95 96 93 95 +58 64 66 69 67 66 +29 34 37 40 37 40 43 43 +24 29 32 35 38 39 37 41 +11 18 17 19 20 27 +49 56 59 59 62 +87 93 96 97 97 96 +5 11 11 12 15 16 16 +45 50 50 51 53 57 +65 71 74 74 81 +35 42 46 47 48 51 54 +76 81 82 83 87 89 87 +2 7 8 11 15 17 17 +30 36 39 43 46 50 +48 53 54 56 60 63 64 70 +75 81 87 88 90 91 +27 32 34 36 41 39 +81 88 95 98 98 +32 38 45 46 49 52 53 57 +45 50 52 58 59 66 +75 72 69 67 68 +16 13 10 9 8 6 6 +96 95 94 91 88 87 83 +44 41 39 37 35 32 27 +34 32 33 30 27 +64 61 60 58 56 54 55 58 +56 55 54 57 54 51 51 +41 39 42 41 39 38 34 +26 25 24 26 25 19 +21 19 17 17 16 +89 86 85 84 83 83 80 83 +15 12 12 9 9 +52 49 47 47 43 +50 49 49 46 43 41 38 31 +97 95 94 92 91 87 86 +39 37 36 33 32 29 25 26 +77 76 73 72 70 67 63 63 +22 20 16 14 11 7 +34 32 31 28 24 23 16 +31 29 26 24 17 15 13 11 +81 79 77 70 67 65 66 +67 64 58 55 55 +22 19 17 14 12 11 6 2 +36 35 34 33 31 30 23 17 +14 15 12 10 7 +15 17 14 11 13 +3 6 5 4 3 3 +68 71 69 67 64 62 58 +34 37 35 32 25 +29 32 29 28 25 27 24 +20 21 24 22 20 19 21 +86 87 84 81 83 82 82 +16 19 17 14 13 11 13 9 +27 28 31 29 28 23 +61 62 62 59 56 55 54 +28 31 29 29 26 28 +78 79 79 76 73 70 70 +18 20 19 17 17 13 +40 41 40 40 38 36 35 28 +87 88 87 83 81 78 +41 44 41 40 39 35 33 35 +88 90 89 85 85 +25 27 23 22 19 18 14 +97 98 95 94 90 87 82 +90 93 87 85 84 82 79 +87 90 89 86 84 78 81 +67 70 65 64 61 61 +94 97 94 92 89 83 79 +57 59 57 52 46 +66 66 63 62 59 +39 39 36 35 32 29 32 +64 64 62 59 57 54 54 +27 27 26 24 21 20 16 +41 41 40 38 36 35 28 +78 78 76 73 70 68 70 69 +54 54 52 51 54 53 50 52 +55 55 54 51 54 53 53 +30 30 29 32 31 27 +97 97 96 99 98 93 +86 86 86 83 80 78 75 72 +93 93 91 89 89 90 +97 97 97 95 95 +62 62 60 57 57 56 52 +75 75 73 73 71 69 62 +50 50 46 44 41 40 +80 80 79 75 73 71 68 69 +38 38 36 33 29 29 +98 98 95 91 87 +78 78 75 73 69 68 63 +84 84 82 79 76 74 67 66 +19 19 16 10 8 11 +32 32 25 22 20 19 16 16 +23 23 22 21 19 13 10 6 +80 80 73 72 71 68 62 +81 77 75 73 72 71 70 69 +65 61 60 58 61 +17 13 10 8 8 +90 86 83 81 77 +69 65 63 62 61 55 +46 42 39 36 38 35 34 +58 54 53 55 56 +80 76 73 76 74 74 +63 59 57 54 53 56 54 50 +45 41 43 42 35 +23 19 19 16 14 +55 51 50 49 49 48 47 48 +96 92 90 87 84 81 81 81 +86 82 80 77 77 74 70 +95 91 90 90 84 +44 40 38 37 36 32 29 +95 91 87 85 82 85 +96 92 91 87 85 85 +66 62 59 55 51 +40 36 32 31 29 27 22 +77 73 71 68 62 61 58 55 +87 83 81 79 73 72 71 74 +52 48 47 41 38 36 36 +88 84 81 76 74 71 67 +89 85 82 79 73 70 63 +87 80 77 75 72 71 +18 12 11 9 7 6 9 +98 92 89 88 88 +78 73 70 69 66 63 60 56 +41 35 32 30 29 23 +39 33 31 28 30 29 +69 64 65 62 64 +59 54 51 52 51 49 47 47 +69 62 64 61 57 +54 48 45 42 41 43 41 34 +60 53 50 48 45 44 44 41 +52 46 46 45 48 +37 30 27 27 24 24 +91 84 84 82 80 76 +94 87 86 83 83 76 +38 32 28 25 23 20 19 17 +17 11 7 6 4 5 +65 58 57 55 52 48 47 47 +60 55 51 48 44 +63 58 55 52 50 46 43 36 +37 30 28 22 19 +96 89 87 81 78 79 +24 18 17 16 14 9 6 6 +40 33 28 25 23 21 20 16 +67 60 57 55 53 47 45 38 +48 50 53 56 57 60 62 59 +47 48 50 52 55 57 57 +34 35 37 38 41 42 45 49 +59 60 61 63 64 66 73 +42 45 47 50 49 51 53 +18 21 23 25 23 24 23 +30 33 32 33 36 38 39 39 +48 49 52 55 58 56 57 61 +54 57 56 57 62 +16 18 19 22 22 24 +74 77 80 81 82 82 79 +17 19 19 22 22 +27 29 31 32 32 33 36 40 +30 31 31 33 34 37 38 45 +77 80 81 82 84 88 89 +56 58 60 61 65 63 +86 88 92 95 95 +58 59 60 61 65 67 71 +55 57 58 62 64 66 73 +39 41 42 49 50 52 55 +8 11 18 21 22 24 26 24 +32 34 40 41 42 42 +35 36 38 41 48 51 55 +63 65 71 73 76 82 +89 88 89 91 92 94 +34 33 36 37 35 +65 64 65 66 69 70 71 71 +24 23 24 26 27 31 +10 9 12 13 14 17 20 25 +47 44 45 46 47 46 49 +51 48 50 47 44 +40 38 39 36 38 38 +75 73 74 71 73 77 +47 46 49 50 47 48 50 56 +12 10 10 12 15 17 +28 26 27 27 30 27 +10 7 10 10 11 13 15 15 +85 84 84 85 89 +35 32 33 35 35 38 44 +70 68 71 73 74 76 80 81 +75 72 76 77 79 80 83 82 +86 84 85 89 92 95 95 +12 9 11 13 16 17 21 25 +6 4 6 10 16 +36 35 37 40 43 50 53 56 +68 65 66 68 71 77 74 +85 83 86 93 95 96 97 97 +25 23 25 27 34 35 38 42 +41 38 45 47 48 54 +46 46 47 49 51 52 53 54 +30 30 33 34 36 37 36 +43 43 45 48 50 51 51 +87 87 89 92 96 +1 1 4 7 8 11 18 +91 91 94 96 99 97 99 +48 48 51 54 53 52 +73 73 76 77 80 82 80 80 +66 66 67 68 70 67 71 +72 72 70 71 77 +7 7 10 13 13 14 +73 73 73 76 79 77 +51 51 52 55 57 57 59 59 +15 15 16 16 20 +70 70 73 76 79 82 82 87 +19 19 23 26 27 29 +40 40 44 46 43 +6 6 9 13 15 18 18 +16 16 20 23 25 27 30 34 +72 72 75 77 79 83 90 +43 43 46 53 54 57 58 +5 5 6 11 13 10 +10 10 13 15 21 21 +29 29 30 37 39 43 +71 71 78 81 87 +45 49 50 51 52 54 +21 25 28 29 32 29 +38 42 43 46 46 +10 14 15 18 19 20 21 25 +10 14 17 18 19 22 23 29 +8 12 11 14 17 19 21 +58 62 61 62 61 +32 36 33 35 35 +1 5 6 4 8 +69 73 74 75 72 75 81 +54 58 59 59 61 +54 58 58 59 60 62 59 +61 65 65 68 71 74 74 +84 88 89 89 93 +51 55 56 56 58 59 60 65 +10 14 17 21 22 +13 17 20 21 25 26 25 +45 49 53 54 54 +80 84 88 90 91 94 98 +19 23 24 26 27 28 32 37 +42 46 48 54 55 +49 53 58 59 62 65 62 +60 64 70 73 75 75 +53 57 60 67 68 72 +27 31 33 35 41 44 51 +20 25 27 28 29 30 33 34 +37 42 45 46 44 +42 49 51 54 55 58 59 59 +36 42 44 47 50 52 56 +11 18 21 22 29 +77 82 79 81 82 +9 14 15 12 9 +37 44 41 43 43 +30 35 33 35 38 39 43 +45 52 53 55 57 59 58 64 +26 31 31 34 36 39 41 +38 43 44 45 47 50 50 49 +10 16 18 18 20 20 +18 24 25 28 29 29 31 35 +52 59 61 64 67 67 68 75 +18 25 26 29 32 33 37 38 +21 28 32 35 33 +24 31 35 36 38 41 41 +47 54 55 59 63 +60 66 70 71 74 75 80 +65 71 72 79 82 85 87 +59 65 66 72 70 +33 38 39 42 47 50 50 +22 29 30 31 33 34 39 43 +5 10 11 18 20 21 26 +91 89 88 85 84 85 +75 73 71 69 69 +23 21 19 17 15 13 12 8 +52 50 48 45 43 38 +34 33 32 31 32 29 26 +41 38 40 38 39 +72 70 69 72 72 +18 15 17 16 13 10 6 +86 85 82 83 77 +28 25 22 19 18 17 17 14 +95 92 92 91 89 91 +80 77 76 76 73 73 +23 20 18 18 17 15 14 10 +60 58 56 56 49 +23 21 17 15 14 +33 30 26 25 23 20 23 +97 96 93 89 89 +51 50 48 45 44 40 36 +84 82 80 79 75 72 71 64 +76 75 68 67 64 62 +97 94 88 86 89 +89 87 81 78 77 77 +97 94 91 86 83 81 80 76 +17 15 13 12 7 2 +24 27 25 23 20 19 17 16 +28 30 27 24 23 21 18 21 +8 9 8 7 6 5 2 2 +51 54 51 49 46 42 +41 43 41 38 36 31 +54 56 55 54 53 56 53 +68 71 69 70 67 65 67 +6 9 8 9 8 6 4 4 +51 53 51 49 47 49 48 44 +40 43 45 43 42 36 +49 50 50 47 45 42 40 38 +4 7 6 4 4 2 3 +98 99 99 98 98 +53 56 54 54 50 +81 82 79 79 77 71 +88 89 86 82 80 +55 58 56 54 51 47 44 45 +58 61 58 57 55 52 48 48 +28 29 28 24 23 19 +56 59 58 54 47 +85 88 86 79 76 +95 98 97 90 88 86 88 +52 53 50 49 47 42 41 41 +60 63 60 54 52 50 46 +55 57 56 55 49 48 45 39 +54 54 51 48 45 43 41 40 +60 60 57 54 53 55 +60 60 59 58 55 53 51 51 +44 44 41 40 36 +81 81 78 77 74 71 70 65 +46 46 43 46 44 +67 67 66 64 65 63 66 +74 74 72 69 66 64 67 67 +61 61 60 61 59 58 54 +48 48 46 48 47 44 39 +25 25 25 24 23 +88 88 88 86 88 +19 19 19 17 14 11 9 9 +70 70 67 65 65 64 60 +17 17 14 12 12 11 8 2 +99 99 96 92 90 +56 56 54 52 48 47 50 +80 80 77 73 72 69 69 +28 28 26 22 20 17 13 +70 70 66 64 58 +93 93 88 86 83 81 79 77 +40 40 34 31 34 +47 47 45 42 39 34 34 +89 89 82 79 78 74 +98 98 97 96 90 87 84 79 +47 43 41 38 35 34 32 29 +63 59 58 55 53 50 51 +80 76 74 71 68 65 65 +47 43 42 41 39 38 37 33 +84 80 77 75 74 67 +87 83 80 78 81 79 +18 14 16 13 16 +31 27 30 28 27 27 +15 11 8 11 9 6 2 +22 18 17 20 17 11 +52 48 47 44 44 41 40 +39 35 35 32 29 27 26 29 +50 46 45 45 43 42 40 40 +91 87 85 85 81 +56 52 50 50 43 +25 21 19 18 14 13 +78 74 70 69 67 69 +21 17 16 15 13 9 9 +59 55 54 51 47 43 +96 92 90 88 84 83 82 77 +49 45 40 37 35 +53 49 43 42 41 44 +50 46 44 38 35 35 +56 52 46 45 43 41 37 +46 42 40 37 30 25 +63 58 56 54 51 48 47 45 +55 50 49 48 47 44 47 +26 21 18 15 15 +65 58 57 55 53 49 +94 89 87 85 84 81 75 +65 59 57 55 56 55 +12 5 4 5 6 +24 17 20 17 17 +17 12 9 7 6 8 7 3 +44 37 39 36 30 +19 12 12 9 7 4 3 +99 94 92 89 87 87 90 +18 13 12 12 12 +65 60 60 58 54 +27 20 17 16 14 12 12 5 +22 15 11 10 8 +67 61 57 55 57 +37 32 29 28 25 21 21 +94 87 83 82 79 78 75 71 +60 54 51 47 44 38 +57 52 49 46 40 38 +84 79 78 73 70 72 +46 39 36 31 30 30 +85 80 79 73 71 67 +52 46 45 39 38 37 32 +76 78 76 74 69 68 66 66 +93 93 92 91 88 86 83 84 +2 1 3 5 8 6 +77 71 69 67 63 61 58 59 +17 10 7 6 6 +93 94 95 96 98 99 98 +66 71 72 74 78 81 +10 13 17 18 21 23 23 +48 48 45 43 37 30 +26 28 28 29 27 +93 91 90 92 95 95 +75 72 71 68 66 65 62 56 +36 40 42 43 46 45 44 +29 33 34 35 35 37 38 39 +20 25 26 28 30 32 36 34 +2 2 4 5 9 12 12 +59 63 66 70 70 +95 95 98 96 94 92 87 +63 56 54 52 55 49 +4 8 11 18 20 17 +54 56 53 51 48 50 47 +99 96 93 91 90 90 88 88 +39 39 41 43 45 49 +23 23 29 31 34 35 +62 58 55 53 46 41 +56 59 57 55 55 54 52 48 +47 50 53 54 55 57 58 +18 16 14 13 10 9 +26 29 31 34 36 39 +61 59 57 55 54 52 49 +34 35 37 39 41 42 44 +54 57 58 59 61 64 66 67 +24 23 22 19 16 15 +63 65 66 67 70 71 72 73 +97 96 93 90 87 84 81 +84 82 80 79 76 74 72 71 +21 23 24 26 28 30 32 33 +77 75 74 72 69 67 66 64 +65 67 70 72 75 77 79 +21 22 24 25 27 28 30 +77 79 81 82 83 +52 51 48 45 42 +21 20 17 15 14 11 10 +50 47 46 43 40 37 34 +50 52 53 56 59 61 63 +74 75 76 77 80 83 +85 86 87 89 90 92 94 96 +16 14 13 12 9 7 5 4 +92 89 86 85 82 81 78 +37 36 33 31 30 27 26 25 +55 53 51 50 48 46 44 41 +4 6 8 11 14 16 17 +31 34 36 37 40 +21 22 25 28 29 +26 28 30 33 35 38 41 +49 46 44 41 40 39 38 36 +66 67 69 72 75 +72 69 66 65 64 61 59 56 +88 91 92 95 98 +11 14 16 19 20 23 +64 62 61 59 58 56 55 53 +82 83 85 86 87 89 92 94 +91 88 85 84 82 +94 93 90 87 84 82 79 +11 14 15 16 19 +39 36 35 32 30 27 24 21 +79 80 81 84 87 +49 50 53 56 59 62 +41 40 39 38 37 +15 14 12 9 6 5 4 1 +9 11 13 15 18 19 20 +67 68 71 74 77 +86 89 92 93 94 97 98 +9 11 13 15 17 19 +81 83 85 88 91 92 +54 52 50 48 47 45 43 +25 24 22 20 19 +91 89 86 83 80 79 77 75 +22 21 19 18 15 14 +64 63 61 60 58 55 +14 17 19 22 24 26 +52 54 57 59 62 65 +11 12 14 17 20 21 +90 89 88 86 85 84 81 +81 82 84 87 89 92 93 +55 53 52 49 47 44 43 +28 26 24 23 21 19 18 17 +83 80 79 78 76 74 71 +95 92 89 86 83 +69 72 74 76 77 +51 54 57 59 62 64 67 +13 14 15 16 19 21 24 +47 46 44 43 41 40 37 36 +75 74 71 68 67 66 64 +30 33 34 36 38 40 41 43 +21 22 23 26 29 +32 35 36 37 38 40 43 45 +11 12 13 16 18 19 20 21 +20 18 16 15 13 10 9 8 +36 39 42 44 46 47 +53 51 49 47 44 43 40 +82 80 78 75 74 71 70 67 +26 25 22 21 20 19 18 17 +62 65 67 68 69 70 71 72 +85 84 81 79 78 77 75 74 +36 38 41 42 45 48 +56 54 53 50 49 48 +80 79 76 73 72 70 68 67 +40 38 37 34 31 +97 96 94 92 89 86 83 80 +62 59 58 56 54 52 +23 26 28 29 30 33 +12 15 17 18 21 22 25 +73 70 69 66 64 61 +34 32 30 29 26 23 +99 98 96 94 92 +67 70 72 74 75 76 +57 60 62 63 66 69 70 +76 74 72 69 68 67 66 63 +5 7 10 11 13 15 +36 38 41 44 46 +94 91 88 85 84 83 82 80 +13 15 16 17 19 22 25 26 +85 87 88 89 90 93 +19 17 16 15 13 10 8 5 +15 17 20 23 24 26 29 32 +93 92 91 88 85 83 80 +27 29 30 31 32 33 +68 70 71 72 74 77 80 +22 20 17 15 13 12 9 +23 20 18 15 14 12 +56 53 52 49 47 +19 16 14 11 10 +32 29 28 27 25 24 +98 96 93 90 88 +86 88 89 91 92 +69 66 65 62 60 59 +19 20 23 25 28 +56 57 60 63 65 68 70 72 +50 47 46 44 42 40 39 38 +54 53 52 50 49 46 44 +5 6 8 9 12 13 16 19 +38 41 43 44 47 50 +37 36 35 33 31 30 27 26 +73 76 78 81 83 84 85 +32 29 28 25 24 21 18 16 +84 86 87 89 91 94 95 +37 40 43 45 48 50 51 54 +91 93 94 96 97 +20 22 24 27 30 +56 59 60 63 64 +58 61 62 65 68 69 +43 40 37 36 34 31 28 26 +33 36 37 38 39 42 +49 47 45 43 42 41 39 38 +82 84 87 89 90 93 +26 23 20 18 17 +71 70 69 67 64 63 +67 69 72 73 74 +99 97 96 93 92 +38 41 42 43 44 45 48 +12 15 16 19 22 24 +72 74 76 79 82 84 85 87 +97 96 93 91 90 +55 52 50 48 47 46 +16 14 12 11 9 7 6 5 +99 96 94 91 88 87 85 83 +87 86 84 82 81 +13 14 15 16 19 21 23 +38 41 42 44 47 48 +19 18 17 16 13 10 +29 30 32 33 35 38 39 +35 34 33 31 30 +86 87 88 90 93 95 +35 32 31 29 27 +68 67 64 61 59 +80 77 74 72 71 +71 70 69 66 65 +15 17 18 19 20 21 +42 45 47 50 51 +33 31 29 28 27 25 24 +73 72 71 69 68 67 65 64 +43 46 48 51 53 54 +39 42 45 48 51 53 +53 52 50 49 47 +47 50 51 54 56 +26 29 30 33 36 37 40 42 +39 36 34 33 30 27 24 +65 66 68 70 72 75 76 77 +51 53 56 57 59 60 62 63 +53 52 50 48 47 45 44 +21 20 18 16 13 12 10 8 +84 85 88 90 92 93 +62 64 67 70 71 73 +33 34 37 40 41 42 +35 32 31 29 26 25 +9 10 13 15 16 18 20 23 +94 93 90 87 86 85 83 +12 9 8 6 5 3 2 +15 18 19 20 22 23 25 28 +96 94 93 90 88 86 85 +89 90 91 93 94 96 +77 76 74 73 70 +48 51 52 53 54 +32 29 27 26 25 +36 39 41 42 45 48 51 +48 50 52 53 54 56 59 +78 77 75 73 72 71 +82 81 78 77 74 73 72 71 +14 13 11 9 6 5 3 2 +69 72 75 77 80 82 83 +75 73 70 68 65 63 +91 89 87 85 82 81 78 76 +98 95 93 92 89 +74 72 69 67 64 62 61 +67 66 64 63 61 59 +73 71 69 68 66 +48 50 53 54 55 58 59 +38 41 43 46 47 49 50 +25 26 27 30 32 33 +62 64 66 67 69 71 72 +22 19 18 16 15 13 +40 38 36 35 34 32 +47 48 50 51 53 +26 29 31 33 35 38 39 +53 52 50 48 46 +57 58 59 62 65 +40 42 43 44 45 48 50 +10 12 14 17 20 +47 46 45 44 42 40 +70 71 73 75 76 78 81 +8 10 12 15 18 +50 51 52 54 56 58 59 +78 80 83 85 86 88 +89 86 85 84 83 81 +52 50 48 45 44 41 +54 51 48 47 46 +26 28 30 32 35 36 +56 59 61 63 66 69 70 +27 25 24 21 18 +79 80 81 84 87 90 93 +24 27 28 30 31 34 37 39 +9 10 13 15 17 +20 21 23 25 27 29 31 +42 39 36 33 31 30 28 27 +75 72 70 68 67 +38 37 34 31 28 +43 46 48 49 51 52 +38 39 41 43 45 +89 88 85 84 83 82 81 +42 39 38 35 33 31 +14 13 11 9 7 4 2 +39 41 42 43 45 46 48 +74 75 78 81 84 87 88 91 +65 68 70 71 73 +60 63 66 68 71 74 76 79 \ No newline at end of file diff --git a/2/sample.input b/2/sample.input new file mode 100644 index 0000000..82cd679 --- /dev/null +++ b/2/sample.input @@ -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 \ No newline at end of file diff --git a/3/1.py b/3/1.py new file mode 100644 index 0000000..da91f17 --- /dev/null +++ b/3/1.py @@ -0,0 +1,14 @@ +import re + +def get_muls(raw: str) -> list[int]: + finds: list[str] = re.findall(r'mul\([0-9]+,[0-9]+\)', raw) + pairs = [] + for f in finds: + parts = f.strip('mul()').split(',') + pairs.append((int(parts[0]), int(parts[1]))) + return pairs + +with open('data.input') as file: + print(sum(m[0] * m[1] for m in get_muls(file.read()))) + + \ No newline at end of file diff --git a/3/2.py b/3/2.py new file mode 100644 index 0000000..374d64a --- /dev/null +++ b/3/2.py @@ -0,0 +1,21 @@ +import re + +def parse(raw: str) -> list[tuple[int]]: + finds = re.findall(r'do\(\)|don\'t\(\)|mul\([0-9]+,[0-9]+\)', raw) + active = True + pairs = [] + for f in finds: + # Active or nah + if 'do(' in f: active = True + if 'don' in f: active = False + if not active or 'mul' not in f: continue + + # Figure out the mult part + parts = f.strip('mul()').split(',') + pairs.append((int(parts[0]), int(parts[1]))) + return pairs + + +with open('data.input') as file: + print(sum(m[0] * m[1] for m in parse(file.read()))) + diff --git a/3/data.input b/3/data.input new file mode 100644 index 0000000..5a34ad5 --- /dev/null +++ b/3/data.input @@ -0,0 +1,6 @@ +what()-%*;[mul(826,659)what()&mul(622,241)}^from();why()mul(499,923))mul(589,186)~how()why()]/~who()}mul(57,224)* ##[[*>mul(206,45)select(){~from(63,961)+!/'@mul(365,743)^ from()mul(94,410)$how()(^ )/,mul(592,884) mul(265,485))^#[[mul(763,659),mul(275,537)$;who()*mul(511,392)))what()(+from()from()>&-mul(416,947)mul(868,183)?:where()*when()#-where(890,406)#-mul(873,379)mul(195,835)/,%?],!-{(mul(225,902)where()'(where()-@#mul(544,955)how();~when(222,774)mul(538,277),from()from(717,816)$)(!%select()mul(247,162)**why()!}/where()mul(411,570)]mul(158,805)<[)}!@$select()don't()&?mul(475,153)when()mul(44,394)mul(505,328)select(),;[+mul(228,58)}/)why()?who()mul(706,785)$!#mul(635,796)#[where(){^select(275,150)-/)mul(85,214)do()where()@'mul(651,67)]-mul(530,38)why()+^don't(),where();what()~mul(532,711),;)$why()+what();%mul(265,354)-mul(338,874)?]mul(284,884)}'?where(),mul(614,138)&who()~}[why()from()mul(779,747)^mul(7,27)select()}>+^-*who()*mul(545,113)who()('!&how(),don't()+{$&mul(842,42)<#mul(788,22),why(),mul(581,843)why()?mul(415,102)[mul(782,483)::(&',^mul(411,597)mul(800,946)[]($}:+)]mul(6,738)who()+where()@}(where()>$when()mul(737,227)select()~ why(984,422)mul(690,299)$how()!why()when() why()>:who()mul(62,391)mul(559,901)mul(152,669)([why()-select();*(mul(674,497)mul(195,917)from()#what(),mul(332,868)select()')@#mul(957,359)(when()]>(%,mul(252,836)[why()?where()!,mul(877,551)&select()[}->(*[mul(847,681),why()select()select()*@,mul(211,86)when()select()-:)#']mul(416,630):(}?$[:)mul(255,942):-*:!~%@how()what()mul(117,324) +/}mul(804,424)mul?where())%}mul(933,657)%from()what()'~!}*:mul(916,775)who() {,what(485,199)when()#mul(760/-select();mul(859,259) )?mul(21,933)what()^from()#-mul(951,427)don't()mulwhere(295,787)%'~*who()@mul(500,697)where()*^!@^what():mul(737,496)^{)^how()when()#mul(387,233)']%select();}mul(89,882)}(&mul(394,392)#from()what()}who()when()when()>;^mul(639,188) [*mul(302,818)[mul(874,794)~{(<>[%mul(217,113)~why() mul(651,680)^!/'select()mul(161,158)'}/*{mul(41,452)?;;@,[~}why()mul(71,555)who()}]where()*%where()?mul(909,630)%^where()how()'mul(678,912)*)+what():don't()*^[$mul(208,358)mul(99,216,??/-%]when(40,18)>'(mul(967,259)^!%!mul(574,337)mul(855,993)from()who()<@ -&mul(679,566)[;$how()mul(773,340)+-':-mul(46,577);>+%^#mul(668,549)@;#,[])don't()mul(471,350)why()?what()where()what(),]:!where()mul(474,215):#what():%}how():mul(47,116)-,^from()?[select()>mul(566,323);!$why()what()<>{%-mul(756,641)(]{what()$>@#$%mul(478,68)!](;@+when()mul(383,83)>>@ do())(/!when(){{)~when()mul(18,568)mul(933,58))mul(53,523)what()where()>+where()^mul(847,728)>where() who()how()]mul(499,856)mul(837,413)&:who();from()@mul(711,785)@from()select()$]#-}mul(603,647)!how()'}/mul(142,83)mul(236,987)(&[)+$<&when()mul(464,484)[mul(97,923{[{;~*how(603,347)why(397,750)[mul(397,378):from()who()@$[mul(33,741)@&<['from():do()]select()/!who()from()what()(+mul(425,204)<[^select()#:?do()/mul(977,606)how()select()?select() ^mul(481,671)^&,)&what()select()from()from()mul(219,42):what()?}mul(441where()({select(),mul(333,910)from()from()where()]*'mul(925,221):%?from()mul(981,324)%}mul(595,648)&select()/mul(742,838)when()~@from()don't()#+)(<^?}mul(554,328)} -?(mul(513,192)~~$*why()/~% mul(444,631)## mul(794,537)-#what()~how()why(310,427)(mul(781,606)< from()@&mul(787,800)@how(266,66)-{when()what()who()mul(538,246)[^*+why()where()mul(629,836)from()* [$+&]mul(77,354)%]:from()mul(260,304)@why()!/when()where()+(mul(354,804) mul(76,15)>mul@!!$]from()mul(357,50)(mul+%~]$-%%don't()(from();when()#;~when()mul(564,123)~&]@mul(489,580from()what(95,431)+:*- ,*'mul(745,620)how()'why()>-from()[?>!!mul(988,840))^)(]]#^}mul(298,967)when():who()#who()what()mul(84,148)< ;&@^do()when()~^where()#^$mul(341,853)<+~*what(252,434)*{{mul(986,313)]&>&>mul(620,476)why()who()mul(69,875<$-&(''mul(106,787)mul(171,707)who();~when()+>;how();+mul(163,282)(];?>}* mul(571,602)/from()+/]!{+mul(372,949)$?*$(mul(921,212)@'>mul(705,437)($when()where()mul(371,384)>mul(445,760)'do()?/when()%[^mul(382,44)}&/)&$select()mul(284,899) when():%mul(554,813)$;~>mul(274,983)'')?-from()mul(668,571)when()why()mul(981,529)>where()%) #& [^mul(864,321)how()'[mul(752,285)$ mul(448,366)&why()])${;^from()who()mul(251,944)select()-&*mul(724>>)}^,select()~~}do()}))%who()#mul(652,853) +mul(914,760)%]how())mul(325,361)>[@#{mul(49,627)> []!%?@:mul(866,756)!?^how()#select()(}&mul(217,708)>mul(534,113)<()(~(how()&mul(522,207)where() who()why())]mul(549,286)what(824,300)-]when()]}:select()mul(536,959$(~#&*[~})mul(47,72){:mul(907,280)&!mul(175,322)mul(460,379)select()'?&mul(697,154){^%[^from()when(552,273)mul(454,997)*&/mul(514,858)$why(29,970): ,+!<&mul(411,897)[%why(),mul(749from()where())+ ]how()'what()mul(739,713)mul(116,113)mul(203,704)/!select(379,766)]&when()^from()#mul(903,203)!,!< {%]?mul(330,707)where()(+how()>mul(526,973)~]^&'how()mulfrom() +];mul(964,967)@why()from()when()^~ mul(217,465)]from()/from()@&]where(263,584)+why()mul(267,301)}when():#don't()>who(860,416)/,mul(126,52);<}+[who(),where()mul(868,540)when(332,336)mul(134,939)#mul(119,818)mul(777,396)+mul[mul(184,9)select()mul(375,842)]mul(527,499)~#what()'mul(260,652)mul(15,171)what()mul(273,578)-?mul(798,178)&?<;#%:mul(886,756)where()who()~^,from()$mul(775,238)[why()'mul(229,247)/mul(105,511)from()?]>+/why()$!:mul(578,64)?where()*)~:&( where()mul(917,699)&:~^'~who()mul(685,592); ,where()%[{mul(535,245)' why()*mul(166,874)!'who()why()/~:}-what()mul(430,972)[(mul(11,883)>?-%/#;who(382,885)why()}where()*&?mul(142,204),!why()from(805,222),mul(165,77>>from()mul(539,602)@- !!from()where()>mul(725,894)#mul(664,363)mul(436,916)(;*]!/mul(276,69)?^~how()?:-what()do()mul(174,136)where() ,#:*)mul(465,302)*!-why()^/mul(363,643)})(why()!mul(149,621))^*?who(),mul(172,73)mul(631,398)]from()mul(998,161)@[[@who()?mul(310,639)#-}{what()?;!(mul(584,757)~ !(do()$->#[)$(mul(124,565){mul(698,142)}})-mul(742,227)%#why()/,$:select()mul(152,975)why()*&?~#'~*?mul(908,265)mul(620,516)from()select(209,291)why()$mul(539,160);select()~}*{when()mul(784,853)who(15,285);where(),^;where()-[mul(342,770select()*;>-((*&mul(982,965)how()&mul(523,830)when(961,246)[ why()+why()]mul(785,203)who(99,69),*mul(936,742)?^','%;-why()!mul~)when()when()select()!(;&@how(900,734)mul(589,321)mul(964,282)-))how()why()what()(*})mul(47,984)@mul(253,826)mul(429,558)where()how();<#what()#+mul(983,307)~>}-)/who()mul(327,880)+}when(){when()}mul(593,869)mul(643,89)-:,,,<;mul(33^who()[)+-^mul(189,550)<:mul(519,574)*how()?where()[^;when()mul(563,151select()-what()]mul(574,867))}mul(800,881)who()'#~#mul(46$mul(693,762)-!@,#mul(454,19)$!select()from()*who()),mul(269,371)from()mul(330,479)%&!}how(477,247) [do())why()^}+''-how()mul(819,485)how()-)~*%what(447,325)why()mul(462,456)#?]mul(912,654)]mul(2,822)$)>':select()when()select()/]mul(557,454)'%<>+%what())*do()when()why(716,84)@/mul(89,140)select()('mul(310,84),*select(),$?mul(86,400)[/what()<@~$mul-!when()who()%#where()'[who()(mul(755,653)mul(594,757from()from()<[,;mul(916,545)mul(206,9)@$)mul(588,12) '][)select()$from()from(220,871)@mul(849,103)-/mul(887,921)$#who()who()mul(873,831):why()}who()[+mul+&>#how()how() : mul(323,651)why()!mul(620,114)<+what(844,679)/{/*mul(327,69)mul(472,982)how()^(mul(321,807)when()why()]why()$mul(694,629)/%/ who()*[mul(648,109)]>[''@mul(543,595)${{{:>;#!/usr/bin/perl ]-(#:how()]<+mul(770,832) +$select()when()@*)&select()how()/mul(195,671)';;^(select()!mul(342,663)@$@%~)>)don't()what()mul(681,868)-@who(237,633)}when())*#>;mul(532'select(828,390);what(),<%?-:{mul(835,208)%/$select(21,874)mul(214,27)from()who()who()/mul(767,769)!~,+>who(),mul(204(}who()!when(940,779)<$from()^mul(944,886)mul(714,285)<)~~why()mul(352,872)what():/mul(419,248)#from()&select()>>mul(557,809)-why()from():mul^?);mul(231,230)(what()%/:{mul(635,952)mul(896,753)-&*%mul(475,955))[when()(&~}mul(865,939)mul(557,651) !)~:mul(172,689)/from()]{$,;what()mul(956,624):[,@+}what()mul(601,236))where()*from()from()mul(820,982)who()$select()when()/mul(249,654)#,from():;!don't()}+select();/why(240,203)where()^!mul(373,721)from()?,mul(234,262)how()'>([mul(477,58)mul(161,422)~mul(985}/select()-~mul(344,788);mul(660,334)do()when()]where()&who()when(){mul(955,809)+who()>how()where()?-^/mul(800,971) mul(331,999)[{where(){}]@!mul(243,886)mul(807,365)why(708,402)@when()?who()mul(242,464)&^,[{how(){when()*(mul(593,164)&*/&where()select(237,204)mul(474#/mul(533,804)&, how()why(653,768)mul(489,173)]where()from()[&{?:mul(62,23)& )where()from() mul(234,284)@who()why()* }*mul(938,464)from(),+?(@why() don't()what(338,233)?~'+who()$@mul(63,606):mul(713,654)$from()(+&:mul(138,999);&#select()~mul(432,589)?>^(?*&mul(117,404)@)where()why(6,662)mul(942,298)mul(16,588)how()*~<~ from()-mul(610,545):why()#]-;how())what()}mul(977,824)??when()mul(241,702)!^]@mul(98,19)!{what()mul(896,817)?who())^#&;:?mul(475,309){]~!who()mul(819,280)+~why(22,676)mul(714,597)from()when())^~+, mul(962,748)%mul(178,691)$what()mul(777,740)&who())where(),;mul(632select()/ *who()who()@mul(460,751)+',mul(862,580)# :-what()!+{don't():$!<^:from(){&who()mul(93,231)how()select()#+)-^don't()/&>*#'/&[(;&>,from()do(),what())what()$*mul(742,889)mul(62,478)?[why()why(),mul(837,195)why(){>,$@!'mul(722,317)%%select()when()what()(('/+mul(251),)>mul(148,406);don't()when()'mul(784,101)<[!^(where(365,573)<${mul(535,827):{*#mul(335,673)]]^:^]when(222,2)[mul(704,190)!from()who(){%(&} mul(407,649)+~:why()mul(575,579)@}:why()mul(945,425)[what():mul(42,200) +/select()who()how()select()~when(364,150)mul(790,347)+,):+?mul(498,67)!!<'when()}',{mul(440,393)from(283,600):@[ :&mul(584,602)[*%+mul(913,926)(+from()why()(><,$ mul(4,866)where(){;+,why(),when()why()when(199,14)mul(370,854)why()^mul(665,756),>}*{:&when()-how(582,503)don't(){@^,@/mul(306,251)mul(2,820)~&[[^ mul(135,961){~!)mul(526,875)how()+what()?]mul(379,321)%why()%,who()^?don't(),select()%when()mul(476,779)select()mul(811,466)}~~%mul(389,923)>what(){&> :{>mul(806,620)mul(976,304)when(); :)/[mul(463,959)'when()[select()(^]mul(911,997)-%[*,mul(448,155)({from(10,578)mulwhat()when()<}select()(mul(492,179)+from(771,314))&*:!]mul(624,243)who()how()(^&{%+$do()'?mul(171,189)who()where()mul(531,756)@what()who()}mul(83,163)> @)*mul(575,765)why()'$$who();{who():?+mul(644,730)~from()&/where()select(574,686)what()^?~mul(998,26)~<: [){}?do()how(851,386)#mul(29,770)]what()select(),^why()from(577,917)?/do() mul(309,161),#mul(684,763){#;why()$+[@]mul(99,693)who();(>select() don't()~^,mul(144,109)!@mul(757,540) +mul(649,668),[^/~> &what()mul(948,181)(what()select()~mul(147,215)mul(790,557)+@when()who()>-{%mul(809,499)+from() mul(594,964)?select()) } ,%mul(105,293)mul(800,358)who())/{$select(343,382)>+from()>mul(556,232)mul(719,487)'&^?why()?^+mul(986]:why()&mul(487,944)#/>[when()when())mul:select()what()&]>^~mul(356,737)$why()^~why()[>mul(357,835)from()~~$+&don't()mul(243,897)mul(606,944);--how() mul(200,517):?:?#),>who()}mul(588,55)&where() how()-:'when()^>mul(144,286)<%{} select()mul(957,918)!mul(901,352)!],;who()>mul(840,776)(,how(544,497)!#:/mul(319,341):what(836,872)<;!!,(!mul(182,549)~mul(550,899)what()>{}^%[do()when()- mul?-('[~@who()~&~mul(376,145)]#]mul(206,452)%?'{+ &how()#]mul(210,898)^+[from()why()'@]/mul(914,474)mul(814,374)how()?mul(679,233select()!$;)*why()who(),{mul(109,898)^^,$^who()what()mul(526,786)what()mul(966,480)mul(971,34)!who()mul(268,920)when(),!^+:!~~don't()'mul(324,732)why(98,537)where()^];}&*mul(341,746)/-+who()(mul(557,763)how()mul(30,249)mul(646,653)'where()(? ,,what() !mul*}&+when()when(579,74)what()]mul(100,419)%*,~-;*~mul(980[who()$where()({do()$)]*mul(154,681):)~select()>'select(110,162)/mul(499,447);~ ]!/%from()mul(140,215)'how()]>^&'/mul(54,832):*/from()/mul(176,59)@$$[#^]mul(802,12)~mul(85,515) +@)::-from()who()mul(979,36)mul(966,513@+'}?don't()mul(428,358)+where()select(943,219)-?>mul(258,3)what()mul(415,26)/'mul(7,129)@who()how(){mul(104,970)]mul(626,872)where())&mul(349,194) *when()how()%&}(why() mul(827,914) how()[+what()^--[!mul(421,153)?mul(161,508):+where()mul(786;#(@/mul(857,712)why(841,104)[})&from()mul(411 ]how(223,310)mul(528,703) ]mul(17,407):*~+)mul(129,256]%$where()~mul(934,438)~where()&+#what(15,14)$select()mul(170,110)mul(367,246)@ mul(759,593));$' where()why(326,790)?why(101,864)~mul(941,890)what(863,919)}>mul(291,785)where()~when()/what()when()mul(599,49)why()'what()}}/what()%{do()$?why()&what()'mul(235,289)mul(326,542)-[why()>[;mul(539,793)mul(608,380)from()>- &:where()mul}who()'*;:'how()from()mul(732,637)&>mul(66,802)*mul(549,82)>&from()+!who(809,63)mul(247,247):why();-select()}mul(70,653)] where()>$mul(436++mul(489,212)><}what()[what()when(279,911)mul(135,755)where():;#%$mul(961,126)#:why(),&select()where()mul(952,400)#~{~]/];from()mul(323,62)<#(]mul(216,941))mul(463,878):!+, -;how()mul(955,874) %: $',don't()<#,@$@-#>mulwhere()when()mul(414,753)/%$mul(121,719)?mul(461,998);,(;(@]mul(197,230)(#@who()]who()mul(843,541)%~}mul(444,889)what()~mul(351,825)#?how() *)}@!mul(903,612)from()-+>do()}#*+'{why()^who(469,233)mul(350,416) }where()#,mul(555,729)who()]&mul(688,456)select(818,922);*don't()]who(441,198)?mul(712,946)!)+- mul(224,129)who(){'!,what()mul(716,626)select()#(mul(26,417) )when()+{@@^don't()+*/mul(141,786)(from()[select()]$#>%mul(889,476):why()>where()~]}#mul(183,580)mul(970,128)[select()}@;where()[why()mul(174,357)~](+[~#mul(471,870)^'from(874,759)%don't()when()[where()who()(mul(880,149)+@?mul(319,427)&&~from()$(mul(186,123)%what() }*(do()when()-where()!/)(mul(810,752)mul(421,178);{# !when()%mul(926,537)when()'mul(697,480){:~#]{>-mul(536,791)*]$~*where()$mul(367,981)?(+~#mul(982,905)><},,*where() where()@mul(321,839)!{->]?what(){mul(467,883):/+)mul(849,445)why()when()[&$+!# \ No newline at end of file diff --git a/3/sample.input b/3/sample.input new file mode 100644 index 0000000..f274bda --- /dev/null +++ b/3/sample.input @@ -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/3/sample2.input b/3/sample2.input new file mode 100644 index 0000000..b774ec9 --- /dev/null +++ b/3/sample2.input @@ -0,0 +1 @@ +xmul(2,4)&mul[3,7]!^don't()_mul(5,5)+mul(32,64](mul(11,8)undo()?mul(8,5)) \ No newline at end of file