diff --git a/2024/01/Go/example.txt b/2024/01/Go/example.txt new file mode 100644 index 0000000..dfca0b1 --- /dev/null +++ b/2024/01/Go/example.txt @@ -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/2024/01/Go/go.mod b/2024/01/Go/go.mod new file mode 100644 index 0000000..37859dc --- /dev/null +++ b/2024/01/Go/go.mod @@ -0,0 +1,3 @@ +module ch/timofey + +go 1.23.4 diff --git a/2024/01/Go/input.txt b/2024/01/Go/input.txt new file mode 100644 index 0000000..1d43777 --- /dev/null +++ b/2024/01/Go/input.txt @@ -0,0 +1,1000 @@ +61087 87490 +31697 16584 +57649 82503 +75864 27659 +27509 96436 +37785 17549 +30806 12666 +71338 26039 +94200 13799 +73623 88618 +60764 14092 +46867 30593 +62601 80528 +78776 30420 +35971 56025 +48962 48962 +50942 30534 +56279 53981 +47754 82614 +39355 49866 +60617 68321 +50272 33448 +70518 96366 +94959 75903 +85770 75458 +36168 61514 +91570 37792 +75972 56754 +22980 49647 +25926 73036 +72340 42491 +96648 61514 +27237 24213 +46662 93644 +61624 40593 +98665 18860 +19380 56611 +50919 40593 +16962 12050 +30683 75364 +57102 33189 +77088 43939 +93276 19585 +32452 24213 +62197 78297 +99845 25512 +88379 76585 +90636 44964 +16913 57023 +32162 51560 +13881 76908 +75025 61514 +23570 94541 +91908 88158 +99552 17515 +98990 18854 +37417 24378 +35289 31427 +79815 91094 +32154 53981 +92170 62197 +94073 32248 +95673 36484 +70265 84419 +85924 19248 +47465 43648 +12247 91025 +55919 54408 +66716 55755 +43564 32349 +55279 19602 +58640 33392 +73260 88760 +82455 24213 +18010 86649 +32127 31642 +73441 82503 +27418 14238 +20256 96352 +60860 91025 +79287 32248 +12451 45400 +74928 68127 +58523 98877 +40876 50982 +27491 25610 +90379 40593 +83566 15683 +47924 44687 +46057 50583 +66111 61546 +20706 26039 +94668 24213 +55150 99467 +83123 41078 +42491 40593 +50088 56370 +45586 94541 +60182 82503 +80528 81668 +22638 11281 +86030 16132 +29321 40593 +79183 94841 +11026 96094 +41014 51358 +25565 18199 +77060 50583 +19248 62091 +19106 86913 +42737 49971 +57542 52664 +78423 27659 +40566 39048 +99897 47864 +78788 86727 +50740 51560 +62817 12163 +29975 72142 +70874 42491 +49105 19383 +61365 55424 +66638 47751 +71227 72728 +60660 62197 +53094 54975 +57206 76014 +60004 91094 +12354 62197 +64617 24213 +33069 19248 +43231 80528 +39113 29548 +43496 44236 +55270 55017 +89147 60340 +44478 98438 +88102 44178 +57861 42491 +13062 37792 +96697 50558 +81338 21222 +13637 86440 +46111 44991 +72767 35096 +27088 39716 +15895 58068 +50583 76014 +99892 51560 +19287 68277 +70485 56754 +59124 48963 +48561 84849 +29810 32248 +80613 46825 +92494 57048 +48647 73204 +18807 99467 +10789 11281 +45940 21380 +46135 63265 +50993 19312 +12177 27659 +24626 20847 +65851 11281 +34256 50284 +48599 66616 +55055 68507 +96547 40593 +28604 80528 +79339 80528 +82589 24052 +80877 20044 +41248 80305 +83451 16584 +53395 33931 +50618 99867 +46535 82537 +60854 91094 +17508 46509 +64064 91025 +65689 52864 +81667 97240 +67639 23003 +29152 91094 +41173 97070 +92692 50583 +71139 82172 +51520 38540 +65344 37792 +90964 68536 +50931 91094 +30591 98803 +64601 39865 +65187 44460 +49044 41741 +26809 80528 +41244 70052 +83502 61514 +65407 25607 +31347 61586 +50693 14420 +12676 62197 +17967 37792 +70553 23540 +23366 25910 +24299 30562 +18099 76014 +82265 39811 +40593 23346 +93620 61514 +71798 50583 +40785 75651 +11303 40593 +44457 94541 +34409 53981 +71468 51560 +81121 76014 +11281 90297 +52517 93116 +98978 54868 +96720 39479 +94661 19248 +17770 49819 +45243 91025 +49291 76014 +76119 61514 +19677 37792 +26107 58046 +88603 80502 +48049 25561 +34672 78297 +62549 99467 +26952 66149 +70834 44994 +64217 26336 +39118 68619 +56422 28917 +52238 97462 +33385 76014 +40513 82503 +14766 29638 +67245 83025 +36852 76014 +19781 94541 +97661 97375 +49033 39108 +20945 61514 +72998 54086 +21774 54042 +83357 51123 +84207 19248 +52816 51560 +64851 62273 +96243 37792 +54243 30583 +18196 51146 +81097 16584 +79961 16584 +96318 24213 +42355 46244 +83622 77976 +37050 76762 +64405 61053 +91904 53981 +41283 51560 +54832 94541 +91489 10278 +92587 94541 +16234 91025 +14563 27064 +23561 32899 +48759 41914 +80154 61514 +38550 99467 +47033 14738 +30986 19248 +53109 50583 +82694 33392 +80036 33554 +22792 19248 +79558 75933 +47391 24213 +21552 34264 +37323 40419 +32881 74785 +96317 94541 +85735 49918 +77104 24213 +95669 23142 +27572 67728 +75600 81897 +92373 50583 +71354 95359 +37543 70645 +92388 70881 +67090 32248 +31485 18145 +60309 65825 +13628 34507 +70975 24213 +63993 34555 +74410 26123 +49604 97534 +43169 77987 +72385 39313 +72348 56754 +53981 15479 +93158 51045 +61514 56265 +46667 32248 +33397 27461 +94271 40593 +38885 62197 +18191 98216 +20721 37790 +59397 36929 +35874 71279 +50820 56754 +32357 17584 +20108 61514 +15532 51020 +76122 49880 +20324 58844 +34991 79069 +61667 58070 +49470 78297 +19457 85222 +76014 84279 +12721 55507 +21111 15952 +81962 37792 +14262 13603 +13596 29755 +42487 66976 +93615 76831 +52618 52542 +23922 34268 +87909 39401 +68755 91159 +26448 58316 +73078 50583 +48948 26039 +86189 84029 +90656 79676 +91439 31792 +28757 26039 +91071 49601 +89016 68694 +70843 71475 +27550 68141 +78038 48962 +24244 47697 +15814 92683 +64462 98216 +49214 78297 +23970 54042 +35851 56755 +37587 83609 +55358 94044 +85268 88773 +11193 99467 +91094 61514 +38943 50583 +53600 11281 +97920 76999 +95887 27117 +74703 76014 +38128 98216 +17281 90324 +78588 46910 +66738 40593 +25401 71893 +29504 29755 +31904 46149 +28879 54661 +17294 40593 +27242 87597 +65570 50019 +28219 69114 +74538 66055 +79103 91094 +78977 26354 +83327 94640 +99986 31421 +80152 46535 +84692 61514 +23613 48578 +51813 50583 +83951 50583 +56981 33179 +57983 50427 +60777 58973 +19636 40593 +58093 77663 +39995 91094 +26622 80528 +34897 85226 +88985 40593 +59595 45056 +57526 91025 +81357 91094 +66993 23607 +31751 44402 +60054 26039 +85914 82503 +30970 66205 +95141 48962 +95334 32248 +26456 40593 +24075 33392 +30273 80274 +90547 58472 +33392 21022 +29912 48962 +98689 62197 +88442 27659 +24076 48962 +46032 66034 +99190 94968 +59610 82172 +29087 27060 +86292 70657 +14651 82172 +90989 82172 +52912 79321 +25546 85822 +99280 93924 +34989 57301 +33187 94147 +99664 26039 +69349 16584 +65595 57513 +74982 52280 +83254 90043 +73891 89544 +98751 19248 +20491 15995 +84952 27659 +63017 27659 +94903 80843 +17925 31023 +87580 26039 +87329 78583 +95039 25287 +31497 32248 +22811 48962 +49374 80528 +98216 24400 +36402 11486 +72890 40419 +83635 67226 +58286 65680 +49492 16584 +99467 49759 +73438 48962 +23127 90294 +60131 89536 +94639 11281 +66584 23607 +36647 85497 +98970 58089 +48737 23645 +79137 57367 +29460 31322 +65176 78297 +55287 24892 +38366 39995 +13547 54042 +98550 18855 +89754 28103 +38274 68766 +17050 51560 +47224 74279 +74311 29411 +10103 77919 +89641 85065 +54948 94541 +54042 39577 +63064 19553 +83540 99467 +31183 49656 +79110 50527 +81332 48806 +93766 81955 +52120 54627 +33600 40419 +63077 68913 +63627 27659 +76136 62990 +49899 66902 +55743 82172 +17471 91094 +44044 68542 +66979 19248 +11991 95028 +96452 16957 +62970 59322 +33791 13869 +31546 66994 +65288 83258 +68341 51560 +10118 51560 +87576 88482 +63574 53981 +60007 41627 +45275 59868 +96013 30992 +35263 26483 +99830 82503 +38755 51615 +92782 79915 +17163 32248 +31231 61514 +61812 24024 +50171 51560 +85142 61514 +10585 37792 +51880 78297 +43926 27333 +67905 78297 +90265 62197 +46768 84849 +84334 14699 +44836 82503 +52594 24995 +78285 69200 +38932 72862 +34884 33782 +16286 49344 +53248 84143 +51352 50583 +12615 32827 +97800 80528 +64853 78297 +37817 65390 +43868 63056 +69884 24213 +19242 11281 +70002 44313 +87611 55453 +76921 91094 +42129 37792 +14173 80528 +66808 19248 +65534 99467 +45015 89524 +13687 16584 +67391 97679 +85119 48962 +55503 16310 +34027 67984 +97988 37303 +24683 82572 +54960 16584 +91025 84849 +51560 46535 +87410 93826 +97606 78297 +88896 82503 +43190 21840 +22601 18429 +68843 78297 +17601 61514 +82372 11902 +45491 33392 +46554 70923 +18041 82227 +76351 20403 +30972 29980 +13144 84849 +33347 24213 +34172 60961 +26692 32248 +37637 49455 +42566 74421 +32350 26438 +63711 26973 +82892 91094 +11976 11962 +27662 84849 +60140 33392 +40924 97133 +93718 91025 +83098 52998 +14033 19613 +56137 83496 +91693 39569 +85466 99467 +98427 99407 +67556 42491 +73463 76014 +29242 61514 +36127 84176 +99279 37652 +27035 51105 +98174 78297 +23862 24213 +20250 56754 +52010 27659 +40419 75064 +96979 16584 +50118 99467 +37505 42645 +16428 78297 +27659 37602 +10362 63154 +17494 24213 +46339 82172 +34514 18574 +26650 27659 +42554 97200 +91408 66885 +28975 92895 +76679 82172 +66246 57048 +68738 29719 +86809 91025 +49180 93642 +73780 81131 +87916 24574 +63686 54042 +51313 98646 +20307 45124 +19074 91094 +92731 90991 +69288 51560 +99803 43287 +73034 59262 +46427 40593 +18207 17433 +11287 98216 +15411 82172 +30299 23607 +48718 16484 +37288 68079 +15018 49549 +25470 94618 +24147 42106 +55027 50583 +52085 82503 +32166 84849 +33599 14301 +59068 27659 +19377 10693 +86753 29384 +51948 91588 +19916 99467 +52600 91094 +74242 16584 +38199 74358 +58368 84849 +95450 81597 +27210 91094 +33339 21349 +47402 23109 +47363 38854 +58829 60341 +66872 11467 +76344 22018 +35813 28915 +43412 78297 +69265 16584 +62129 42491 +94222 40668 +68148 34476 +17907 40593 +68642 98216 +80846 31031 +44593 84849 +97936 67435 +48375 37546 +58823 65987 +34709 82503 +56754 25613 +11645 51560 +91638 40218 +70370 39242 +58487 48248 +39715 19248 +24662 87910 +72956 11281 +70987 16584 +63280 99903 +55578 99467 +72582 51596 +78502 40784 +33434 59368 +10938 22408 +30550 59946 +14607 91339 +63082 33392 +37383 27659 +44759 21963 +85625 78297 +63757 60482 +52772 53981 +49763 36437 +17692 94541 +94408 16707 +48167 62197 +47135 33470 +66943 15655 +27749 87937 +34227 21428 +95279 72713 +85841 40593 +64133 78878 +23229 80528 +96465 40590 +87512 16584 +83208 76620 +93281 26039 +97561 42491 +28107 81776 +52456 24091 +38230 80528 +62829 48962 +48391 66904 +75037 50583 +82201 40593 +48654 74205 +81017 73719 +21030 47514 +95967 16584 +26771 91007 +79174 26039 +15178 26562 +40530 78297 +94541 78297 +47010 84624 +45555 23607 +48886 98216 +51787 62197 +48063 92338 +54308 84708 +18088 55773 +44386 46835 +32809 19248 +68476 34665 +78837 80528 +35927 20264 +69734 48962 +61020 11281 +22768 60440 +29655 83969 +62498 99301 +45158 27659 +78297 60147 +67800 53981 +37792 63435 +61002 17824 +48846 34960 +64164 93823 +73535 71182 +71276 89983 +91096 17559 +69770 94541 +97466 62429 +17134 62980 +71019 40593 +38901 86847 +10352 75941 +54979 56754 +63030 69883 +84448 55627 +51782 26039 +48724 36895 +22914 76014 +78378 99467 +79996 43004 +61423 74052 +29161 97710 +34973 78978 +53406 21349 +33674 91025 +53675 48962 +69994 16584 +13728 54042 +25968 26039 +77889 80396 +41369 51907 +19042 98046 +81559 83491 +66529 42838 +68505 81471 +37384 21349 +99490 54042 +16301 15483 +35487 44773 +84225 45146 +49683 61514 +14285 18633 +89502 38039 +90559 22809 +81737 76014 +54727 48962 +28654 51560 +74115 82503 +85709 57048 +36662 17448 +89764 29802 +93944 91094 +87672 63603 +38625 29958 +12701 83836 +58529 15454 +62746 26099 +12706 42491 +76067 51560 +62134 24213 +59608 61965 +69636 50583 +99022 12234 +10703 61940 +17384 17111 +62527 91025 +96925 75148 +70979 18336 +95490 84849 +84657 27659 +66781 52839 +68922 85566 +50689 23548 +60271 48888 +84849 15786 +69664 38061 +73261 42491 +10543 75528 +30035 53981 +80475 75797 +27717 84446 +14217 28061 +68700 57048 +53116 52698 +65110 98452 +69172 31592 +65968 62197 +65385 85793 +46307 28798 +69551 37792 +99478 51560 +40647 22491 +38403 63213 +14806 33070 +14659 57647 +94942 64246 +74887 27895 +67773 77684 +31335 78297 +24514 21881 +22631 80528 +25370 30473 +32248 32248 +72510 60177 +46709 58622 +91821 74379 +63357 19248 +84521 91094 +46482 99467 +72399 42491 +35354 48235 +58778 82503 +21468 98908 +21349 18713 +28199 73959 +19067 24213 +66290 29531 +17139 29267 +66463 42491 +21607 89861 +92019 98216 +20999 56754 +14340 98511 +19190 80528 +77692 84016 +87148 42027 +70878 91094 +34871 24213 +71320 23607 +76264 37792 +79933 99467 +93171 56754 +62447 16584 +65901 24213 +24213 39621 +44255 74342 +33691 82172 +13469 61514 +40749 19248 +99428 76014 +67895 51170 +87102 51560 +37527 20387 +91673 50583 +83232 38784 +26039 62531 +98564 22327 +16402 86039 +63558 46539 +22859 35862 +21580 48481 +58994 39995 +52428 21533 +29258 27659 +82677 92774 +29755 99467 +80176 33392 +13852 38350 +70704 98216 +15693 59958 +39525 67036 +97626 28624 +92199 26920 +11417 76014 +39348 78297 +92716 26039 +93133 43728 +81327 13317 +18816 62197 +51732 41305 +48843 10754 +67931 91094 +89427 26898 +82503 65219 +67661 91094 +84382 53981 +18213 73171 +44546 18594 +86234 25433 +71837 46056 +57922 32248 +81524 35927 +75319 15010 +36480 60540 +41791 40593 +14274 99467 +12501 39995 +42749 27659 +11014 13508 +53011 47475 +34461 39995 +49171 70132 +17750 19248 +76552 23607 +34947 26039 +71211 64387 +29053 32248 +72376 29755 +99598 97963 +13756 20978 +82172 82547 +22915 91025 +83861 91025 +99546 99467 +80289 39995 +48125 99467 +84452 94541 +55516 50583 +58794 21116 +67646 19248 +78114 32248 +89562 27009 +25764 82683 +91703 62197 +18263 92111 +15078 32248 +78127 86731 +17783 62197 +61339 32857 +23117 48962 +42951 99467 +26011 84849 +15636 83820 +34561 40593 +36232 67223 +39189 82172 +38342 79365 +19020 75552 +70735 10655 +36043 78297 +31094 91025 +34341 90722 +32763 76625 +49980 76014 +37629 27659 +39121 13414 +23607 27659 +57048 39842 +38496 32248 +64155 24213 +15472 23607 +82143 94475 +56639 86813 +86153 61514 +55653 99467 +16584 91025 +11460 91094 +85535 71742 +85773 24213 \ No newline at end of file diff --git a/2024/01/Go/main.go b/2024/01/Go/main.go new file mode 100644 index 0000000..7a58eff --- /dev/null +++ b/2024/01/Go/main.go @@ -0,0 +1,51 @@ +package main + +import ( + "fmt" + "math" + "os" + "slices" + "strconv" + "strings" +) + +func check(e error) { + if e != nil { + panic(e) + } +} + +func sumArray(list []int) int { + result := 0 + for _, item := range list{ + result += item + } + return result +} + +func main() { + data, err := os.ReadFile("./input.txt") + check(err) + //fmt.Println(string(data)) + dataRows := strings.Split(string(data), "\r\n") + var leftList []int + var rightList []int + var diffList []int + //fmt.Println(dataRows) + for _, row := range dataRows { + l, _ := strconv.Atoi(strings.Split(row, " ")[0]) + r, _ := strconv.Atoi(strings.Split(row, " ")[1]) + leftList = append(leftList, l) + rightList = append(rightList, r) + } + //fmt.Println(rightList) + slices.Sort(leftList) + slices.Sort(rightList) + //fmt.Println(leftList) + //fmt.Println(rightList) + for idx, l := range leftList { + diffList = append(diffList, int(math.Abs(float64(rightList[idx] - l)))) + } + //fmt.Println(diffList) + fmt.Println(sumArray(diffList)) +} diff --git a/2024/01/Rust/.gitignore b/2024/01/Rust/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/2024/01/Rust/.gitignore @@ -0,0 +1 @@ +/target diff --git a/2024/01/Rust/Cargo.lock b/2024/01/Rust/Cargo.lock new file mode 100644 index 0000000..9289c5e --- /dev/null +++ b/2024/01/Rust/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "day_1" +version = "0.1.0" diff --git a/2024/01/Rust/Cargo.toml b/2024/01/Rust/Cargo.toml new file mode 100644 index 0000000..fc6ae59 --- /dev/null +++ b/2024/01/Rust/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "day_1" +version = "0.1.0" +edition = "2021" + +[dependencies] diff --git a/2024/01/Rust/src/example.txt b/2024/01/Rust/src/example.txt new file mode 100644 index 0000000..dfca0b1 --- /dev/null +++ b/2024/01/Rust/src/example.txt @@ -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/2024/01/Rust/src/input.txt b/2024/01/Rust/src/input.txt new file mode 100644 index 0000000..1d43777 --- /dev/null +++ b/2024/01/Rust/src/input.txt @@ -0,0 +1,1000 @@ +61087 87490 +31697 16584 +57649 82503 +75864 27659 +27509 96436 +37785 17549 +30806 12666 +71338 26039 +94200 13799 +73623 88618 +60764 14092 +46867 30593 +62601 80528 +78776 30420 +35971 56025 +48962 48962 +50942 30534 +56279 53981 +47754 82614 +39355 49866 +60617 68321 +50272 33448 +70518 96366 +94959 75903 +85770 75458 +36168 61514 +91570 37792 +75972 56754 +22980 49647 +25926 73036 +72340 42491 +96648 61514 +27237 24213 +46662 93644 +61624 40593 +98665 18860 +19380 56611 +50919 40593 +16962 12050 +30683 75364 +57102 33189 +77088 43939 +93276 19585 +32452 24213 +62197 78297 +99845 25512 +88379 76585 +90636 44964 +16913 57023 +32162 51560 +13881 76908 +75025 61514 +23570 94541 +91908 88158 +99552 17515 +98990 18854 +37417 24378 +35289 31427 +79815 91094 +32154 53981 +92170 62197 +94073 32248 +95673 36484 +70265 84419 +85924 19248 +47465 43648 +12247 91025 +55919 54408 +66716 55755 +43564 32349 +55279 19602 +58640 33392 +73260 88760 +82455 24213 +18010 86649 +32127 31642 +73441 82503 +27418 14238 +20256 96352 +60860 91025 +79287 32248 +12451 45400 +74928 68127 +58523 98877 +40876 50982 +27491 25610 +90379 40593 +83566 15683 +47924 44687 +46057 50583 +66111 61546 +20706 26039 +94668 24213 +55150 99467 +83123 41078 +42491 40593 +50088 56370 +45586 94541 +60182 82503 +80528 81668 +22638 11281 +86030 16132 +29321 40593 +79183 94841 +11026 96094 +41014 51358 +25565 18199 +77060 50583 +19248 62091 +19106 86913 +42737 49971 +57542 52664 +78423 27659 +40566 39048 +99897 47864 +78788 86727 +50740 51560 +62817 12163 +29975 72142 +70874 42491 +49105 19383 +61365 55424 +66638 47751 +71227 72728 +60660 62197 +53094 54975 +57206 76014 +60004 91094 +12354 62197 +64617 24213 +33069 19248 +43231 80528 +39113 29548 +43496 44236 +55270 55017 +89147 60340 +44478 98438 +88102 44178 +57861 42491 +13062 37792 +96697 50558 +81338 21222 +13637 86440 +46111 44991 +72767 35096 +27088 39716 +15895 58068 +50583 76014 +99892 51560 +19287 68277 +70485 56754 +59124 48963 +48561 84849 +29810 32248 +80613 46825 +92494 57048 +48647 73204 +18807 99467 +10789 11281 +45940 21380 +46135 63265 +50993 19312 +12177 27659 +24626 20847 +65851 11281 +34256 50284 +48599 66616 +55055 68507 +96547 40593 +28604 80528 +79339 80528 +82589 24052 +80877 20044 +41248 80305 +83451 16584 +53395 33931 +50618 99867 +46535 82537 +60854 91094 +17508 46509 +64064 91025 +65689 52864 +81667 97240 +67639 23003 +29152 91094 +41173 97070 +92692 50583 +71139 82172 +51520 38540 +65344 37792 +90964 68536 +50931 91094 +30591 98803 +64601 39865 +65187 44460 +49044 41741 +26809 80528 +41244 70052 +83502 61514 +65407 25607 +31347 61586 +50693 14420 +12676 62197 +17967 37792 +70553 23540 +23366 25910 +24299 30562 +18099 76014 +82265 39811 +40593 23346 +93620 61514 +71798 50583 +40785 75651 +11303 40593 +44457 94541 +34409 53981 +71468 51560 +81121 76014 +11281 90297 +52517 93116 +98978 54868 +96720 39479 +94661 19248 +17770 49819 +45243 91025 +49291 76014 +76119 61514 +19677 37792 +26107 58046 +88603 80502 +48049 25561 +34672 78297 +62549 99467 +26952 66149 +70834 44994 +64217 26336 +39118 68619 +56422 28917 +52238 97462 +33385 76014 +40513 82503 +14766 29638 +67245 83025 +36852 76014 +19781 94541 +97661 97375 +49033 39108 +20945 61514 +72998 54086 +21774 54042 +83357 51123 +84207 19248 +52816 51560 +64851 62273 +96243 37792 +54243 30583 +18196 51146 +81097 16584 +79961 16584 +96318 24213 +42355 46244 +83622 77976 +37050 76762 +64405 61053 +91904 53981 +41283 51560 +54832 94541 +91489 10278 +92587 94541 +16234 91025 +14563 27064 +23561 32899 +48759 41914 +80154 61514 +38550 99467 +47033 14738 +30986 19248 +53109 50583 +82694 33392 +80036 33554 +22792 19248 +79558 75933 +47391 24213 +21552 34264 +37323 40419 +32881 74785 +96317 94541 +85735 49918 +77104 24213 +95669 23142 +27572 67728 +75600 81897 +92373 50583 +71354 95359 +37543 70645 +92388 70881 +67090 32248 +31485 18145 +60309 65825 +13628 34507 +70975 24213 +63993 34555 +74410 26123 +49604 97534 +43169 77987 +72385 39313 +72348 56754 +53981 15479 +93158 51045 +61514 56265 +46667 32248 +33397 27461 +94271 40593 +38885 62197 +18191 98216 +20721 37790 +59397 36929 +35874 71279 +50820 56754 +32357 17584 +20108 61514 +15532 51020 +76122 49880 +20324 58844 +34991 79069 +61667 58070 +49470 78297 +19457 85222 +76014 84279 +12721 55507 +21111 15952 +81962 37792 +14262 13603 +13596 29755 +42487 66976 +93615 76831 +52618 52542 +23922 34268 +87909 39401 +68755 91159 +26448 58316 +73078 50583 +48948 26039 +86189 84029 +90656 79676 +91439 31792 +28757 26039 +91071 49601 +89016 68694 +70843 71475 +27550 68141 +78038 48962 +24244 47697 +15814 92683 +64462 98216 +49214 78297 +23970 54042 +35851 56755 +37587 83609 +55358 94044 +85268 88773 +11193 99467 +91094 61514 +38943 50583 +53600 11281 +97920 76999 +95887 27117 +74703 76014 +38128 98216 +17281 90324 +78588 46910 +66738 40593 +25401 71893 +29504 29755 +31904 46149 +28879 54661 +17294 40593 +27242 87597 +65570 50019 +28219 69114 +74538 66055 +79103 91094 +78977 26354 +83327 94640 +99986 31421 +80152 46535 +84692 61514 +23613 48578 +51813 50583 +83951 50583 +56981 33179 +57983 50427 +60777 58973 +19636 40593 +58093 77663 +39995 91094 +26622 80528 +34897 85226 +88985 40593 +59595 45056 +57526 91025 +81357 91094 +66993 23607 +31751 44402 +60054 26039 +85914 82503 +30970 66205 +95141 48962 +95334 32248 +26456 40593 +24075 33392 +30273 80274 +90547 58472 +33392 21022 +29912 48962 +98689 62197 +88442 27659 +24076 48962 +46032 66034 +99190 94968 +59610 82172 +29087 27060 +86292 70657 +14651 82172 +90989 82172 +52912 79321 +25546 85822 +99280 93924 +34989 57301 +33187 94147 +99664 26039 +69349 16584 +65595 57513 +74982 52280 +83254 90043 +73891 89544 +98751 19248 +20491 15995 +84952 27659 +63017 27659 +94903 80843 +17925 31023 +87580 26039 +87329 78583 +95039 25287 +31497 32248 +22811 48962 +49374 80528 +98216 24400 +36402 11486 +72890 40419 +83635 67226 +58286 65680 +49492 16584 +99467 49759 +73438 48962 +23127 90294 +60131 89536 +94639 11281 +66584 23607 +36647 85497 +98970 58089 +48737 23645 +79137 57367 +29460 31322 +65176 78297 +55287 24892 +38366 39995 +13547 54042 +98550 18855 +89754 28103 +38274 68766 +17050 51560 +47224 74279 +74311 29411 +10103 77919 +89641 85065 +54948 94541 +54042 39577 +63064 19553 +83540 99467 +31183 49656 +79110 50527 +81332 48806 +93766 81955 +52120 54627 +33600 40419 +63077 68913 +63627 27659 +76136 62990 +49899 66902 +55743 82172 +17471 91094 +44044 68542 +66979 19248 +11991 95028 +96452 16957 +62970 59322 +33791 13869 +31546 66994 +65288 83258 +68341 51560 +10118 51560 +87576 88482 +63574 53981 +60007 41627 +45275 59868 +96013 30992 +35263 26483 +99830 82503 +38755 51615 +92782 79915 +17163 32248 +31231 61514 +61812 24024 +50171 51560 +85142 61514 +10585 37792 +51880 78297 +43926 27333 +67905 78297 +90265 62197 +46768 84849 +84334 14699 +44836 82503 +52594 24995 +78285 69200 +38932 72862 +34884 33782 +16286 49344 +53248 84143 +51352 50583 +12615 32827 +97800 80528 +64853 78297 +37817 65390 +43868 63056 +69884 24213 +19242 11281 +70002 44313 +87611 55453 +76921 91094 +42129 37792 +14173 80528 +66808 19248 +65534 99467 +45015 89524 +13687 16584 +67391 97679 +85119 48962 +55503 16310 +34027 67984 +97988 37303 +24683 82572 +54960 16584 +91025 84849 +51560 46535 +87410 93826 +97606 78297 +88896 82503 +43190 21840 +22601 18429 +68843 78297 +17601 61514 +82372 11902 +45491 33392 +46554 70923 +18041 82227 +76351 20403 +30972 29980 +13144 84849 +33347 24213 +34172 60961 +26692 32248 +37637 49455 +42566 74421 +32350 26438 +63711 26973 +82892 91094 +11976 11962 +27662 84849 +60140 33392 +40924 97133 +93718 91025 +83098 52998 +14033 19613 +56137 83496 +91693 39569 +85466 99467 +98427 99407 +67556 42491 +73463 76014 +29242 61514 +36127 84176 +99279 37652 +27035 51105 +98174 78297 +23862 24213 +20250 56754 +52010 27659 +40419 75064 +96979 16584 +50118 99467 +37505 42645 +16428 78297 +27659 37602 +10362 63154 +17494 24213 +46339 82172 +34514 18574 +26650 27659 +42554 97200 +91408 66885 +28975 92895 +76679 82172 +66246 57048 +68738 29719 +86809 91025 +49180 93642 +73780 81131 +87916 24574 +63686 54042 +51313 98646 +20307 45124 +19074 91094 +92731 90991 +69288 51560 +99803 43287 +73034 59262 +46427 40593 +18207 17433 +11287 98216 +15411 82172 +30299 23607 +48718 16484 +37288 68079 +15018 49549 +25470 94618 +24147 42106 +55027 50583 +52085 82503 +32166 84849 +33599 14301 +59068 27659 +19377 10693 +86753 29384 +51948 91588 +19916 99467 +52600 91094 +74242 16584 +38199 74358 +58368 84849 +95450 81597 +27210 91094 +33339 21349 +47402 23109 +47363 38854 +58829 60341 +66872 11467 +76344 22018 +35813 28915 +43412 78297 +69265 16584 +62129 42491 +94222 40668 +68148 34476 +17907 40593 +68642 98216 +80846 31031 +44593 84849 +97936 67435 +48375 37546 +58823 65987 +34709 82503 +56754 25613 +11645 51560 +91638 40218 +70370 39242 +58487 48248 +39715 19248 +24662 87910 +72956 11281 +70987 16584 +63280 99903 +55578 99467 +72582 51596 +78502 40784 +33434 59368 +10938 22408 +30550 59946 +14607 91339 +63082 33392 +37383 27659 +44759 21963 +85625 78297 +63757 60482 +52772 53981 +49763 36437 +17692 94541 +94408 16707 +48167 62197 +47135 33470 +66943 15655 +27749 87937 +34227 21428 +95279 72713 +85841 40593 +64133 78878 +23229 80528 +96465 40590 +87512 16584 +83208 76620 +93281 26039 +97561 42491 +28107 81776 +52456 24091 +38230 80528 +62829 48962 +48391 66904 +75037 50583 +82201 40593 +48654 74205 +81017 73719 +21030 47514 +95967 16584 +26771 91007 +79174 26039 +15178 26562 +40530 78297 +94541 78297 +47010 84624 +45555 23607 +48886 98216 +51787 62197 +48063 92338 +54308 84708 +18088 55773 +44386 46835 +32809 19248 +68476 34665 +78837 80528 +35927 20264 +69734 48962 +61020 11281 +22768 60440 +29655 83969 +62498 99301 +45158 27659 +78297 60147 +67800 53981 +37792 63435 +61002 17824 +48846 34960 +64164 93823 +73535 71182 +71276 89983 +91096 17559 +69770 94541 +97466 62429 +17134 62980 +71019 40593 +38901 86847 +10352 75941 +54979 56754 +63030 69883 +84448 55627 +51782 26039 +48724 36895 +22914 76014 +78378 99467 +79996 43004 +61423 74052 +29161 97710 +34973 78978 +53406 21349 +33674 91025 +53675 48962 +69994 16584 +13728 54042 +25968 26039 +77889 80396 +41369 51907 +19042 98046 +81559 83491 +66529 42838 +68505 81471 +37384 21349 +99490 54042 +16301 15483 +35487 44773 +84225 45146 +49683 61514 +14285 18633 +89502 38039 +90559 22809 +81737 76014 +54727 48962 +28654 51560 +74115 82503 +85709 57048 +36662 17448 +89764 29802 +93944 91094 +87672 63603 +38625 29958 +12701 83836 +58529 15454 +62746 26099 +12706 42491 +76067 51560 +62134 24213 +59608 61965 +69636 50583 +99022 12234 +10703 61940 +17384 17111 +62527 91025 +96925 75148 +70979 18336 +95490 84849 +84657 27659 +66781 52839 +68922 85566 +50689 23548 +60271 48888 +84849 15786 +69664 38061 +73261 42491 +10543 75528 +30035 53981 +80475 75797 +27717 84446 +14217 28061 +68700 57048 +53116 52698 +65110 98452 +69172 31592 +65968 62197 +65385 85793 +46307 28798 +69551 37792 +99478 51560 +40647 22491 +38403 63213 +14806 33070 +14659 57647 +94942 64246 +74887 27895 +67773 77684 +31335 78297 +24514 21881 +22631 80528 +25370 30473 +32248 32248 +72510 60177 +46709 58622 +91821 74379 +63357 19248 +84521 91094 +46482 99467 +72399 42491 +35354 48235 +58778 82503 +21468 98908 +21349 18713 +28199 73959 +19067 24213 +66290 29531 +17139 29267 +66463 42491 +21607 89861 +92019 98216 +20999 56754 +14340 98511 +19190 80528 +77692 84016 +87148 42027 +70878 91094 +34871 24213 +71320 23607 +76264 37792 +79933 99467 +93171 56754 +62447 16584 +65901 24213 +24213 39621 +44255 74342 +33691 82172 +13469 61514 +40749 19248 +99428 76014 +67895 51170 +87102 51560 +37527 20387 +91673 50583 +83232 38784 +26039 62531 +98564 22327 +16402 86039 +63558 46539 +22859 35862 +21580 48481 +58994 39995 +52428 21533 +29258 27659 +82677 92774 +29755 99467 +80176 33392 +13852 38350 +70704 98216 +15693 59958 +39525 67036 +97626 28624 +92199 26920 +11417 76014 +39348 78297 +92716 26039 +93133 43728 +81327 13317 +18816 62197 +51732 41305 +48843 10754 +67931 91094 +89427 26898 +82503 65219 +67661 91094 +84382 53981 +18213 73171 +44546 18594 +86234 25433 +71837 46056 +57922 32248 +81524 35927 +75319 15010 +36480 60540 +41791 40593 +14274 99467 +12501 39995 +42749 27659 +11014 13508 +53011 47475 +34461 39995 +49171 70132 +17750 19248 +76552 23607 +34947 26039 +71211 64387 +29053 32248 +72376 29755 +99598 97963 +13756 20978 +82172 82547 +22915 91025 +83861 91025 +99546 99467 +80289 39995 +48125 99467 +84452 94541 +55516 50583 +58794 21116 +67646 19248 +78114 32248 +89562 27009 +25764 82683 +91703 62197 +18263 92111 +15078 32248 +78127 86731 +17783 62197 +61339 32857 +23117 48962 +42951 99467 +26011 84849 +15636 83820 +34561 40593 +36232 67223 +39189 82172 +38342 79365 +19020 75552 +70735 10655 +36043 78297 +31094 91025 +34341 90722 +32763 76625 +49980 76014 +37629 27659 +39121 13414 +23607 27659 +57048 39842 +38496 32248 +64155 24213 +15472 23607 +82143 94475 +56639 86813 +86153 61514 +55653 99467 +16584 91025 +11460 91094 +85535 71742 +85773 24213 \ No newline at end of file diff --git a/2024/01/Rust/src/main.rs b/2024/01/Rust/src/main.rs new file mode 100644 index 0000000..cd835fa --- /dev/null +++ b/2024/01/Rust/src/main.rs @@ -0,0 +1,42 @@ +use std::{collections::HashMap, fs}; + +fn main() { + let file_name = "./src/example.txt"; + let input = fs::read_to_string(file_name) + .expect("File was not able to be read"); + let input_list:Vec<&str> = input.split("\r\n").collect(); + let mut left_list: Vec = Vec::new(); + let mut right_list: Vec = Vec::new(); + input_list.into_iter().for_each(|row|{ + let row_list:Vec<&str> = row.split(" ").collect(); + left_list.push(row_list[0].parse().expect("Error Number conversion")); + right_list.push(row_list[1].parse().expect("Error Number conversion")); + }); + left_list.sort(); + right_list.sort(); + let frequency_list = right_list + .iter() + .copied() + .fold(HashMap::new(), |mut map, val|{ + map.entry(val) + .and_modify(|frq| *frq+=1) + .or_insert(1); + map + }); + let result = left_list + .iter() + .zip(right_list.iter()) + .map(|(l, r)| i32::abs(*r as i32 - *l as i32)) + //.collect::>(); + .sum::(); + let result_2 = left_list + .iter() + .map(|v| v * frequency_list.get(v).unwrap_or(&0)) + //.collect::>(); + .sum::(); + println!("Content:\n{:#?}", left_list); + //println!("Content:\n{:#?}", right_list); + println!("Content:\n{:#?}", frequency_list.clone()); + println!("Content:\n{:#?}", result); + println!("Content:\n{:#?}", result_2); +} diff --git a/2024/02/Kotlin/.gitignore b/2024/02/Kotlin/.gitignore new file mode 100644 index 0000000..5ff6309 --- /dev/null +++ b/2024/02/Kotlin/.gitignore @@ -0,0 +1,38 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.iws +*.iml +*.ipr + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/2024/02/Kotlin/.idea/.gitignore b/2024/02/Kotlin/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/2024/02/Kotlin/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/2024/02/Kotlin/.idea/encodings.xml b/2024/02/Kotlin/.idea/encodings.xml new file mode 100644 index 0000000..942f3a2 --- /dev/null +++ b/2024/02/Kotlin/.idea/encodings.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/2024/02/Kotlin/.idea/kotlinc.xml b/2024/02/Kotlin/.idea/kotlinc.xml new file mode 100644 index 0000000..6d0ee1c --- /dev/null +++ b/2024/02/Kotlin/.idea/kotlinc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/2024/02/Kotlin/.idea/misc.xml b/2024/02/Kotlin/.idea/misc.xml new file mode 100644 index 0000000..039a9d1 --- /dev/null +++ b/2024/02/Kotlin/.idea/misc.xml @@ -0,0 +1,14 @@ + + + + + + + + + + \ No newline at end of file diff --git a/2024/02/Kotlin/.idea/vcs.xml b/2024/02/Kotlin/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/2024/02/Kotlin/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/2024/02/Kotlin/pom.xml b/2024/02/Kotlin/pom.xml new file mode 100644 index 0000000..a693324 --- /dev/null +++ b/2024/02/Kotlin/pom.xml @@ -0,0 +1,88 @@ + + + 4.0.0 + + ch.makhankov + Kotlin + 1.0-SNAPSHOT + + + UTF-8 + official + 1.8 + + + + + mavenCentral + https://repo1.maven.org/maven2/ + + + + + src/main/kotlin + src/test/kotlin + + + org.jetbrains.kotlin + kotlin-maven-plugin + 2.0.0 + + + compile + compile + + compile + + + + test-compile + test-compile + + test-compile + + + + + + maven-surefire-plugin + 2.22.2 + + + maven-failsafe-plugin + 2.22.2 + + + org.codehaus.mojo + exec-maven-plugin + 1.6.0 + + MainKt + + + + + + + + org.jetbrains.kotlin + kotlin-test-junit5 + 2.0.0 + test + + + org.junit.jupiter + junit-jupiter + 5.10.0 + test + + + org.jetbrains.kotlin + kotlin-stdlib + 2.0.0 + + + + \ No newline at end of file diff --git a/2024/02/Kotlin/src/main/kotlin/Main.kt b/2024/02/Kotlin/src/main/kotlin/Main.kt new file mode 100644 index 0000000..306d317 --- /dev/null +++ b/2024/02/Kotlin/src/main/kotlin/Main.kt @@ -0,0 +1,64 @@ +package ch.makhankov + +import kotlin.math.absoluteValue +import kotlin.math.sign + +fun main() { + val filenames = listOf("example.txt", "input.txt") + filenames.forEach { filename -> + val data = readFile(filename) + val dataRows = data?.split("\r\n") + val dataEntries = dataRows?.map { it.split(" ") }?.map { it.map { s -> s.toInt() } } + val result = dataEntries?.let { calculateSafeRecords(it) } + val resultDampened = dataEntries?.let { calculateSafeRecordsWithTolerance(it) } + println("Part 1: $result") + println("Part 2: $resultDampened") + } +} + +fun readFile(filename: String): String? { + return object {}.javaClass.getResource("/$filename")?.readText() +} + +fun diffFromList(list: List): List { + return list.dropLast(1).mapIndexed { index, i -> i - list[index + 1] } +} + +fun sameSign(list: List): Boolean { + val temp = list[0] + return list.drop(1).all { it.sign == temp.sign } +} + +fun inIncreaseRange(list: List, range: IntRange): Boolean { + return list.all { range.contains(it.absoluteValue) } +} + +fun calculateSafeRecords(input: List>): Int { + val checkValidity = input.map { transformation(it) } + return checkValidity.count { it } +} + +fun calculateSafeRecordsWithTolerance(input: List>): Int { + val checkValidity = input.map { transformation(it) } + var count = checkValidity.count { it } + checkValidity.forEachIndexed { index, value -> + if (!value) { + val record = input[index] + for ((rIndex, _) in record.withIndex()) { + val subList = record.filterIndexed { i, _ -> i != rIndex } + if (transformation(subList)) { + count = count.inc() + break + } + } + } + } + return count +} + +fun transformation(input: List): Boolean{ + val diffs = diffFromList(input) + val sameSign = sameSign(diffs) + val inRange = inIncreaseRange(diffs, 1..3) + return sameSign && inRange +} \ No newline at end of file diff --git a/2024/02/Kotlin/src/main/resources/example.txt b/2024/02/Kotlin/src/main/resources/example.txt new file mode 100644 index 0000000..82cd679 --- /dev/null +++ b/2024/02/Kotlin/src/main/resources/example.txt @@ -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/2024/02/Kotlin/src/main/resources/input.txt b/2024/02/Kotlin/src/main/resources/input.txt new file mode 100644 index 0000000..f70253f --- /dev/null +++ b/2024/02/Kotlin/src/main/resources/input.txt @@ -0,0 +1,1000 @@ +44 47 50 51 53 54 53 +70 73 75 77 80 81 84 84 +1 3 4 7 10 13 16 20 +47 49 52 53 55 57 60 65 +69 70 71 70 71 +22 23 20 21 24 27 24 +90 92 93 94 95 93 94 94 +16 18 15 16 20 +47 48 51 50 55 +27 28 31 31 32 34 +35 36 36 38 39 41 38 +32 33 33 36 38 39 39 +11 14 14 17 20 22 23 27 +65 68 71 71 72 79 +68 69 71 74 76 79 83 84 +51 52 56 58 59 61 64 61 +89 91 94 98 98 +45 48 51 55 59 +82 85 89 90 91 93 99 +41 42 44 49 51 +74 76 77 82 81 +33 36 37 43 45 48 48 +10 12 15 18 23 27 +63 66 72 75 76 81 +71 68 71 73 74 75 +78 75 76 77 76 +8 6 9 11 11 +39 37 38 41 43 47 +87 86 87 90 96 +32 31 32 30 33 35 +17 16 17 18 16 17 14 +63 60 62 61 62 65 65 +77 76 77 78 75 78 80 84 +9 7 10 11 8 15 +48 46 47 49 52 52 54 +17 16 17 19 20 23 23 22 +12 9 10 12 12 13 13 +20 18 20 20 24 +69 66 66 67 72 +9 7 10 12 16 17 18 +19 17 18 19 21 25 28 27 +55 54 57 58 62 62 +55 54 58 61 65 +51 49 53 55 58 60 65 +59 58 60 65 68 +82 81 88 90 93 96 93 +17 14 17 18 23 23 +53 50 52 54 61 65 +26 24 27 28 33 34 36 43 +18 18 19 20 21 22 +63 63 65 67 68 71 70 +3 3 6 7 10 10 +82 82 83 86 89 93 +37 37 40 43 50 +53 53 54 51 52 54 56 +86 86 83 84 83 +37 37 40 42 41 41 +9 9 12 13 10 12 13 17 +57 57 59 61 60 63 65 71 +65 65 67 67 70 72 +23 23 24 24 23 +94 94 96 98 98 99 99 +49 49 50 53 53 55 57 61 +54 54 54 57 64 +70 70 74 77 78 +46 46 47 51 48 +9 9 10 14 14 +78 78 80 81 84 88 92 +49 49 50 53 55 56 60 67 +70 70 77 79 82 85 88 +7 7 14 15 13 +46 46 52 55 58 59 62 62 +16 16 21 22 26 +28 28 29 31 36 43 +2 6 9 10 11 12 +56 60 62 64 63 +60 64 65 68 71 73 74 74 +27 31 33 34 37 38 41 45 +6 10 11 14 15 18 21 26 +14 18 19 22 19 22 24 +17 21 23 26 27 26 28 27 +85 89 92 93 91 94 94 +20 24 27 24 28 +47 51 52 51 52 53 56 62 +18 22 24 24 25 28 +28 32 35 38 38 40 39 +43 47 47 49 50 52 52 +45 49 52 52 56 +33 37 38 38 45 +66 70 73 75 79 81 82 83 +12 16 20 22 24 25 26 25 +54 58 59 61 65 68 71 71 +14 18 20 24 28 +30 34 36 40 43 45 50 +22 26 27 29 31 32 38 40 +59 63 66 67 70 73 79 76 +40 44 47 49 50 55 58 58 +46 50 51 53 58 62 +34 38 40 43 48 55 +53 59 61 64 67 70 +47 52 53 55 56 54 +31 37 39 41 43 45 45 +21 27 29 31 33 37 +18 24 26 28 30 33 36 41 +29 36 37 38 36 38 +2 9 7 9 12 14 15 12 +72 77 76 77 80 82 85 85 +42 48 50 48 50 53 57 +75 81 83 81 84 87 90 97 +17 22 24 27 27 30 33 34 +42 48 48 51 54 52 +82 87 89 89 91 92 93 93 +36 42 44 45 48 50 50 54 +51 58 60 62 62 63 68 +15 20 23 24 26 30 33 +18 25 27 31 30 +68 73 77 78 81 81 +6 12 13 17 21 +8 15 19 21 23 26 31 +8 15 17 22 24 27 +19 25 32 35 37 38 40 39 +55 60 61 63 70 71 71 +43 50 57 60 61 63 67 +12 17 19 25 26 28 34 +96 94 93 92 91 90 87 90 +75 74 71 70 69 66 63 63 +72 69 68 67 66 62 +77 74 72 69 67 66 65 58 +43 42 40 37 40 38 37 36 +99 96 97 96 95 93 92 93 +89 86 85 86 83 81 81 +48 46 43 42 41 42 40 36 +69 66 64 61 64 62 61 55 +98 95 93 90 90 87 84 81 +30 27 24 24 23 25 +33 30 28 28 28 +58 57 54 54 52 48 +71 69 68 68 65 62 57 +36 33 32 31 27 24 +94 91 87 86 84 81 78 79 +35 34 31 28 27 24 20 20 +77 76 75 71 69 65 +53 52 48 45 44 41 39 33 +99 98 96 95 88 85 83 80 +79 76 69 66 64 61 62 +58 57 55 49 48 48 +40 39 33 32 30 27 23 +93 90 89 88 87 81 74 +37 39 36 35 32 29 28 +96 99 96 94 96 +47 48 47 45 42 39 39 +33 35 34 32 28 +17 19 16 14 7 +82 83 81 78 79 78 75 72 +25 27 26 25 28 26 29 +23 26 29 28 25 25 +85 88 91 89 88 86 85 81 +81 83 82 79 82 79 77 72 +44 47 47 45 43 +80 83 82 82 85 +38 40 39 38 37 37 35 35 +86 88 85 83 83 82 78 +27 29 28 28 22 +49 51 49 45 42 +37 39 37 33 30 27 30 +63 65 62 58 58 +43 45 42 40 39 36 32 28 +33 34 32 29 25 23 17 +33 35 33 31 28 22 19 +39 41 38 31 30 28 29 +15 16 15 8 7 6 6 +24 26 25 20 16 +92 93 90 88 82 76 +54 54 51 49 46 44 42 40 +37 37 36 35 37 +44 44 43 42 41 41 +32 32 31 30 27 24 20 +34 34 32 29 23 +94 94 97 94 92 90 +43 43 40 42 40 37 40 +36 36 38 36 35 32 32 +66 66 63 66 65 63 59 +6 6 3 6 1 +48 48 45 44 44 42 41 40 +43 43 42 42 39 42 +52 52 49 47 44 44 44 +31 31 28 28 26 22 +47 47 45 45 38 +79 79 75 72 71 69 +43 43 42 39 37 34 30 33 +21 21 17 14 14 +69 69 66 62 60 57 56 52 +42 42 38 35 32 25 +94 94 91 86 84 +25 25 23 20 14 11 8 11 +27 27 21 20 18 16 16 +80 80 79 73 72 71 67 +38 38 35 32 25 19 +48 44 43 40 38 37 36 34 +17 13 11 9 6 5 8 +59 55 52 49 47 46 46 +92 88 87 84 82 79 76 72 +74 70 69 66 63 60 57 51 +90 86 85 88 87 +82 78 75 76 75 76 +72 68 71 69 66 65 65 +79 75 74 72 70 68 70 66 +55 51 52 49 42 +34 30 30 29 28 25 24 +72 68 67 64 64 67 +77 73 72 72 70 70 +85 81 80 77 77 76 72 +45 41 39 38 35 35 33 27 +31 27 25 23 20 16 15 +69 65 61 59 58 60 +54 50 49 45 43 43 +64 60 59 57 53 51 49 45 +31 27 26 22 17 +78 74 67 64 62 61 60 +43 39 37 32 35 +81 77 71 70 67 64 62 62 +71 67 65 64 63 58 56 52 +52 48 47 45 42 39 32 27 +97 90 88 86 84 81 78 77 +15 10 9 7 6 9 +43 37 35 33 32 32 +89 84 81 78 76 75 71 +35 28 25 22 19 16 14 7 +66 59 56 57 55 52 51 49 +79 74 72 73 76 +83 78 80 77 74 72 72 +62 55 53 55 51 +95 89 87 89 86 79 +31 24 23 22 20 18 18 16 +94 89 87 87 85 82 79 80 +35 29 29 28 28 +45 39 39 36 35 31 +30 23 23 21 19 16 11 +73 68 64 63 62 59 58 55 +57 50 46 45 42 45 +28 22 21 19 15 12 10 10 +61 56 53 49 45 +57 52 50 47 46 44 40 35 +64 57 54 48 47 44 43 +27 21 18 11 10 9 10 +51 45 42 39 36 29 26 26 +95 88 85 79 75 +41 34 33 27 22 +79 80 83 84 86 92 90 +46 39 36 33 29 25 +54 50 49 46 45 44 47 +94 89 88 82 82 +16 19 22 25 27 31 32 34 +92 89 90 96 96 +83 83 82 79 76 69 68 +80 77 79 80 80 87 +41 44 45 48 49 56 60 +28 28 27 23 19 +87 88 90 93 94 98 99 97 +6 10 7 10 8 +13 13 18 20 24 +57 57 57 58 62 +75 77 79 82 79 80 83 +62 59 63 65 68 69 72 +89 85 84 81 79 77 74 72 +49 50 49 46 42 40 38 34 +31 28 30 36 38 +38 34 34 31 29 23 +95 96 99 97 96 95 94 96 +98 94 91 88 87 86 85 85 +69 69 66 64 62 61 54 +47 47 49 50 51 51 51 +31 27 25 28 27 26 22 +73 76 79 81 85 +12 15 15 13 11 4 +57 64 65 67 72 75 77 +31 29 26 25 26 +66 73 79 81 79 +59 62 62 59 56 56 +78 74 73 73 70 67 64 +23 23 23 20 19 17 11 +68 68 66 64 62 65 63 64 +63 59 62 60 57 54 54 +31 37 35 37 38 38 +44 45 42 41 39 41 +22 22 25 26 28 +49 51 44 43 41 38 37 40 +19 18 21 21 25 +89 83 79 77 74 76 +98 97 96 94 91 88 83 +89 88 85 82 79 76 76 71 +71 68 67 65 61 60 58 +32 36 37 44 45 47 49 55 +14 12 10 12 12 +19 17 18 20 21 21 19 +15 12 17 18 21 23 30 +86 87 86 81 80 +65 65 64 62 64 62 60 56 +4 6 5 8 8 +70 67 63 60 60 +41 42 42 45 49 +45 47 54 55 58 58 +81 85 87 88 89 93 +83 84 83 80 79 78 71 65 +63 60 59 61 57 +57 57 54 53 51 51 48 +4 3 5 6 7 7 +70 70 68 69 68 +57 51 48 43 41 +74 78 81 83 86 85 +56 60 61 62 65 68 +10 11 11 14 15 15 +86 90 91 92 93 94 99 98 +43 47 50 51 54 61 +36 29 27 26 23 22 19 13 +56 57 54 51 51 49 46 44 +46 40 37 34 34 28 +56 61 64 65 64 65 66 68 +13 11 8 5 1 +79 79 77 77 76 73 72 72 +37 35 34 31 31 31 +61 57 53 51 48 47 +26 22 21 19 17 12 +37 33 31 28 25 23 19 +25 31 34 37 38 37 38 42 +16 23 26 27 30 33 37 37 +65 60 57 51 48 46 42 +3 2 5 2 6 +56 56 57 59 61 64 70 +78 78 76 73 70 69 63 63 +88 89 86 82 82 +29 31 29 29 25 +70 66 64 62 56 55 53 +35 34 35 36 38 36 +2 6 7 8 11 14 16 16 +50 48 49 51 52 57 58 62 +49 49 52 56 58 62 +71 66 63 61 57 +89 91 92 95 95 94 +25 30 33 36 43 +82 84 85 86 87 89 91 97 +42 42 40 39 32 28 +63 67 70 72 76 78 79 81 +66 66 67 69 70 74 +47 40 38 38 37 36 34 34 +14 14 13 14 16 17 17 +68 68 66 63 61 60 57 57 +51 52 56 59 61 68 +40 42 40 39 36 35 34 30 +28 25 18 15 13 9 +81 85 83 84 88 +27 23 19 18 17 15 11 +40 41 42 48 49 +61 61 62 61 58 55 55 +33 34 33 36 29 +29 27 26 20 18 16 +28 23 20 18 15 12 10 8 +5 5 8 9 10 10 12 17 +51 56 56 58 61 67 +17 21 23 24 24 26 29 26 +12 18 20 21 23 25 25 +16 16 17 20 22 23 27 28 +20 18 15 14 14 10 +40 34 33 31 30 33 31 29 +39 38 41 44 46 44 50 +15 15 19 22 23 30 +57 61 58 60 62 69 +72 79 82 85 82 +58 56 54 52 49 47 49 47 +8 10 15 16 21 +76 75 78 82 83 80 +93 95 94 91 84 80 +87 85 86 88 91 94 95 99 +88 88 86 84 83 79 +74 75 78 79 82 82 +58 59 61 65 67 69 69 +57 64 66 69 73 +81 77 72 71 68 62 +73 73 68 67 66 65 63 58 +56 56 53 52 48 50 +56 55 53 50 45 43 42 42 +26 24 20 19 17 12 +62 62 63 64 62 64 62 +47 42 38 37 34 32 26 +55 59 62 63 61 63 64 +81 78 77 73 70 71 +46 46 48 49 46 49 55 +73 70 70 69 72 +62 62 63 62 61 56 +74 78 81 78 81 81 +90 86 84 83 82 78 78 +2 9 12 14 14 15 13 +95 91 88 88 89 +45 45 43 41 39 33 31 33 +43 42 43 45 42 44 45 45 +20 24 27 33 37 +85 81 80 78 78 74 +7 10 8 10 9 +39 41 42 40 37 37 +76 73 72 66 68 +34 40 41 44 49 53 +92 90 93 97 97 +61 68 70 72 69 72 74 72 +37 33 31 30 29 24 20 +24 20 16 14 11 10 9 4 +72 76 78 84 85 86 86 +21 24 23 20 17 16 18 14 +26 28 25 23 20 20 +4 4 7 8 12 14 12 +92 91 88 86 85 83 80 +95 93 91 90 89 +83 84 86 89 92 95 +61 62 65 67 70 +91 88 85 84 81 +6 7 9 10 13 +81 82 85 88 91 93 95 +74 73 70 67 66 64 +55 57 59 62 65 +12 10 9 6 4 2 +48 46 44 41 40 39 +98 95 94 92 89 +38 39 40 41 42 44 45 +19 22 23 25 28 30 32 34 +56 59 61 63 65 66 67 +21 23 24 26 27 30 +9 11 14 15 18 +3 6 8 10 11 +24 23 20 18 17 15 13 +17 15 14 11 10 7 4 2 +49 48 45 42 40 37 34 33 +49 50 51 53 55 +18 16 13 11 8 7 4 +75 73 70 68 67 64 61 58 +17 14 12 10 9 7 +8 10 12 13 15 18 20 21 +77 76 75 73 71 70 69 +67 66 63 62 59 58 +17 18 20 22 24 +67 65 63 60 59 +2 4 7 9 10 11 14 +39 37 35 32 30 +31 33 35 36 37 39 +83 82 79 78 75 72 71 69 +46 45 42 40 39 38 36 33 +36 38 39 40 41 +40 42 45 47 49 +46 45 43 42 40 38 36 34 +37 35 32 31 30 28 +34 33 32 30 28 26 23 +66 69 71 72 73 75 78 +63 60 57 55 54 52 51 +59 61 63 64 66 +20 17 16 14 11 8 +99 97 94 91 89 87 84 82 +92 90 87 86 84 81 79 76 +53 51 48 47 44 41 39 36 +88 90 91 94 96 97 +14 11 9 8 5 +4 5 6 7 9 12 15 +89 87 85 83 82 79 77 76 +2 5 8 9 10 11 14 17 +10 12 14 16 18 21 +51 54 57 60 62 64 66 68 +46 48 49 50 53 +5 7 8 11 14 16 17 20 +73 71 70 69 67 64 61 58 +94 91 89 86 84 83 80 +87 90 91 92 95 96 97 +25 23 20 17 15 13 +70 71 73 76 79 81 83 +72 70 69 66 65 62 60 +97 95 92 91 89 87 +59 58 57 56 54 +61 60 57 55 52 51 +93 90 87 84 83 +8 11 14 15 18 20 +25 26 29 32 35 +14 15 16 19 20 22 23 24 +77 75 73 72 71 +79 82 83 86 87 89 91 94 +40 39 36 34 31 28 26 +85 87 90 91 94 95 +53 50 49 46 45 43 40 37 +72 74 77 80 81 84 86 +68 65 63 61 58 56 54 +17 16 14 13 10 +82 81 79 76 75 72 71 68 +2 3 6 8 11 12 13 +56 53 50 48 47 +63 65 67 69 71 74 77 +38 40 41 44 47 +89 86 84 81 80 77 76 +65 62 61 59 58 +53 55 56 58 61 63 65 +69 71 74 75 77 79 82 +78 76 73 72 71 69 68 67 +71 74 77 78 81 82 84 87 +14 12 9 8 5 3 +84 81 79 76 74 73 71 70 +58 57 55 53 51 49 47 +59 62 64 65 67 69 +17 14 12 10 8 5 4 +46 43 41 39 36 33 32 +66 65 62 60 57 +14 13 11 10 9 7 +3 5 6 9 12 13 16 +38 39 41 42 43 45 47 48 +19 22 23 25 27 30 +41 38 36 35 33 32 29 26 +34 36 37 39 42 +40 37 34 33 32 +26 23 21 20 18 16 +75 76 77 79 82 +75 77 78 79 80 83 +67 70 72 73 74 77 80 82 +50 48 45 42 39 +69 68 67 65 64 63 61 +15 14 12 10 7 +42 40 37 36 33 +27 24 22 21 19 17 14 +57 59 62 64 67 70 +14 17 20 22 24 25 26 +32 29 27 24 23 21 18 15 +65 67 70 71 74 +1 4 5 8 11 +79 80 81 84 87 90 92 94 +11 10 9 7 5 3 2 +41 40 37 36 35 32 29 28 +61 63 66 68 69 72 74 +42 41 40 39 38 36 33 30 +36 35 33 32 31 30 28 +12 13 15 18 21 23 +62 61 58 55 53 52 +78 76 73 71 68 66 +22 24 26 28 31 33 +31 29 26 24 21 19 +7 10 12 13 15 17 +8 9 11 13 15 16 +62 61 60 58 56 +11 9 6 4 1 +72 74 76 77 78 81 83 +53 55 56 58 60 63 65 67 +42 44 46 48 49 52 +22 21 19 18 15 13 11 9 +42 45 46 48 51 52 +49 48 47 46 45 43 +11 9 7 4 3 +86 85 84 81 79 77 74 +22 24 25 28 29 32 35 36 +46 47 49 51 52 53 +20 21 24 25 26 28 +48 50 51 54 55 58 +42 41 39 38 37 +60 59 56 53 50 47 46 44 +25 22 20 19 17 16 13 +14 13 11 10 9 7 5 4 +79 76 75 72 71 70 68 +67 64 62 59 57 55 53 50 +28 25 24 23 21 19 +4 7 10 11 12 13 16 +27 24 22 20 19 +37 36 33 32 30 27 +3 5 8 11 14 15 +22 23 25 26 29 32 35 38 +63 65 66 68 69 71 +86 87 88 89 90 93 94 97 +65 63 60 57 56 +48 46 44 42 39 +98 96 94 91 90 87 86 85 +6 9 10 11 13 +88 91 92 94 96 98 +74 77 78 79 81 84 +96 95 93 91 90 87 +33 34 35 37 39 +12 9 7 6 4 +19 21 22 23 26 28 +13 16 17 19 20 21 23 +56 58 59 61 63 66 68 69 +72 70 69 67 64 63 62 59 +63 66 69 71 72 +41 38 37 36 34 31 +76 79 82 83 84 87 89 91 +5 6 8 10 12 15 16 +72 74 77 80 83 84 87 90 +88 85 83 80 78 75 74 73 +46 44 41 39 37 36 33 30 +69 71 74 76 79 82 +89 90 93 95 98 +58 55 54 51 49 48 45 +44 41 38 37 36 35 34 +34 36 37 40 42 +66 68 70 73 75 78 +59 61 62 63 66 67 69 72 +22 21 18 16 14 13 11 9 +15 14 13 12 9 +41 39 38 36 33 30 29 26 +14 15 18 20 22 +32 31 28 26 23 21 +22 24 25 26 28 29 32 +73 76 79 81 84 86 89 90 +13 15 18 20 23 25 27 28 +5 6 8 10 12 13 +17 18 21 24 27 +91 89 87 85 83 81 80 +30 29 26 23 21 19 +34 37 40 43 44 45 48 +38 39 41 42 44 46 49 50 +29 32 33 34 37 39 41 +75 77 80 81 84 87 90 93 +74 73 70 67 66 +10 11 14 16 18 19 21 +30 29 27 25 24 21 +65 68 71 72 73 76 79 +78 75 73 72 70 67 64 +99 98 96 93 91 +71 69 68 67 66 64 62 61 +18 20 22 25 26 27 29 +64 67 69 71 72 75 78 +88 87 84 81 78 76 73 +25 23 22 21 18 +89 86 84 83 82 80 78 +79 76 75 72 70 67 66 63 +67 69 71 74 76 77 +66 63 60 59 56 55 +73 72 69 66 63 61 60 +20 23 24 27 29 30 +96 95 93 92 91 +65 63 62 61 58 +75 76 77 80 83 +31 28 25 22 20 18 15 14 +20 23 26 29 31 34 36 +89 90 91 92 95 96 97 +74 72 69 66 64 63 61 +39 41 44 46 49 +38 36 33 30 27 24 23 20 +78 79 81 82 84 87 +3 4 7 10 12 14 +12 9 8 6 4 3 +95 93 92 91 90 88 87 +44 45 46 47 48 +80 81 82 85 88 +47 44 41 38 37 +55 57 59 61 62 65 66 +52 54 56 57 60 +83 82 80 78 75 +72 70 67 66 63 61 60 58 +43 44 46 47 50 53 54 +15 14 11 9 8 7 +85 83 81 80 78 +19 17 14 12 10 8 5 4 +22 23 25 27 29 31 33 +43 45 47 49 52 54 57 58 +57 56 54 51 50 47 +89 88 86 84 81 80 77 +54 55 57 58 59 61 64 +32 29 28 26 23 21 18 +38 36 35 34 33 +36 38 40 42 44 47 +22 21 20 19 17 16 14 11 +52 54 55 57 60 63 64 +13 15 18 19 21 23 25 +19 21 24 27 28 31 +14 17 20 22 25 +63 61 58 57 54 52 +22 20 18 15 14 13 10 7 +34 36 37 40 41 +15 14 13 11 8 6 5 2 +36 39 40 42 44 45 47 +35 37 40 42 43 44 45 +19 18 16 14 11 9 +38 41 42 44 45 46 +84 85 88 90 93 95 97 +53 52 51 48 45 +37 35 33 32 31 30 27 25 +17 19 20 22 25 28 +9 10 12 14 15 +25 26 29 31 34 36 37 40 +19 20 23 24 26 +48 51 53 56 57 59 60 +74 71 68 66 63 62 59 57 +17 15 12 10 8 6 4 +36 33 30 27 25 22 21 20 +71 72 75 78 80 +67 69 72 73 74 75 77 +67 70 71 74 76 +89 92 94 95 97 +61 59 56 54 52 51 48 +15 17 20 22 25 +26 29 32 34 35 37 40 +22 24 25 28 29 32 +26 25 22 19 16 15 12 +13 16 17 20 22 23 +85 82 79 77 76 75 72 +9 11 13 16 18 20 23 +56 55 54 51 48 +5 8 11 14 15 16 +54 51 48 47 46 45 +60 62 65 68 69 70 73 +22 19 17 15 13 +97 95 94 92 90 87 85 83 +22 19 16 13 12 9 +63 66 67 70 73 75 +94 92 91 88 86 84 83 81 +42 43 45 48 50 53 56 58 +42 44 47 50 53 +15 14 13 12 10 +63 60 58 56 54 51 49 48 +54 52 50 47 44 41 +18 21 23 26 28 30 32 +38 37 35 34 31 28 26 23 +81 79 76 75 73 72 71 68 +46 44 41 38 37 +91 90 87 85 83 +12 14 15 18 20 +54 56 57 60 63 65 +57 56 55 52 51 50 +40 37 35 32 30 28 +61 63 64 65 68 +2 3 4 5 6 9 12 +49 50 51 52 54 +69 71 74 75 76 77 +74 75 77 79 82 85 +17 15 12 11 9 +32 31 28 25 22 21 +27 28 31 34 37 +11 13 16 17 20 22 23 26 +80 79 77 75 74 71 +15 12 11 10 7 6 +87 84 83 81 79 +34 37 38 40 43 45 47 +45 48 49 52 55 57 +54 51 50 49 46 44 43 +37 40 41 44 47 49 50 +16 13 12 10 8 6 3 +84 86 87 90 93 96 99 +59 57 54 53 52 49 48 +60 57 55 54 51 50 48 +29 30 31 33 34 36 +66 67 70 71 74 76 79 81 +84 86 88 91 94 96 +47 44 43 40 39 +80 79 77 75 73 72 71 68 +17 15 13 12 9 +81 79 76 74 71 70 67 +22 20 19 17 15 +56 58 60 62 63 66 67 +26 28 29 31 32 33 34 +48 45 43 42 41 38 37 +41 44 47 50 53 56 +71 70 68 66 63 +50 49 47 44 43 41 39 +16 13 10 8 7 6 5 3 +40 37 34 31 28 26 25 22 +79 82 84 86 87 90 92 95 +90 87 86 85 82 79 78 75 +48 50 51 54 56 +62 59 56 53 52 +52 55 57 60 61 +39 42 45 48 50 52 +68 67 65 64 63 60 +8 10 13 14 17 20 21 23 +23 24 25 27 28 30 33 34 +80 79 77 74 72 70 67 65 +3 4 7 9 12 13 15 16 +65 67 70 72 75 +64 63 60 57 55 52 +82 79 78 76 73 70 67 64 +91 89 86 83 80 79 78 76 +18 15 13 11 8 6 5 3 +71 69 68 67 65 62 59 +58 60 62 64 66 69 +53 52 49 46 44 41 40 37 +52 53 54 57 58 61 64 67 +5 7 9 12 14 16 19 +62 64 65 68 71 73 74 75 +32 34 36 38 40 +39 40 42 45 48 49 52 55 +10 12 15 18 20 21 22 +44 41 40 38 35 32 29 +74 75 76 77 79 +14 13 11 9 8 7 +16 18 19 20 21 24 +19 16 13 10 7 6 +54 57 58 59 62 63 64 +12 15 16 19 21 23 26 28 +61 58 57 55 54 +24 21 19 18 16 +54 51 50 49 46 +33 36 39 41 44 +32 33 36 38 41 44 47 +44 47 49 51 52 +20 22 25 28 29 31 34 +46 43 40 39 36 34 33 32 +4 7 9 12 15 +18 16 14 12 9 8 6 +17 14 11 8 5 +51 50 49 48 45 +51 50 48 47 45 44 43 +48 46 43 42 41 +70 71 74 76 77 78 +42 41 38 37 36 34 +43 42 39 37 35 32 30 27 +73 70 68 67 65 64 61 60 +85 86 89 91 92 94 +53 56 58 59 60 61 63 66 +83 84 86 88 91 92 +91 90 89 86 85 84 83 +4 6 9 12 14 15 18 +89 88 85 82 79 77 +31 29 26 25 24 +28 30 33 35 36 37 39 40 +66 65 64 62 59 +25 23 21 19 18 17 +93 92 91 89 88 86 84 81 +19 20 22 24 27 28 31 34 +24 25 27 28 30 +7 10 11 14 17 18 20 +26 27 30 32 35 +72 69 66 65 62 59 57 +96 94 93 92 90 +11 13 16 19 20 23 24 26 +50 49 47 44 43 42 40 39 +31 29 27 24 21 20 19 18 +53 55 58 61 63 66 68 +57 60 63 65 67 +73 74 75 77 78 80 +21 20 17 14 11 9 7 +56 58 61 64 65 66 67 +77 75 72 69 67 65 64 +53 55 57 58 61 +30 27 25 23 20 17 +45 44 42 40 37 36 33 +34 31 28 26 23 21 20 17 +45 46 48 50 52 +51 52 53 54 55 58 +39 36 35 33 31 +56 59 61 64 66 69 71 72 +94 92 89 88 85 83 +4 7 10 12 15 17 18 21 +74 76 79 82 83 84 +71 69 66 63 61 60 57 +82 85 86 88 90 92 94 96 +69 71 73 74 75 +35 38 40 41 44 46 49 +78 80 81 82 84 85 87 88 +29 32 34 35 38 +26 24 21 19 17 16 13 11 +39 41 43 45 48 +58 60 61 62 63 64 67 68 +61 64 66 67 70 73 +85 84 83 81 80 +66 63 62 61 59 57 55 +38 41 42 43 46 49 +47 44 41 40 38 35 32 30 +41 39 38 37 36 +85 88 91 93 95 +7 10 11 13 16 19 22 +51 50 48 47 44 43 40 +47 46 43 41 39 38 36 +93 92 91 89 87 85 83 82 +83 80 79 77 74 73 70 +46 44 41 39 37 36 33 32 +29 32 33 35 38 +21 18 16 15 12 9 8 +25 27 29 31 33 +51 53 56 58 59 62 64 +57 58 61 63 65 67 +49 48 47 45 44 41 +42 44 47 48 49 +69 68 66 63 61 60 +27 24 22 21 20 +81 78 77 74 71 70 67 64 +41 44 46 49 50 +13 11 9 6 5 3 +53 52 50 48 47 44 43 42 +48 45 42 41 38 36 34 +62 59 58 57 56 55 +51 50 47 44 42 39 36 +3 4 7 10 13 16 +16 19 20 22 25 +93 91 90 87 85 +87 86 83 80 77 +84 82 80 79 78 76 75 73 +25 27 28 29 31 32 35 38 +82 81 78 75 74 72 70 +84 85 86 89 90 +80 81 82 85 87 89 +1 2 5 8 10 +74 76 78 81 82 83 84 86 +52 54 55 56 57 58 +17 20 22 24 26 28 30 31 +73 72 69 68 65 62 +65 62 60 59 56 55 +54 52 50 48 46 +44 43 42 40 39 +67 68 70 73 74 77 79 81 +91 90 88 86 83 82 81 80 +36 38 39 40 43 45 47 49 +29 28 25 24 23 20 +39 40 43 46 47 49 +83 81 79 76 74 73 +45 43 42 41 40 37 +38 41 42 44 45 47 48 +34 35 38 41 42 43 44 45 +62 59 56 55 52 49 48 +11 13 16 17 20 21 +49 46 45 43 41 40 38 +54 52 51 49 46 44 +96 94 92 89 88 86 84 +41 38 36 33 31 28 25 +21 22 25 26 29 30 31 +27 28 29 32 35 37 39 41 +55 58 60 63 66 68 69 71 +18 15 14 12 11 10 +77 75 74 71 70 +23 25 28 30 31 32 +14 15 17 20 23 25 28 +46 48 50 51 53 55 +72 71 70 69 68 +60 57 56 54 53 51 +93 92 89 86 83 +66 63 62 61 60 59 58 +28 31 34 37 38 +78 79 82 84 85 88 90 92 +60 62 65 67 70 71 +57 60 62 65 67 70 72 +5 8 11 14 15 +63 65 67 69 71 74 75 77 +79 77 74 72 70 +55 58 60 62 65 +28 30 32 34 37 +19 21 24 25 27 +67 65 62 59 58 56 +94 93 91 89 86 83 81 79 +42 41 40 39 37 +16 19 21 23 26 +67 64 62 59 56 +66 64 61 59 56 54 53 51 +62 63 64 67 68 +87 84 81 79 76 74 71 68 +7 8 11 14 15 +37 39 42 43 45 +21 24 26 28 31 33 36 39 +48 50 53 56 59 61 64 65 +63 64 65 66 69 70 +58 60 63 64 65 +5 6 7 10 11 14 17 19 +51 48 47 46 44 +25 28 30 32 35 37 39 +32 31 28 26 25 +91 89 88 85 83 +91 90 87 85 84 83 +39 38 35 34 31 29 +50 51 53 54 56 +59 60 63 65 66 +25 27 28 30 31 +57 54 53 51 50 +50 53 56 57 60 62 65 68 +63 61 60 58 55 52 50 +60 62 64 65 66 68 69 +43 45 48 49 51 52 55 +65 66 68 71 74 77 +24 25 26 28 29 30 32 35 +89 90 92 95 97 +83 84 86 88 89 92 94 +31 32 34 35 37 40 42 43 +73 76 78 79 81 +63 64 67 68 70 73 75 78 +86 84 81 78 77 75 +43 42 40 38 35 +62 64 65 68 71 +68 70 72 75 78 80 83 +77 80 82 85 88 90 91 94 +11 9 8 7 6 +79 80 83 84 87 +44 45 46 47 50 52 55 56 +32 34 35 37 38 40 43 +57 54 51 49 46 45 44 42 +41 39 38 37 34 31 29 26 +81 82 83 85 88 90 91 93 +62 64 66 69 72 73 76 +27 28 30 31 32 33 34 36 +25 27 30 31 33 36 +99 96 93 92 90 +34 33 30 27 25 23 22 21 +27 24 23 20 18 15 13 +91 90 88 87 84 +62 59 56 55 52 49 47 +19 17 16 15 14 13 +95 92 90 87 84 82 79 76 +12 11 9 8 6 3 +15 18 20 22 25 26 27 29 +51 49 47 46 43 40 +62 65 67 68 71 +67 68 71 74 77 79 82 84 +47 45 42 39 37 35 32 31 +51 48 47 46 44 42 41 39 +45 46 49 50 51 52 +86 89 90 92 93 +66 67 68 71 72 75 \ No newline at end of file diff --git a/2024/02/Rust/.gitignore b/2024/02/Rust/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/2024/02/Rust/.gitignore @@ -0,0 +1 @@ +/target diff --git a/2024/02/Rust/Cargo.lock b/2024/02/Rust/Cargo.lock new file mode 100644 index 0000000..c257f43 --- /dev/null +++ b/2024/02/Rust/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "day_2" +version = "0.1.0" diff --git a/2024/02/Rust/Cargo.toml b/2024/02/Rust/Cargo.toml new file mode 100644 index 0000000..ea27cc1 --- /dev/null +++ b/2024/02/Rust/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "day_2" +version = "0.1.0" +edition = "2021" + +[dependencies] diff --git a/2024/02/Rust/src/example.txt b/2024/02/Rust/src/example.txt new file mode 100644 index 0000000..82cd679 --- /dev/null +++ b/2024/02/Rust/src/example.txt @@ -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/2024/02/Rust/src/input.txt b/2024/02/Rust/src/input.txt new file mode 100644 index 0000000..f70253f --- /dev/null +++ b/2024/02/Rust/src/input.txt @@ -0,0 +1,1000 @@ +44 47 50 51 53 54 53 +70 73 75 77 80 81 84 84 +1 3 4 7 10 13 16 20 +47 49 52 53 55 57 60 65 +69 70 71 70 71 +22 23 20 21 24 27 24 +90 92 93 94 95 93 94 94 +16 18 15 16 20 +47 48 51 50 55 +27 28 31 31 32 34 +35 36 36 38 39 41 38 +32 33 33 36 38 39 39 +11 14 14 17 20 22 23 27 +65 68 71 71 72 79 +68 69 71 74 76 79 83 84 +51 52 56 58 59 61 64 61 +89 91 94 98 98 +45 48 51 55 59 +82 85 89 90 91 93 99 +41 42 44 49 51 +74 76 77 82 81 +33 36 37 43 45 48 48 +10 12 15 18 23 27 +63 66 72 75 76 81 +71 68 71 73 74 75 +78 75 76 77 76 +8 6 9 11 11 +39 37 38 41 43 47 +87 86 87 90 96 +32 31 32 30 33 35 +17 16 17 18 16 17 14 +63 60 62 61 62 65 65 +77 76 77 78 75 78 80 84 +9 7 10 11 8 15 +48 46 47 49 52 52 54 +17 16 17 19 20 23 23 22 +12 9 10 12 12 13 13 +20 18 20 20 24 +69 66 66 67 72 +9 7 10 12 16 17 18 +19 17 18 19 21 25 28 27 +55 54 57 58 62 62 +55 54 58 61 65 +51 49 53 55 58 60 65 +59 58 60 65 68 +82 81 88 90 93 96 93 +17 14 17 18 23 23 +53 50 52 54 61 65 +26 24 27 28 33 34 36 43 +18 18 19 20 21 22 +63 63 65 67 68 71 70 +3 3 6 7 10 10 +82 82 83 86 89 93 +37 37 40 43 50 +53 53 54 51 52 54 56 +86 86 83 84 83 +37 37 40 42 41 41 +9 9 12 13 10 12 13 17 +57 57 59 61 60 63 65 71 +65 65 67 67 70 72 +23 23 24 24 23 +94 94 96 98 98 99 99 +49 49 50 53 53 55 57 61 +54 54 54 57 64 +70 70 74 77 78 +46 46 47 51 48 +9 9 10 14 14 +78 78 80 81 84 88 92 +49 49 50 53 55 56 60 67 +70 70 77 79 82 85 88 +7 7 14 15 13 +46 46 52 55 58 59 62 62 +16 16 21 22 26 +28 28 29 31 36 43 +2 6 9 10 11 12 +56 60 62 64 63 +60 64 65 68 71 73 74 74 +27 31 33 34 37 38 41 45 +6 10 11 14 15 18 21 26 +14 18 19 22 19 22 24 +17 21 23 26 27 26 28 27 +85 89 92 93 91 94 94 +20 24 27 24 28 +47 51 52 51 52 53 56 62 +18 22 24 24 25 28 +28 32 35 38 38 40 39 +43 47 47 49 50 52 52 +45 49 52 52 56 +33 37 38 38 45 +66 70 73 75 79 81 82 83 +12 16 20 22 24 25 26 25 +54 58 59 61 65 68 71 71 +14 18 20 24 28 +30 34 36 40 43 45 50 +22 26 27 29 31 32 38 40 +59 63 66 67 70 73 79 76 +40 44 47 49 50 55 58 58 +46 50 51 53 58 62 +34 38 40 43 48 55 +53 59 61 64 67 70 +47 52 53 55 56 54 +31 37 39 41 43 45 45 +21 27 29 31 33 37 +18 24 26 28 30 33 36 41 +29 36 37 38 36 38 +2 9 7 9 12 14 15 12 +72 77 76 77 80 82 85 85 +42 48 50 48 50 53 57 +75 81 83 81 84 87 90 97 +17 22 24 27 27 30 33 34 +42 48 48 51 54 52 +82 87 89 89 91 92 93 93 +36 42 44 45 48 50 50 54 +51 58 60 62 62 63 68 +15 20 23 24 26 30 33 +18 25 27 31 30 +68 73 77 78 81 81 +6 12 13 17 21 +8 15 19 21 23 26 31 +8 15 17 22 24 27 +19 25 32 35 37 38 40 39 +55 60 61 63 70 71 71 +43 50 57 60 61 63 67 +12 17 19 25 26 28 34 +96 94 93 92 91 90 87 90 +75 74 71 70 69 66 63 63 +72 69 68 67 66 62 +77 74 72 69 67 66 65 58 +43 42 40 37 40 38 37 36 +99 96 97 96 95 93 92 93 +89 86 85 86 83 81 81 +48 46 43 42 41 42 40 36 +69 66 64 61 64 62 61 55 +98 95 93 90 90 87 84 81 +30 27 24 24 23 25 +33 30 28 28 28 +58 57 54 54 52 48 +71 69 68 68 65 62 57 +36 33 32 31 27 24 +94 91 87 86 84 81 78 79 +35 34 31 28 27 24 20 20 +77 76 75 71 69 65 +53 52 48 45 44 41 39 33 +99 98 96 95 88 85 83 80 +79 76 69 66 64 61 62 +58 57 55 49 48 48 +40 39 33 32 30 27 23 +93 90 89 88 87 81 74 +37 39 36 35 32 29 28 +96 99 96 94 96 +47 48 47 45 42 39 39 +33 35 34 32 28 +17 19 16 14 7 +82 83 81 78 79 78 75 72 +25 27 26 25 28 26 29 +23 26 29 28 25 25 +85 88 91 89 88 86 85 81 +81 83 82 79 82 79 77 72 +44 47 47 45 43 +80 83 82 82 85 +38 40 39 38 37 37 35 35 +86 88 85 83 83 82 78 +27 29 28 28 22 +49 51 49 45 42 +37 39 37 33 30 27 30 +63 65 62 58 58 +43 45 42 40 39 36 32 28 +33 34 32 29 25 23 17 +33 35 33 31 28 22 19 +39 41 38 31 30 28 29 +15 16 15 8 7 6 6 +24 26 25 20 16 +92 93 90 88 82 76 +54 54 51 49 46 44 42 40 +37 37 36 35 37 +44 44 43 42 41 41 +32 32 31 30 27 24 20 +34 34 32 29 23 +94 94 97 94 92 90 +43 43 40 42 40 37 40 +36 36 38 36 35 32 32 +66 66 63 66 65 63 59 +6 6 3 6 1 +48 48 45 44 44 42 41 40 +43 43 42 42 39 42 +52 52 49 47 44 44 44 +31 31 28 28 26 22 +47 47 45 45 38 +79 79 75 72 71 69 +43 43 42 39 37 34 30 33 +21 21 17 14 14 +69 69 66 62 60 57 56 52 +42 42 38 35 32 25 +94 94 91 86 84 +25 25 23 20 14 11 8 11 +27 27 21 20 18 16 16 +80 80 79 73 72 71 67 +38 38 35 32 25 19 +48 44 43 40 38 37 36 34 +17 13 11 9 6 5 8 +59 55 52 49 47 46 46 +92 88 87 84 82 79 76 72 +74 70 69 66 63 60 57 51 +90 86 85 88 87 +82 78 75 76 75 76 +72 68 71 69 66 65 65 +79 75 74 72 70 68 70 66 +55 51 52 49 42 +34 30 30 29 28 25 24 +72 68 67 64 64 67 +77 73 72 72 70 70 +85 81 80 77 77 76 72 +45 41 39 38 35 35 33 27 +31 27 25 23 20 16 15 +69 65 61 59 58 60 +54 50 49 45 43 43 +64 60 59 57 53 51 49 45 +31 27 26 22 17 +78 74 67 64 62 61 60 +43 39 37 32 35 +81 77 71 70 67 64 62 62 +71 67 65 64 63 58 56 52 +52 48 47 45 42 39 32 27 +97 90 88 86 84 81 78 77 +15 10 9 7 6 9 +43 37 35 33 32 32 +89 84 81 78 76 75 71 +35 28 25 22 19 16 14 7 +66 59 56 57 55 52 51 49 +79 74 72 73 76 +83 78 80 77 74 72 72 +62 55 53 55 51 +95 89 87 89 86 79 +31 24 23 22 20 18 18 16 +94 89 87 87 85 82 79 80 +35 29 29 28 28 +45 39 39 36 35 31 +30 23 23 21 19 16 11 +73 68 64 63 62 59 58 55 +57 50 46 45 42 45 +28 22 21 19 15 12 10 10 +61 56 53 49 45 +57 52 50 47 46 44 40 35 +64 57 54 48 47 44 43 +27 21 18 11 10 9 10 +51 45 42 39 36 29 26 26 +95 88 85 79 75 +41 34 33 27 22 +79 80 83 84 86 92 90 +46 39 36 33 29 25 +54 50 49 46 45 44 47 +94 89 88 82 82 +16 19 22 25 27 31 32 34 +92 89 90 96 96 +83 83 82 79 76 69 68 +80 77 79 80 80 87 +41 44 45 48 49 56 60 +28 28 27 23 19 +87 88 90 93 94 98 99 97 +6 10 7 10 8 +13 13 18 20 24 +57 57 57 58 62 +75 77 79 82 79 80 83 +62 59 63 65 68 69 72 +89 85 84 81 79 77 74 72 +49 50 49 46 42 40 38 34 +31 28 30 36 38 +38 34 34 31 29 23 +95 96 99 97 96 95 94 96 +98 94 91 88 87 86 85 85 +69 69 66 64 62 61 54 +47 47 49 50 51 51 51 +31 27 25 28 27 26 22 +73 76 79 81 85 +12 15 15 13 11 4 +57 64 65 67 72 75 77 +31 29 26 25 26 +66 73 79 81 79 +59 62 62 59 56 56 +78 74 73 73 70 67 64 +23 23 23 20 19 17 11 +68 68 66 64 62 65 63 64 +63 59 62 60 57 54 54 +31 37 35 37 38 38 +44 45 42 41 39 41 +22 22 25 26 28 +49 51 44 43 41 38 37 40 +19 18 21 21 25 +89 83 79 77 74 76 +98 97 96 94 91 88 83 +89 88 85 82 79 76 76 71 +71 68 67 65 61 60 58 +32 36 37 44 45 47 49 55 +14 12 10 12 12 +19 17 18 20 21 21 19 +15 12 17 18 21 23 30 +86 87 86 81 80 +65 65 64 62 64 62 60 56 +4 6 5 8 8 +70 67 63 60 60 +41 42 42 45 49 +45 47 54 55 58 58 +81 85 87 88 89 93 +83 84 83 80 79 78 71 65 +63 60 59 61 57 +57 57 54 53 51 51 48 +4 3 5 6 7 7 +70 70 68 69 68 +57 51 48 43 41 +74 78 81 83 86 85 +56 60 61 62 65 68 +10 11 11 14 15 15 +86 90 91 92 93 94 99 98 +43 47 50 51 54 61 +36 29 27 26 23 22 19 13 +56 57 54 51 51 49 46 44 +46 40 37 34 34 28 +56 61 64 65 64 65 66 68 +13 11 8 5 1 +79 79 77 77 76 73 72 72 +37 35 34 31 31 31 +61 57 53 51 48 47 +26 22 21 19 17 12 +37 33 31 28 25 23 19 +25 31 34 37 38 37 38 42 +16 23 26 27 30 33 37 37 +65 60 57 51 48 46 42 +3 2 5 2 6 +56 56 57 59 61 64 70 +78 78 76 73 70 69 63 63 +88 89 86 82 82 +29 31 29 29 25 +70 66 64 62 56 55 53 +35 34 35 36 38 36 +2 6 7 8 11 14 16 16 +50 48 49 51 52 57 58 62 +49 49 52 56 58 62 +71 66 63 61 57 +89 91 92 95 95 94 +25 30 33 36 43 +82 84 85 86 87 89 91 97 +42 42 40 39 32 28 +63 67 70 72 76 78 79 81 +66 66 67 69 70 74 +47 40 38 38 37 36 34 34 +14 14 13 14 16 17 17 +68 68 66 63 61 60 57 57 +51 52 56 59 61 68 +40 42 40 39 36 35 34 30 +28 25 18 15 13 9 +81 85 83 84 88 +27 23 19 18 17 15 11 +40 41 42 48 49 +61 61 62 61 58 55 55 +33 34 33 36 29 +29 27 26 20 18 16 +28 23 20 18 15 12 10 8 +5 5 8 9 10 10 12 17 +51 56 56 58 61 67 +17 21 23 24 24 26 29 26 +12 18 20 21 23 25 25 +16 16 17 20 22 23 27 28 +20 18 15 14 14 10 +40 34 33 31 30 33 31 29 +39 38 41 44 46 44 50 +15 15 19 22 23 30 +57 61 58 60 62 69 +72 79 82 85 82 +58 56 54 52 49 47 49 47 +8 10 15 16 21 +76 75 78 82 83 80 +93 95 94 91 84 80 +87 85 86 88 91 94 95 99 +88 88 86 84 83 79 +74 75 78 79 82 82 +58 59 61 65 67 69 69 +57 64 66 69 73 +81 77 72 71 68 62 +73 73 68 67 66 65 63 58 +56 56 53 52 48 50 +56 55 53 50 45 43 42 42 +26 24 20 19 17 12 +62 62 63 64 62 64 62 +47 42 38 37 34 32 26 +55 59 62 63 61 63 64 +81 78 77 73 70 71 +46 46 48 49 46 49 55 +73 70 70 69 72 +62 62 63 62 61 56 +74 78 81 78 81 81 +90 86 84 83 82 78 78 +2 9 12 14 14 15 13 +95 91 88 88 89 +45 45 43 41 39 33 31 33 +43 42 43 45 42 44 45 45 +20 24 27 33 37 +85 81 80 78 78 74 +7 10 8 10 9 +39 41 42 40 37 37 +76 73 72 66 68 +34 40 41 44 49 53 +92 90 93 97 97 +61 68 70 72 69 72 74 72 +37 33 31 30 29 24 20 +24 20 16 14 11 10 9 4 +72 76 78 84 85 86 86 +21 24 23 20 17 16 18 14 +26 28 25 23 20 20 +4 4 7 8 12 14 12 +92 91 88 86 85 83 80 +95 93 91 90 89 +83 84 86 89 92 95 +61 62 65 67 70 +91 88 85 84 81 +6 7 9 10 13 +81 82 85 88 91 93 95 +74 73 70 67 66 64 +55 57 59 62 65 +12 10 9 6 4 2 +48 46 44 41 40 39 +98 95 94 92 89 +38 39 40 41 42 44 45 +19 22 23 25 28 30 32 34 +56 59 61 63 65 66 67 +21 23 24 26 27 30 +9 11 14 15 18 +3 6 8 10 11 +24 23 20 18 17 15 13 +17 15 14 11 10 7 4 2 +49 48 45 42 40 37 34 33 +49 50 51 53 55 +18 16 13 11 8 7 4 +75 73 70 68 67 64 61 58 +17 14 12 10 9 7 +8 10 12 13 15 18 20 21 +77 76 75 73 71 70 69 +67 66 63 62 59 58 +17 18 20 22 24 +67 65 63 60 59 +2 4 7 9 10 11 14 +39 37 35 32 30 +31 33 35 36 37 39 +83 82 79 78 75 72 71 69 +46 45 42 40 39 38 36 33 +36 38 39 40 41 +40 42 45 47 49 +46 45 43 42 40 38 36 34 +37 35 32 31 30 28 +34 33 32 30 28 26 23 +66 69 71 72 73 75 78 +63 60 57 55 54 52 51 +59 61 63 64 66 +20 17 16 14 11 8 +99 97 94 91 89 87 84 82 +92 90 87 86 84 81 79 76 +53 51 48 47 44 41 39 36 +88 90 91 94 96 97 +14 11 9 8 5 +4 5 6 7 9 12 15 +89 87 85 83 82 79 77 76 +2 5 8 9 10 11 14 17 +10 12 14 16 18 21 +51 54 57 60 62 64 66 68 +46 48 49 50 53 +5 7 8 11 14 16 17 20 +73 71 70 69 67 64 61 58 +94 91 89 86 84 83 80 +87 90 91 92 95 96 97 +25 23 20 17 15 13 +70 71 73 76 79 81 83 +72 70 69 66 65 62 60 +97 95 92 91 89 87 +59 58 57 56 54 +61 60 57 55 52 51 +93 90 87 84 83 +8 11 14 15 18 20 +25 26 29 32 35 +14 15 16 19 20 22 23 24 +77 75 73 72 71 +79 82 83 86 87 89 91 94 +40 39 36 34 31 28 26 +85 87 90 91 94 95 +53 50 49 46 45 43 40 37 +72 74 77 80 81 84 86 +68 65 63 61 58 56 54 +17 16 14 13 10 +82 81 79 76 75 72 71 68 +2 3 6 8 11 12 13 +56 53 50 48 47 +63 65 67 69 71 74 77 +38 40 41 44 47 +89 86 84 81 80 77 76 +65 62 61 59 58 +53 55 56 58 61 63 65 +69 71 74 75 77 79 82 +78 76 73 72 71 69 68 67 +71 74 77 78 81 82 84 87 +14 12 9 8 5 3 +84 81 79 76 74 73 71 70 +58 57 55 53 51 49 47 +59 62 64 65 67 69 +17 14 12 10 8 5 4 +46 43 41 39 36 33 32 +66 65 62 60 57 +14 13 11 10 9 7 +3 5 6 9 12 13 16 +38 39 41 42 43 45 47 48 +19 22 23 25 27 30 +41 38 36 35 33 32 29 26 +34 36 37 39 42 +40 37 34 33 32 +26 23 21 20 18 16 +75 76 77 79 82 +75 77 78 79 80 83 +67 70 72 73 74 77 80 82 +50 48 45 42 39 +69 68 67 65 64 63 61 +15 14 12 10 7 +42 40 37 36 33 +27 24 22 21 19 17 14 +57 59 62 64 67 70 +14 17 20 22 24 25 26 +32 29 27 24 23 21 18 15 +65 67 70 71 74 +1 4 5 8 11 +79 80 81 84 87 90 92 94 +11 10 9 7 5 3 2 +41 40 37 36 35 32 29 28 +61 63 66 68 69 72 74 +42 41 40 39 38 36 33 30 +36 35 33 32 31 30 28 +12 13 15 18 21 23 +62 61 58 55 53 52 +78 76 73 71 68 66 +22 24 26 28 31 33 +31 29 26 24 21 19 +7 10 12 13 15 17 +8 9 11 13 15 16 +62 61 60 58 56 +11 9 6 4 1 +72 74 76 77 78 81 83 +53 55 56 58 60 63 65 67 +42 44 46 48 49 52 +22 21 19 18 15 13 11 9 +42 45 46 48 51 52 +49 48 47 46 45 43 +11 9 7 4 3 +86 85 84 81 79 77 74 +22 24 25 28 29 32 35 36 +46 47 49 51 52 53 +20 21 24 25 26 28 +48 50 51 54 55 58 +42 41 39 38 37 +60 59 56 53 50 47 46 44 +25 22 20 19 17 16 13 +14 13 11 10 9 7 5 4 +79 76 75 72 71 70 68 +67 64 62 59 57 55 53 50 +28 25 24 23 21 19 +4 7 10 11 12 13 16 +27 24 22 20 19 +37 36 33 32 30 27 +3 5 8 11 14 15 +22 23 25 26 29 32 35 38 +63 65 66 68 69 71 +86 87 88 89 90 93 94 97 +65 63 60 57 56 +48 46 44 42 39 +98 96 94 91 90 87 86 85 +6 9 10 11 13 +88 91 92 94 96 98 +74 77 78 79 81 84 +96 95 93 91 90 87 +33 34 35 37 39 +12 9 7 6 4 +19 21 22 23 26 28 +13 16 17 19 20 21 23 +56 58 59 61 63 66 68 69 +72 70 69 67 64 63 62 59 +63 66 69 71 72 +41 38 37 36 34 31 +76 79 82 83 84 87 89 91 +5 6 8 10 12 15 16 +72 74 77 80 83 84 87 90 +88 85 83 80 78 75 74 73 +46 44 41 39 37 36 33 30 +69 71 74 76 79 82 +89 90 93 95 98 +58 55 54 51 49 48 45 +44 41 38 37 36 35 34 +34 36 37 40 42 +66 68 70 73 75 78 +59 61 62 63 66 67 69 72 +22 21 18 16 14 13 11 9 +15 14 13 12 9 +41 39 38 36 33 30 29 26 +14 15 18 20 22 +32 31 28 26 23 21 +22 24 25 26 28 29 32 +73 76 79 81 84 86 89 90 +13 15 18 20 23 25 27 28 +5 6 8 10 12 13 +17 18 21 24 27 +91 89 87 85 83 81 80 +30 29 26 23 21 19 +34 37 40 43 44 45 48 +38 39 41 42 44 46 49 50 +29 32 33 34 37 39 41 +75 77 80 81 84 87 90 93 +74 73 70 67 66 +10 11 14 16 18 19 21 +30 29 27 25 24 21 +65 68 71 72 73 76 79 +78 75 73 72 70 67 64 +99 98 96 93 91 +71 69 68 67 66 64 62 61 +18 20 22 25 26 27 29 +64 67 69 71 72 75 78 +88 87 84 81 78 76 73 +25 23 22 21 18 +89 86 84 83 82 80 78 +79 76 75 72 70 67 66 63 +67 69 71 74 76 77 +66 63 60 59 56 55 +73 72 69 66 63 61 60 +20 23 24 27 29 30 +96 95 93 92 91 +65 63 62 61 58 +75 76 77 80 83 +31 28 25 22 20 18 15 14 +20 23 26 29 31 34 36 +89 90 91 92 95 96 97 +74 72 69 66 64 63 61 +39 41 44 46 49 +38 36 33 30 27 24 23 20 +78 79 81 82 84 87 +3 4 7 10 12 14 +12 9 8 6 4 3 +95 93 92 91 90 88 87 +44 45 46 47 48 +80 81 82 85 88 +47 44 41 38 37 +55 57 59 61 62 65 66 +52 54 56 57 60 +83 82 80 78 75 +72 70 67 66 63 61 60 58 +43 44 46 47 50 53 54 +15 14 11 9 8 7 +85 83 81 80 78 +19 17 14 12 10 8 5 4 +22 23 25 27 29 31 33 +43 45 47 49 52 54 57 58 +57 56 54 51 50 47 +89 88 86 84 81 80 77 +54 55 57 58 59 61 64 +32 29 28 26 23 21 18 +38 36 35 34 33 +36 38 40 42 44 47 +22 21 20 19 17 16 14 11 +52 54 55 57 60 63 64 +13 15 18 19 21 23 25 +19 21 24 27 28 31 +14 17 20 22 25 +63 61 58 57 54 52 +22 20 18 15 14 13 10 7 +34 36 37 40 41 +15 14 13 11 8 6 5 2 +36 39 40 42 44 45 47 +35 37 40 42 43 44 45 +19 18 16 14 11 9 +38 41 42 44 45 46 +84 85 88 90 93 95 97 +53 52 51 48 45 +37 35 33 32 31 30 27 25 +17 19 20 22 25 28 +9 10 12 14 15 +25 26 29 31 34 36 37 40 +19 20 23 24 26 +48 51 53 56 57 59 60 +74 71 68 66 63 62 59 57 +17 15 12 10 8 6 4 +36 33 30 27 25 22 21 20 +71 72 75 78 80 +67 69 72 73 74 75 77 +67 70 71 74 76 +89 92 94 95 97 +61 59 56 54 52 51 48 +15 17 20 22 25 +26 29 32 34 35 37 40 +22 24 25 28 29 32 +26 25 22 19 16 15 12 +13 16 17 20 22 23 +85 82 79 77 76 75 72 +9 11 13 16 18 20 23 +56 55 54 51 48 +5 8 11 14 15 16 +54 51 48 47 46 45 +60 62 65 68 69 70 73 +22 19 17 15 13 +97 95 94 92 90 87 85 83 +22 19 16 13 12 9 +63 66 67 70 73 75 +94 92 91 88 86 84 83 81 +42 43 45 48 50 53 56 58 +42 44 47 50 53 +15 14 13 12 10 +63 60 58 56 54 51 49 48 +54 52 50 47 44 41 +18 21 23 26 28 30 32 +38 37 35 34 31 28 26 23 +81 79 76 75 73 72 71 68 +46 44 41 38 37 +91 90 87 85 83 +12 14 15 18 20 +54 56 57 60 63 65 +57 56 55 52 51 50 +40 37 35 32 30 28 +61 63 64 65 68 +2 3 4 5 6 9 12 +49 50 51 52 54 +69 71 74 75 76 77 +74 75 77 79 82 85 +17 15 12 11 9 +32 31 28 25 22 21 +27 28 31 34 37 +11 13 16 17 20 22 23 26 +80 79 77 75 74 71 +15 12 11 10 7 6 +87 84 83 81 79 +34 37 38 40 43 45 47 +45 48 49 52 55 57 +54 51 50 49 46 44 43 +37 40 41 44 47 49 50 +16 13 12 10 8 6 3 +84 86 87 90 93 96 99 +59 57 54 53 52 49 48 +60 57 55 54 51 50 48 +29 30 31 33 34 36 +66 67 70 71 74 76 79 81 +84 86 88 91 94 96 +47 44 43 40 39 +80 79 77 75 73 72 71 68 +17 15 13 12 9 +81 79 76 74 71 70 67 +22 20 19 17 15 +56 58 60 62 63 66 67 +26 28 29 31 32 33 34 +48 45 43 42 41 38 37 +41 44 47 50 53 56 +71 70 68 66 63 +50 49 47 44 43 41 39 +16 13 10 8 7 6 5 3 +40 37 34 31 28 26 25 22 +79 82 84 86 87 90 92 95 +90 87 86 85 82 79 78 75 +48 50 51 54 56 +62 59 56 53 52 +52 55 57 60 61 +39 42 45 48 50 52 +68 67 65 64 63 60 +8 10 13 14 17 20 21 23 +23 24 25 27 28 30 33 34 +80 79 77 74 72 70 67 65 +3 4 7 9 12 13 15 16 +65 67 70 72 75 +64 63 60 57 55 52 +82 79 78 76 73 70 67 64 +91 89 86 83 80 79 78 76 +18 15 13 11 8 6 5 3 +71 69 68 67 65 62 59 +58 60 62 64 66 69 +53 52 49 46 44 41 40 37 +52 53 54 57 58 61 64 67 +5 7 9 12 14 16 19 +62 64 65 68 71 73 74 75 +32 34 36 38 40 +39 40 42 45 48 49 52 55 +10 12 15 18 20 21 22 +44 41 40 38 35 32 29 +74 75 76 77 79 +14 13 11 9 8 7 +16 18 19 20 21 24 +19 16 13 10 7 6 +54 57 58 59 62 63 64 +12 15 16 19 21 23 26 28 +61 58 57 55 54 +24 21 19 18 16 +54 51 50 49 46 +33 36 39 41 44 +32 33 36 38 41 44 47 +44 47 49 51 52 +20 22 25 28 29 31 34 +46 43 40 39 36 34 33 32 +4 7 9 12 15 +18 16 14 12 9 8 6 +17 14 11 8 5 +51 50 49 48 45 +51 50 48 47 45 44 43 +48 46 43 42 41 +70 71 74 76 77 78 +42 41 38 37 36 34 +43 42 39 37 35 32 30 27 +73 70 68 67 65 64 61 60 +85 86 89 91 92 94 +53 56 58 59 60 61 63 66 +83 84 86 88 91 92 +91 90 89 86 85 84 83 +4 6 9 12 14 15 18 +89 88 85 82 79 77 +31 29 26 25 24 +28 30 33 35 36 37 39 40 +66 65 64 62 59 +25 23 21 19 18 17 +93 92 91 89 88 86 84 81 +19 20 22 24 27 28 31 34 +24 25 27 28 30 +7 10 11 14 17 18 20 +26 27 30 32 35 +72 69 66 65 62 59 57 +96 94 93 92 90 +11 13 16 19 20 23 24 26 +50 49 47 44 43 42 40 39 +31 29 27 24 21 20 19 18 +53 55 58 61 63 66 68 +57 60 63 65 67 +73 74 75 77 78 80 +21 20 17 14 11 9 7 +56 58 61 64 65 66 67 +77 75 72 69 67 65 64 +53 55 57 58 61 +30 27 25 23 20 17 +45 44 42 40 37 36 33 +34 31 28 26 23 21 20 17 +45 46 48 50 52 +51 52 53 54 55 58 +39 36 35 33 31 +56 59 61 64 66 69 71 72 +94 92 89 88 85 83 +4 7 10 12 15 17 18 21 +74 76 79 82 83 84 +71 69 66 63 61 60 57 +82 85 86 88 90 92 94 96 +69 71 73 74 75 +35 38 40 41 44 46 49 +78 80 81 82 84 85 87 88 +29 32 34 35 38 +26 24 21 19 17 16 13 11 +39 41 43 45 48 +58 60 61 62 63 64 67 68 +61 64 66 67 70 73 +85 84 83 81 80 +66 63 62 61 59 57 55 +38 41 42 43 46 49 +47 44 41 40 38 35 32 30 +41 39 38 37 36 +85 88 91 93 95 +7 10 11 13 16 19 22 +51 50 48 47 44 43 40 +47 46 43 41 39 38 36 +93 92 91 89 87 85 83 82 +83 80 79 77 74 73 70 +46 44 41 39 37 36 33 32 +29 32 33 35 38 +21 18 16 15 12 9 8 +25 27 29 31 33 +51 53 56 58 59 62 64 +57 58 61 63 65 67 +49 48 47 45 44 41 +42 44 47 48 49 +69 68 66 63 61 60 +27 24 22 21 20 +81 78 77 74 71 70 67 64 +41 44 46 49 50 +13 11 9 6 5 3 +53 52 50 48 47 44 43 42 +48 45 42 41 38 36 34 +62 59 58 57 56 55 +51 50 47 44 42 39 36 +3 4 7 10 13 16 +16 19 20 22 25 +93 91 90 87 85 +87 86 83 80 77 +84 82 80 79 78 76 75 73 +25 27 28 29 31 32 35 38 +82 81 78 75 74 72 70 +84 85 86 89 90 +80 81 82 85 87 89 +1 2 5 8 10 +74 76 78 81 82 83 84 86 +52 54 55 56 57 58 +17 20 22 24 26 28 30 31 +73 72 69 68 65 62 +65 62 60 59 56 55 +54 52 50 48 46 +44 43 42 40 39 +67 68 70 73 74 77 79 81 +91 90 88 86 83 82 81 80 +36 38 39 40 43 45 47 49 +29 28 25 24 23 20 +39 40 43 46 47 49 +83 81 79 76 74 73 +45 43 42 41 40 37 +38 41 42 44 45 47 48 +34 35 38 41 42 43 44 45 +62 59 56 55 52 49 48 +11 13 16 17 20 21 +49 46 45 43 41 40 38 +54 52 51 49 46 44 +96 94 92 89 88 86 84 +41 38 36 33 31 28 25 +21 22 25 26 29 30 31 +27 28 29 32 35 37 39 41 +55 58 60 63 66 68 69 71 +18 15 14 12 11 10 +77 75 74 71 70 +23 25 28 30 31 32 +14 15 17 20 23 25 28 +46 48 50 51 53 55 +72 71 70 69 68 +60 57 56 54 53 51 +93 92 89 86 83 +66 63 62 61 60 59 58 +28 31 34 37 38 +78 79 82 84 85 88 90 92 +60 62 65 67 70 71 +57 60 62 65 67 70 72 +5 8 11 14 15 +63 65 67 69 71 74 75 77 +79 77 74 72 70 +55 58 60 62 65 +28 30 32 34 37 +19 21 24 25 27 +67 65 62 59 58 56 +94 93 91 89 86 83 81 79 +42 41 40 39 37 +16 19 21 23 26 +67 64 62 59 56 +66 64 61 59 56 54 53 51 +62 63 64 67 68 +87 84 81 79 76 74 71 68 +7 8 11 14 15 +37 39 42 43 45 +21 24 26 28 31 33 36 39 +48 50 53 56 59 61 64 65 +63 64 65 66 69 70 +58 60 63 64 65 +5 6 7 10 11 14 17 19 +51 48 47 46 44 +25 28 30 32 35 37 39 +32 31 28 26 25 +91 89 88 85 83 +91 90 87 85 84 83 +39 38 35 34 31 29 +50 51 53 54 56 +59 60 63 65 66 +25 27 28 30 31 +57 54 53 51 50 +50 53 56 57 60 62 65 68 +63 61 60 58 55 52 50 +60 62 64 65 66 68 69 +43 45 48 49 51 52 55 +65 66 68 71 74 77 +24 25 26 28 29 30 32 35 +89 90 92 95 97 +83 84 86 88 89 92 94 +31 32 34 35 37 40 42 43 +73 76 78 79 81 +63 64 67 68 70 73 75 78 +86 84 81 78 77 75 +43 42 40 38 35 +62 64 65 68 71 +68 70 72 75 78 80 83 +77 80 82 85 88 90 91 94 +11 9 8 7 6 +79 80 83 84 87 +44 45 46 47 50 52 55 56 +32 34 35 37 38 40 43 +57 54 51 49 46 45 44 42 +41 39 38 37 34 31 29 26 +81 82 83 85 88 90 91 93 +62 64 66 69 72 73 76 +27 28 30 31 32 33 34 36 +25 27 30 31 33 36 +99 96 93 92 90 +34 33 30 27 25 23 22 21 +27 24 23 20 18 15 13 +91 90 88 87 84 +62 59 56 55 52 49 47 +19 17 16 15 14 13 +95 92 90 87 84 82 79 76 +12 11 9 8 6 3 +15 18 20 22 25 26 27 29 +51 49 47 46 43 40 +62 65 67 68 71 +67 68 71 74 77 79 82 84 +47 45 42 39 37 35 32 31 +51 48 47 46 44 42 41 39 +45 46 49 50 51 52 +86 89 90 92 93 +66 67 68 71 72 75 \ No newline at end of file diff --git a/2024/02/Rust/src/main.rs b/2024/02/Rust/src/main.rs new file mode 100644 index 0000000..d8600dd --- /dev/null +++ b/2024/02/Rust/src/main.rs @@ -0,0 +1,64 @@ +use std::{fs, process}; + +fn main() { + let file_name = "./src/input.txt"; + let reports: Vec>; + match fs::read_to_string(file_name) { + Ok(data) => { + reports = data + .split("\r\n") + .map(|report| + report + .split(" ") + .map(|level| level + .parse::().unwrap()) + .collect()) + .collect() + }, + Err(error) => { + println!("Failed to read file {file_name}: {error}"); + process::exit(1); + }, + } + let levels_per_report = reports + .iter() + .map(|report| { + report + .windows(2) + .map(|slice| slice[0] - slice[1]) + .collect::>() + }) + .collect::>>(); + let same_sign_reports = levels_per_report + .iter() + .map(|report| { + report + .iter() + .skip(1) + //.fold(init, f) + .all(|level| (*level >= 0) == (*report.first().unwrap() >= 0)) + }) + .collect::>(); + let in_range_reports = levels_per_report + .iter() + .map(|report| { + report + .iter() + .all(|level| level.abs() >= 1 && level.abs() <= 3) + }) + .collect::>(); + let safe_reports = same_sign_reports + .iter() + .copied() + .zip(in_range_reports.iter().copied()) + .map(|(l, r)| l && r) + .fold(0, |acc, report| acc + report as i32); + //.collect::(); + + //println!("Reports:\n{:?}", reports); + //println!("Levels Per Report:\n{:?}", levels_per_report); + //println!("Same Sign Reports:\n{:?}", same_sign_reports); + //println!("In Range Reports:\n{:?}", in_range_reports); + println!("Safe Reports:\n{:?}", safe_reports); + process::exit(0) +} diff --git a/2024/03/Kotlin/.gitignore b/2024/03/Kotlin/.gitignore new file mode 100644 index 0000000..f68d109 --- /dev/null +++ b/2024/03/Kotlin/.gitignore @@ -0,0 +1,29 @@ +### IntelliJ IDEA ### +out/ +!**/src/main/**/out/ +!**/src/test/**/out/ + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache +bin/ +!**/src/main/**/bin/ +!**/src/test/**/bin/ + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/2024/03/Kotlin/.idea/.gitignore b/2024/03/Kotlin/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/2024/03/Kotlin/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/2024/03/Kotlin/.idea/inspectionProfiles/Project_Default.xml b/2024/03/Kotlin/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..df543e3 --- /dev/null +++ b/2024/03/Kotlin/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/2024/03/Kotlin/.idea/kotlinc.xml b/2024/03/Kotlin/.idea/kotlinc.xml new file mode 100644 index 0000000..8226e53 --- /dev/null +++ b/2024/03/Kotlin/.idea/kotlinc.xml @@ -0,0 +1,10 @@ + + + + + + + \ No newline at end of file diff --git a/2024/03/Kotlin/.idea/libraries/KotlinJavaRuntime.xml b/2024/03/Kotlin/.idea/libraries/KotlinJavaRuntime.xml new file mode 100644 index 0000000..a9b3aa2 --- /dev/null +++ b/2024/03/Kotlin/.idea/libraries/KotlinJavaRuntime.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/2024/03/Kotlin/.idea/misc.xml b/2024/03/Kotlin/.idea/misc.xml new file mode 100644 index 0000000..1b2d693 --- /dev/null +++ b/2024/03/Kotlin/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/2024/03/Kotlin/.idea/modules.xml b/2024/03/Kotlin/.idea/modules.xml new file mode 100644 index 0000000..45c68c2 --- /dev/null +++ b/2024/03/Kotlin/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/2024/03/Kotlin/.idea/vcs.xml b/2024/03/Kotlin/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/2024/03/Kotlin/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/2024/03/Kotlin/Kotlin.iml b/2024/03/Kotlin/Kotlin.iml new file mode 100644 index 0000000..43dd653 --- /dev/null +++ b/2024/03/Kotlin/Kotlin.iml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/2024/03/Kotlin/src/Main.kt b/2024/03/Kotlin/src/Main.kt new file mode 100644 index 0000000..050d156 --- /dev/null +++ b/2024/03/Kotlin/src/Main.kt @@ -0,0 +1,45 @@ +import java.io.File + +val regex = Regex("mul\\(\\d+,\\d+\\)") +val expandedRegex = Regex("mul\\(\\d+,\\d+\\)|do\\(\\)|don't\\(\\)") + +fun main() { + val filenames = listOf("example.txt", "input.txt") + filenames.forEach { filename -> + val input = readInput(filename) + println(readSimpleInstructions(input)) + println(readExpandedInstructions(input)) + } +} + +fun readInput(filename: String) = File("src/$filename").readText() +fun readSimpleInstructions(input: String): Int { + return regex.findAll(input).map { operation -> + val result = operation.value + val sublist = result.substring(result.indexOf('(') + 1, result.indexOf(')')) + sublist.split(",")[0].toInt() * sublist.split(",")[1].toInt() + }.sum() +} +fun readExpandedInstructions(input: String): Int { + var enabled = true + return expandedRegex.findAll(input).map { operation -> + return@map when(val result = operation.value) { + "do()" -> { + enabled = true + 0 + } + "don't()" -> { + enabled = false + 0 + } + else -> { + if (enabled) { + val sublist = result.substring(result.indexOf('(') + 1, result.indexOf(')')) + sublist.split(",")[0].toInt() * sublist.split(",")[1].toInt() + } else { + 0 + } + } + } + }.sum() +} \ No newline at end of file diff --git a/2024/03/Kotlin/src/example.txt b/2024/03/Kotlin/src/example.txt new file mode 100644 index 0000000..b774ec9 --- /dev/null +++ b/2024/03/Kotlin/src/example.txt @@ -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 diff --git a/2024/03/Kotlin/src/input.txt b/2024/03/Kotlin/src/input.txt new file mode 100644 index 0000000..822e699 --- /dev/null +++ b/2024/03/Kotlin/src/input.txt @@ -0,0 +1,6 @@ +]select(23,564)/$!where()>%mul(747,16)*why()mul(354,748)how()$(when()<:mul(428,793) where()from()how()/how()]*?mul(156,996))what()!,what()~@((mul(976,569)]-,>$-~%;mul(426,703)/mul(948,128)>+?+>?%select()*mul(477,567)why()%select()?!(@~how(){mul(182,79),mul(203,707)?[mul(186,170)select(283,626)*/*when()mul(130,392)')^&when(),[;mul(563,902)where()}*}<$/)how()mul(953,129)!!what()#what()!who()mul(852,652)~)+mul(973,163)$?why()]where()mul(158,596)when()@}what(29,454)mul(968,252)<'^'how()when()<*^mul(617,885)when()) +&;'mul(264,456)/mul(713,804),-mul(803,862)mul(575,310)[ why(527,60) )from()mul(475,876)from()when()*^$@:do()mul(557,2)'{^:-*what()mul(611,157) >- when()mul(894,415)!mul(856,397)from(),where()mul(13,373),!where(),do() {how()select()^:(#select(622,699)[mul(395,375)-##>+[what()?mul(535,15)/(];)mul(115,296)mul(201,604)^+[>+do()&:}how()/:mul(34,586)?where(375,645)?:-who()select()'why()>mul(389,101)don't()<^}who()mul(501,691)'select()mul(551,120),]?from(545,381)?*%~mul(492,926),:(who() {$ when()mul(348,721)'?/)?!what(784,670)mul(811,483): where()why()why()>$[when()do(),~*# {/mul(312,382),}*what(944,486)?^{+%mul(224,412)~why();?<]who()*^mul(199,783)what()from()@why()where()what()?select()(}mul(267,247) mul(126,337)select()mul(534,156)($%%}+*@mul(103,848):;'%mul(237,35)<&-where()mul(423,484),!]where()#!mul(281,866)select(750,996)(( *{<^%who()mul(437,982)}:mul(357,682)@< mul(124,834)}~mul(668,671)mul(787,282)from():where()'[mul(985,702)*{: -&where()how()mul(180,738)(from()@mul(240,76),[:'#!:select() mul(822,179)*#how()~!%!who()who()how()where(184,532)#from() [mul(771,388)how()'~!^!@+mul(646,938)+,(({-mul(486,708)^%^from()-(;what()]mul(144,833)~why()%select()&<~how())mul(439,873)mul(677[[;{:?{>[ (mul(25,577))@:mul(727,412)why();?select()?what()};from()*mul(826,116)#*)/where()who();<@!where()~when()where(597,883)-mul(835,616)'((where(808,96)',mul(649,224)&/ mul(35,958)who(871,394) :!-who()where()where()(mul(322,104^what()%,}[why()what()**who()mul(983,838)mul(614,657)what()&,mul(238,871)-{},select()>who()#>mul(943,599)select()select(558,572)?^who() <:mul(572,265))who()[why()!$,-mul(454,326)mul(300,416)what()who()what()[;when()mul(786,381!&who()when()where(381,479) from()!?$,what(),who()mul(429,727)}from(401,661)>{?%mul(518,766)-@who()!mul(276,326),select()%{mul(211,710)/mul(414,532)@!-,>mul(494,611)?%((@)[&who()mul(547/why()]who()*% $'who(675,908)mul(90,974)}mul(427,683)how()[:;mul(443,135)*^+~^{when()who()}[mul(579,135)@:who()mul(267,452)[&!;;where()$}who()mul(662,85)~>what()mul(724,771)$!mul(206,909)@^%mul)when()select(567,468)mul(260,632)who()what()<}what()}@do()mul(866,137why()~)mul(13,816)^!*(mul(351,795)from()(?^ ;;,~'mul(313,157)?mul(222,186)!> &how()$mul(558,129)how()[select()from()'/&when()[^mul(927,606)@?<+how()-}(mul(749,285)!![%~>mul(919,804)+&-->where()!&$/mul(889,472):why() <]++from():)mul(597,828)!*~@mul(61,536)(why()what(): >why()*mul(50,308)mul(980,618){-! ?*why() *mul(506,77)#/where()^~';who()%who():mul(11,806)mul(226,600)?how()% /{//mul(601[><<&mul(70,238)select(176,735)mul(447,978)(^#mul(583,880)@[mul(722,873)>mul(110,728)/+mul(948,566)where(760,139)[ -*why()-mul(92*,:-$how(),where()select(),+mul(954,569)&?#+(mul(482,680)]mul how()&what()%-mul(455,447)-from()+>?[/where()!:mul(502,951)?~mul(953,617)[/]&>^when()mul(234,738who(134,419))&$-${)when()#why()/mul(266,78)&- ;mul(336,100)?$'#{'~:^mul(963,726)/&@mul(738,99){where(903,414)how()>)mul(249,770)$&@ ]from()$how()!select(521,465)mul(617,783)}<>):[,select(333,996)mul(416,179)[[don't()$]>why()@:mul(148,463)from()-do()when()-/how()when()&from(930,269)[mul(10,173)#mul(613,997)(>when(); *'@mul(724,407)don't()-when()why(533,992),')(:mul(472,652)?mul(350,214)!>where(401,417)/from()$where()mul(108,897)*where()<%select();,$mul(177,623)mul(674,586);mul(188,601)where()&/]mul(892,181)$from()?mul(904,15)why()(from()select()?@{?mul(832,651)<)mul(485,621)?%from()^);from();-who()mul(964,655);((select()mul(950,896)mul(103,475)when())/mul(165,476)(*},)where()!(@mul(417,206)&]?why()%-{[select(),mul(162,447)don't()why()!(/# from()~!mul(794,412)':&?why()mul(419,168);&who()%]who()mul(689,382)who(754,484)select())@)#[('mul/#/,select() why()??&mul(868,352)!from()!who(201,267)what(971,755)mul(245,790):!(^~&^where()--mul(334,775),why()why() when()'@?mulwhen()$?!]- '~@)mul(874,152)when()mul(771,202)(>@~;who()/]@mul(331,997)] select()%&mul(230,638)<%/mul(729,194)when()why()-@-select()select()'!&mul(669,652)/@%where()*;mul(799,156)from(){%why()mul(666,169)-#mul(381,557)&'??>+/>[what()mul(534,338)(mul(631,275),#[{when()~select()mul(847,310)when()]~}where()what(661,551)from()!mul(321,129);$where()@ why()where(616,873)-~(mul(888,479)who(),mul(229,502)])when()don't() mul(246,553)why()?select()',*?mul(242,385)}}where()mul(522/why();mul(445,61)mul(746)$why()from()don't()+mulfrom()#mul(521,245)]%?]}mul),[who()where()mul(784,56)!why(): when(893,294)&[mul(373,342)<$ *! {[why()mul(513,340)how()}where()'[^)^mul(967,981)^from(740,8)^{what()')mul(244,532)+ who()/*mul(686,40)>mul(178,177),][)-<([mul(595,777)<-how()>(,)}mul(210,328)?why() )$why()where()/['*%mul(654,641)select()$[select()mul(620,43)$from()!mul(573,638)<,#/>why(451,392)/how()mul(450,634) ,%@&,don't()select()~~}%select()when()@%@+!^%mul(621,328){@{)when()#)who(685,504)mul(179,100)select(){from()why()]>-mul(94,187);mul(509,291)-how()when()do()why()@) how()select()+mul(379,538)mul(830,641), /&+-@mul(180,491)how():why()!!'%%where()mul(266,732)when();select():+how()(;%mul+who()}{+do()mul(575,752))how()mul:&from()>who(854,820)mul(850,918)&select()(}+}mul(782,495))<'?(>){where(),mul(957,190)/when()what()who()mul(352,79)why()'mul(652,626)mul(973,815)>[)-];@'mul(327,736)$@mul(221,196)~;>,[what()mul(170,288)what()~:$what()'from(468,557)%&>~who()how()mul(847,27){where()?'mul(736,195)mul(663,417)%mul(301,538)don't()what()select();+[how()?+}/mul(271,885)[when()] select()mul(251,286)],{-why()how()-% what()mul(664,742)from()>^!&mul(583,557)%#{}where()why()))don't()[^[mul(636,736)mul(733,889)mul(415,907)#what()what()from()where()mul(746,170)what()how()%who()/mulhow()don't()*'why()[select(769,463)$'/from()mul(520,584)*who()from()~]>who(862,907)why()mul(423,117)why();mul(100,371)!@<{from()mul(434,31) +*why(816,889)& &:!#!/usr/bin/perl/<$!{ (mul(142,115)where()[}/'when()mul(444,725 ~*:why()& from()when(493,415)&mul(863,234)<@?$/when()'+,mul(722,893),%'don't()~where()why()^,;%;%mul(823,490})$<*$#mul(101,716)&from()%@who() what()mul(881,570)who()@+(/@mul(676select()when()*;@@]why()#mul(315,278)[%'select()[{[mul(237,596)mul(782%^<^+:/:~how()when()mul(565,260))~where()??mul(4,427)'where()(when()?-}select(314,151)mul(361,206)-what()!!mul(575,211)!@}select()% ;mul(996,776) how()!#'+)what(861,201)who()]when()how()what()#mul(862,926)when()*;#:['mul(189,238) :[how()who(971,4)~+<(mul(481,269)%mul(632,943)from(){{}'why()who(); select()mul(364,748){;,mul(214,990)from(){>$?:why())mul(206,633)where()what()]*@<$who()}+mul(14,141))mul(822,373)]? how()[from(){mul(978,657{,%]{^mul(688,489)##![why(){}do()#why(),];)when()who()mul(305,206)<]<~ ]don't()?mul(304,632) [mul(291,282)+}{when(),from()#mul(662,53)}mul(5,779)#mul(111,303)where()+!<*'%how(960,285);>mul>mul(852,693)%;)*$':;]who()mul(249,548)@)select()]mul(387,459):/'when()$-[>!mul(112,988)from()@~> $mul(191,655);mul(79,498)~)<@/$@;when()#mul(513,202)][*how()$[from()mul(224,73)&'-&,why()@#from()mul(737,275)who()-[from()mul(816,564)mul(66,866)'from(239,497)how()>>%/<%who()mul(846,687)how()how(854,968)don't()@@[*>where()!mul(268,28)+[#(? -mul(398,631)&?}}^-$&~mul(283,82)@what()don't() what()mul(720,734),? who()mul(380,889)%+select())*how()how();%[mul(48,988)$;mul(968,247)* mul(884,462)*#from()>mul(366}what()]((<+mul(133,244)*'{-where()mul(729,105)how(619,497);from()+from()when()when()when()from()mul(900,829)$mul(83,600)*how()why()mul(434,610)don't())(?@^,mul(691,992)}^:why(784,454)don't()$&#mul(892,279);':what(){~when()what(361,846)']mul(720,864),why()where()mul(303,491)&;[what()mul(720,732)$~,who();/!mul(407,549)-select()!mul(127,272)-%['???select()what(412,125)]don't()&where()]mul(322,71)@/+select()why()$?mul(650,186)&@>@[:![mul(887,229)why()]select(298,963)where()when()?where(992,533):mul(753,118)[what()what()$@(what()]mul(683,687)@[mul(471,355)why()who()$>^?how()mul(271,372)mul(68,707)#when(358,219)'&who()mul(811,52)who()<-:#(from()~mul(160,946)!'@>?[;what()mul(206,444)[$why();why()&:mul(299,200)?what()[what() (+mul(298,431)<$^'(mul(822,566)why()when()+how()-#]]?mul(401,194),mul(320,99)when()*$where()!+]mul(635,430)mul(474,531)%' }mul(896,524) +@who()$don't()who()#&##mul(245,843)mul(707,597):!,mul(864,931);$mul(605,621)&@mul(700,646)>%what(225,888)!%who()[:select()mul(297,15)]^%~]who()mul(87,793)?+{<-where()%mul(518,305)why()+,(~ /!mul(588,968)mul(295,237):-,}%:{+:who()mulwhat(){~*~/'<>mul(590,124)/mul(719,423)))?:+select()mul(902,901)when(){>mul(455,460)$,what()(&{}how()*{mul(24,765)/]mul(529){[#+>/select()?(+mul(19,771)where()+/+mul(380,138)who()when(){from()@mul~$/don't()))select()mul(333,659)< select(213,174)*!select()mul(310,90)mul(494,223)!$when()~how()@mul(656,481)!*!$mul(705,700)mul(7,569)!#;%}> '?mul(324,975) ^/who()$~^ from();do()~!mul(883,226)]mul(660,990)*select()select()[#}!^mul(426,750)when()')#(when()$select()#mul(790,641)what(196,61)&?where()what()mul(751,795)why()#what()/((*who()select(465,475)'mul(633,76)~%&don't()}/why()where()mul(320,249)who()^{how();?'mul(239;;[}]*(;//mul(51,601)%/~%+!'!how(665,519)mul(611,916)what();mul(174,972)when()-where()-how()('do()mul(108,242)?+mul(870,660)]when()%what()?<:mul(635,416)why(924,420)[<$from()>how(260,907)#where()mul(236,788),,@?from())>mul(97,620):select()!+mul(899,189):!}mul(566,974)'why()select()*where()what())why()~why()mul(908,528):)}^mul(71,100)from(296,15)when()from())&from()#how(869,278)mul(628,153)how()mul(765,691)*mul(186,21)how()/mul(487,725)do()##/::from(){what()%)mul(110,152)*&**,$ from()*mul(992,213)[*/!~mul(797,726)-from()mul(969,578)when(112,655)*how()when(),where()'(mul(440,56))*{'(from()-&mul(113,81)^^what()#!))')[mul;~mul(147,629)!@<#&^]@select()mul(993,659),{ mul(254,347<<>}why()(who()>!)how()mul(518,738)what(29,303)from()mul(160,896)do(){/;?what()where()where()how()mul(173,649)mul(969,370$~>mul(679,266)how()>@):@where()mul(206,774))[from()what()where()mul(950,797-) ,^%%mul(996,344)what();select()#mul(332,248)*!'<&~mul(408+how()mul(114,169)$@~select()@~who()mul(901,342)*mul(499,634)%!mul(996,710)~/$}select()mul(8,949)$;(!};from(): mul(860,166)(@-from()'',mul(739,160)$%who(265,676) mul(988,26) ,+/mul(293,416)where()+#}-from(){(@(mul(215,463)mul(152,776)+*]'#'mul(447,726)how()-#}select()what()select(892,487)% mul(182,115)^$<(why()mul(335,275)when(801,993)];select()}'>^how()>do()mul(704,863)+why()'*&mul(709,745)who(){select()mul(17,822)}from()!+;!+,where()]mul(280,107)~?}how()/'(?who()mul(288,599)%what() ]$)mul(463,772)@mul(992,279)what()!:why()>>who() (mul(348,687)*]mul(477,896)when(47,10)&where()?what()%[mul(804,970)from()from()select()+what()[who()-?mul(166,890)&-^mul(892,532)mul(905,17)*)/]>@ {*:mul(361,902)[$]~*mul(629{*<)how()$from()#({mul(924,910)'who()why()'&)}mul(322,152) &mul(503,282)^ )/what()what()%mul(678,160)when()!?&#<%^*mul(661,59)(*mul(936]';)];)who()&&mul(437,929)who()mul(298,239)<(%:>}do()mul(727,688)~(<)who(846,894)mul(720,201)!$@)}mul(139,406)~!$mul(123,17)&select(564,607)(]:who()where();^//mul(905,342)&%)mul(185,967)--~+$ when()@mul(594,891)#:[%,;mul(641,786),@>'how()don't(),mul(185,960)(mul(702,204)]]!(%$++# mul(24,904)!mul(109,193)+[{when()mul(579,493)%where():!mul(473,16)$from()]mul(33,997)mul(104,325)'mul(486,457)select()who()<-who()]&mul(720,711)&do()how()!/!%*^^mul(239,525),from()select()mul(77,963)how()]where(){what()+mul(452,303);/~mul(55,517)&>^~when()-mul(949,308)(@~@what()@**how()mul(185,245)+}how() select()mul(89,379)~&!@ where()-) \ No newline at end of file