diff --git a/AdventOfCode2021.csproj b/AdventOfCode2021.csproj new file mode 100644 index 0000000..abb26f7 --- /dev/null +++ b/AdventOfCode2021.csproj @@ -0,0 +1,15 @@ + + + + Exe + net7.0 + enable + enable + + + + + + + + diff --git a/AdventOfCode2021.sln b/AdventOfCode2021.sln new file mode 100644 index 0000000..2d6c2d7 --- /dev/null +++ b/AdventOfCode2021.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.33122.133 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdventOfCode2021", "AdventOfCode2021.csproj", "{86E5DDE7-1AB6-486A-A75B-594F87BC7151}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {86E5DDE7-1AB6-486A-A75B-594F87BC7151}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {86E5DDE7-1AB6-486A-A75B-594F87BC7151}.Debug|Any CPU.Build.0 = Debug|Any CPU + {86E5DDE7-1AB6-486A-A75B-594F87BC7151}.Release|Any CPU.ActiveCfg = Release|Any CPU + {86E5DDE7-1AB6-486A-A75B-594F87BC7151}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {E035E8A4-FF5C-422F-A0D3-8B1AF82463CA} + EndGlobalSection +EndGlobal diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..f1d42df --- /dev/null +++ b/Program.cs @@ -0,0 +1,4 @@ + + +using AdventOfCode2021; +var day = new day3("day3"); \ No newline at end of file diff --git a/day1.cs b/day1.cs new file mode 100644 index 0000000..40a154a --- /dev/null +++ b/day1.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security.Cryptography.X509Certificates; +using System.Text; +using System.Threading.Tasks; + +namespace AdventOfCode2021 +{ + internal class day1 + { + string[] input; + + public day1(string day) + { + input = getInput(day); + part1(); + part2(); + } + public string[] getInput(string day) + { + string filepath = $"../../../inputs/{day}.txt"; + string[] file = File.ReadAllLines(filepath); + + return file; + } + + + public void part1() + { + + + int temp = int.Parse(input[0]); + int counter = 0; + for(int i = 0; i < input.Length; i++) + { + if (int.Parse(input[i]) > temp) + { + temp = int.Parse(input[i]); + counter++; + } + else + { + temp = int.Parse(input[i]); + } + } + Console.WriteLine($"Part 1 : {counter}"); + + } + public void part2() + { + int temp = computeWindow(0); + int counter = 0; + + for (int i = 3; i < input.Length; i++) + { + if(computeWindow(i -2) > temp) + { + counter++; + temp= computeWindow(i - 2); + } + else + { + temp = computeWindow(i - 2); + } + + } + + Console.WriteLine($"Part 2 : {counter}"); + + + } + + public int computeWindow(int index) + { + int window = int.Parse(input[index]) + int.Parse(input[index + 1]) + int.Parse(input[index + 2]); + return window; + } + + + } +} diff --git a/day2.cs b/day2.cs new file mode 100644 index 0000000..4b592a3 --- /dev/null +++ b/day2.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AdventOfCode2021 +{ + internal class day2 + { + string[] input; + + public day2(string day) + { + input = getInput(day); + part1(); + part2(); + } + public string[] getInput(string day) + { + string filepath = $"../../../inputs/{day}.txt"; + string[] file = File.ReadAllLines(filepath); + + return file; + } + + + public void part1() + { + int result = 0; + int horizontal = 0; + int depth = 0; + + foreach(string line in input) + { + if (line.StartsWith("forward")) + { + horizontal += int.Parse(line.Split(' ')[1]); + } + else if (line.StartsWith("down")) + { + depth += int.Parse(line.Split(' ')[1]); + } + else if (line.StartsWith("up")) + { + depth -= int.Parse(line.Split(' ')[1]); + } + } + result = horizontal * depth; + Console.WriteLine($"Part 1: {result}"); + + } + public void part2() + { + int result = 0; + int horizontal = 0; + int aim = 0; + int depht = 0; + foreach (string line in input) + { + if (line.StartsWith("forward")) + { + horizontal += int.Parse(line.Split(' ')[1]); + depht += int.Parse(line.Split(' ')[1]) * aim; + } + else if (line.StartsWith("down")) + { + aim += int.Parse(line.Split(' ')[1]); + } + else if (line.StartsWith("up")) + { + aim -= int.Parse(line.Split(' ')[1]); + } + } + result = horizontal * depht; + Console.WriteLine($"Part 2: {result}"); + } + } +} \ No newline at end of file diff --git a/day3.cs b/day3.cs new file mode 100644 index 0000000..6f97daa --- /dev/null +++ b/day3.cs @@ -0,0 +1,85 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AdventOfCode2021 +{ + internal class day3 + { + string[] input; + + public day3(string day) + { + input = getInput(day); + part1(); + part2(); + } + public string[] getInput(string day) + { + string filepath = $"../../../inputs/{day}.txt"; + string[] file = File.ReadAllLines(filepath); + + return file; + } + + + public void part1() + { + var result = new StringBuilder(); + var result2 = new StringBuilder(); + + + for(int i = 0; i < input[0].Length; i++) + { + int oneCounter = 0; + int zeroCounter = 0; + for(int j = 0; j < input.Length; j++) + { + if (input[j][i] == '0') + { + zeroCounter++; + } + else + { + oneCounter++; + } + + } + if (oneCounter > zeroCounter) + { + result.Append('1'); + result2.Append('0'); + } + else if (oneCounter < zeroCounter) + { + result.Append('0'); + result2.Append('1'); + } + else if(oneCounter == zeroCounter) + { + result.Append('1'); + result2.Append('0'); + } + } + + int decResult1 = Convert.ToInt32(result.ToString(), 2); + int decResult2 = Convert.ToInt32(result2.ToString(), 2); + + int finalResult = decResult1 * decResult2; + Console.WriteLine($"Part 1 : {finalResult}"); + } + public void part2() + { + + + + + + + Console.WriteLine($"Part 2 : "); + } + } +} + diff --git a/days.cs b/days.cs new file mode 100644 index 0000000..20e3aa7 --- /dev/null +++ b/days.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AdventOfCode2021 +{ + internal class days + { + string[] input; + + public days(string day) + { + input = getInput(day); + part1(); + part2(); + } + public string[] getInput(string day) + { + string filepath = $"../../../inputs/{day}.txt"; + string[] file = File.ReadAllLines(filepath); + + return file; + } + + + public void part1() + { + } + public void part2() + { + } + } +} + diff --git a/inputs/day1.txt b/inputs/day1.txt new file mode 100644 index 0000000..f1748c6 --- /dev/null +++ b/inputs/day1.txt @@ -0,0 +1,2000 @@ +131 +140 +136 +135 +155 +175 +178 +186 +187 +189 +194 +195 +203 +193 +178 +179 +180 +188 +204 +214 +215 +252 +253 +261 +281 +294 +293 +299 +300 +301 +307 +333 +324 +322 +323 +335 +319 +312 +313 +312 +320 +323 +324 +336 +341 +347 +357 +358 +363 +357 +334 +348 +364 +365 +367 +370 +369 +373 +344 +328 +330 +327 +339 +340 +341 +335 +342 +347 +349 +355 +348 +359 +360 +341 +342 +322 +321 +324 +323 +322 +324 +327 +340 +341 +353 +383 +387 +391 +422 +424 +422 +426 +429 +427 +428 +445 +421 +423 +429 +414 +411 +407 +409 +402 +422 +425 +423 +427 +424 +430 +428 +432 +433 +434 +429 +430 +406 +407 +411 +420 +412 +419 +422 +424 +425 +426 +428 +430 +432 +431 +432 +433 +449 +450 +453 +457 +459 +462 +482 +470 +471 +488 +495 +496 +499 +503 +516 +526 +531 +532 +541 +555 +554 +567 +558 +557 +560 +561 +566 +580 +581 +582 +594 +595 +598 +599 +582 +589 +593 +589 +592 +593 +590 +606 +615 +623 +627 +628 +630 +636 +641 +657 +658 +693 +695 +698 +707 +713 +714 +720 +721 +723 +721 +720 +707 +679 +699 +676 +667 +663 +664 +666 +660 +663 +673 +677 +662 +660 +663 +683 +681 +674 +689 +698 +699 +704 +705 +696 +697 +702 +693 +694 +700 +699 +681 +684 +690 +669 +673 +688 +691 +692 +691 +688 +685 +656 +638 +634 +651 +665 +670 +672 +685 +689 +709 +711 +714 +715 +735 +734 +738 +737 +738 +744 +765 +769 +776 +809 +819 +812 +814 +821 +794 +793 +796 +794 +815 +827 +831 +834 +840 +850 +846 +849 +842 +847 +846 +849 +850 +857 +885 +887 +888 +887 +883 +894 +895 +913 +917 +913 +915 +917 +918 +920 +929 +959 +961 +958 +954 +956 +962 +966 +959 +966 +967 +969 +972 +978 +993 +998 +1006 +1007 +1010 +1011 +1015 +1037 +1047 +1051 +1029 +1050 +1052 +1054 +1033 +1040 +1036 +1021 +1031 +1033 +1058 +1070 +1066 +1064 +1052 +1051 +1057 +1058 +1059 +1060 +1071 +1080 +1081 +1083 +1086 +1075 +1083 +1092 +1095 +1101 +1113 +1078 +1080 +1075 +1077 +1080 +1083 +1090 +1092 +1091 +1092 +1093 +1097 +1099 +1103 +1104 +1105 +1109 +1084 +1101 +1103 +1109 +1101 +1099 +1096 +1099 +1103 +1104 +1105 +1119 +1123 +1095 +1096 +1095 +1132 +1149 +1164 +1165 +1182 +1180 +1198 +1207 +1210 +1213 +1218 +1239 +1235 +1236 +1242 +1243 +1276 +1279 +1282 +1283 +1299 +1301 +1294 +1298 +1304 +1301 +1303 +1313 +1312 +1316 +1317 +1319 +1320 +1315 +1318 +1326 +1330 +1332 +1331 +1334 +1319 +1316 +1308 +1306 +1309 +1312 +1310 +1329 +1318 +1321 +1335 +1310 +1311 +1313 +1329 +1331 +1335 +1341 +1355 +1356 +1357 +1360 +1378 +1373 +1374 +1373 +1377 +1378 +1383 +1379 +1380 +1376 +1370 +1369 +1380 +1381 +1382 +1381 +1383 +1377 +1401 +1403 +1408 +1417 +1406 +1407 +1409 +1411 +1414 +1420 +1419 +1426 +1456 +1452 +1453 +1454 +1453 +1450 +1442 +1430 +1434 +1435 +1439 +1440 +1441 +1442 +1463 +1464 +1471 +1469 +1471 +1472 +1433 +1436 +1434 +1440 +1446 +1447 +1452 +1454 +1441 +1434 +1420 +1404 +1396 +1412 +1423 +1424 +1437 +1450 +1452 +1457 +1458 +1422 +1423 +1433 +1436 +1453 +1484 +1485 +1460 +1457 +1458 +1464 +1465 +1467 +1468 +1475 +1476 +1471 +1470 +1471 +1473 +1470 +1473 +1474 +1490 +1482 +1484 +1508 +1515 +1522 +1521 +1514 +1518 +1520 +1522 +1530 +1528 +1523 +1535 +1537 +1539 +1541 +1533 +1528 +1531 +1538 +1539 +1541 +1547 +1551 +1550 +1545 +1546 +1548 +1551 +1566 +1577 +1586 +1587 +1588 +1613 +1615 +1631 +1638 +1639 +1640 +1645 +1648 +1642 +1640 +1643 +1673 +1679 +1669 +1673 +1666 +1669 +1674 +1682 +1683 +1700 +1698 +1709 +1717 +1729 +1743 +1745 +1746 +1744 +1714 +1722 +1727 +1734 +1735 +1745 +1752 +1751 +1772 +1788 +1794 +1798 +1804 +1798 +1793 +1796 +1806 +1809 +1815 +1816 +1815 +1813 +1812 +1817 +1818 +1821 +1825 +1821 +1853 +1827 +1822 +1825 +1834 +1833 +1830 +1836 +1837 +1838 +1840 +1841 +1846 +1841 +1842 +1845 +1862 +1863 +1896 +1898 +1884 +1885 +1893 +1892 +1895 +1896 +1894 +1903 +1902 +1907 +1915 +1919 +1922 +1923 +1921 +1924 +1925 +1927 +1931 +1932 +1939 +1940 +1939 +1959 +1965 +1975 +1973 +1974 +1982 +1983 +1988 +1992 +1995 +1994 +1995 +1994 +2000 +2001 +2029 +2030 +2005 +2006 +2009 +2013 +2017 +2014 +2041 +2042 +2052 +2047 +2048 +2052 +2051 +2053 +2052 +2069 +2058 +2059 +2060 +2061 +2063 +2062 +2065 +2066 +2070 +2072 +2075 +2061 +2038 +2037 +2024 +2022 +2023 +2011 +2032 +2037 +2026 +2027 +2028 +2034 +2038 +2039 +2029 +2042 +2031 +2033 +2046 +2048 +2041 +2049 +2050 +2052 +2063 +2064 +2065 +2067 +2086 +2070 +2078 +2087 +2086 +2089 +2075 +2076 +2101 +2103 +2115 +2095 +2109 +2112 +2115 +2126 +2152 +2129 +2132 +2117 +2116 +2119 +2128 +2127 +2139 +2140 +2141 +2145 +2146 +2125 +2136 +2132 +2121 +2125 +2126 +2134 +2135 +2142 +2148 +2149 +2133 +2137 +2156 +2160 +2161 +2162 +2164 +2176 +2177 +2179 +2183 +2184 +2186 +2187 +2190 +2195 +2216 +2210 +2209 +2206 +2214 +2211 +2216 +2223 +2224 +2225 +2230 +2242 +2246 +2248 +2268 +2272 +2273 +2278 +2279 +2280 +2281 +2275 +2276 +2282 +2283 +2278 +2285 +2288 +2289 +2286 +2290 +2285 +2291 +2294 +2287 +2293 +2315 +2314 +2315 +2325 +2323 +2328 +2308 +2312 +2322 +2361 +2364 +2366 +2364 +2369 +2368 +2384 +2387 +2390 +2396 +2370 +2371 +2377 +2378 +2377 +2379 +2395 +2384 +2381 +2395 +2401 +2412 +2411 +2412 +2414 +2420 +2422 +2408 +2425 +2427 +2428 +2438 +2442 +2445 +2456 +2462 +2461 +2469 +2467 +2472 +2471 +2469 +2449 +2448 +2442 +2459 +2460 +2474 +2477 +2478 +2480 +2483 +2468 +2444 +2442 +2444 +2460 +2456 +2445 +2437 +2430 +2432 +2457 +2463 +2467 +2474 +2477 +2475 +2478 +2477 +2478 +2480 +2485 +2471 +2495 +2509 +2514 +2522 +2523 +2533 +2515 +2518 +2539 +2535 +2543 +2580 +2586 +2601 +2602 +2600 +2602 +2598 +2597 +2598 +2605 +2597 +2596 +2600 +2602 +2599 +2605 +2613 +2614 +2611 +2603 +2602 +2601 +2607 +2608 +2606 +2598 +2599 +2602 +2597 +2605 +2611 +2612 +2613 +2645 +2657 +2662 +2668 +2669 +2652 +2655 +2661 +2663 +2662 +2664 +2677 +2695 +2702 +2738 +2739 +2738 +2740 +2728 +2720 +2714 +2720 +2712 +2724 +2725 +2736 +2745 +2742 +2747 +2749 +2744 +2746 +2750 +2753 +2759 +2760 +2761 +2731 +2733 +2735 +2736 +2737 +2741 +2739 +2740 +2744 +2745 +2755 +2744 +2746 +2748 +2752 +2750 +2755 +2736 +2740 +2742 +2753 +2752 +2755 +2780 +2781 +2783 +2786 +2788 +2786 +2796 +2790 +2789 +2798 +2816 +2817 +2815 +2817 +2819 +2820 +2825 +2823 +2827 +2853 +2856 +2861 +2862 +2854 +2873 +2887 +2884 +2888 +2884 +2885 +2893 +2902 +2901 +2902 +2904 +2908 +2909 +2911 +2914 +2929 +2931 +2935 +2934 +2935 +2934 +2917 +2918 +2921 +2926 +2932 +2937 +2947 +2928 +2946 +2971 +2973 +2972 +2969 +2972 +2973 +2978 +2977 +2968 +2961 +2962 +2982 +2987 +2989 +2990 +2993 +2995 +2987 +2991 +2992 +3002 +3003 +3004 +3005 +3011 +3012 +3031 +3029 +3036 +3041 +3069 +3070 +3087 +3077 +3090 +3087 +3066 +3078 +3080 +3081 +3071 +3074 +3075 +3074 +3069 +3070 +3078 +3086 +3080 +3086 +3088 +3096 +3098 +3103 +3117 +3114 +3143 +3148 +3149 +3150 +3149 +3151 +3165 +3169 +3172 +3183 +3184 +3185 +3190 +3204 +3218 +3230 +3231 +3248 +3249 +3252 +3249 +3246 +3268 +3273 +3274 +3277 +3289 +3257 +3269 +3279 +3267 +3284 +3312 +3315 +3314 +3317 +3310 +3315 +3314 +3304 +3305 +3308 +3322 +3326 +3331 +3336 +3339 +3345 +3348 +3349 +3348 +3350 +3348 +3350 +3362 +3363 +3373 +3368 +3349 +3347 +3344 +3362 +3364 +3365 +3374 +3380 +3390 +3387 +3389 +3391 +3392 +3390 +3388 +3389 +3395 +3415 +3416 +3414 +3415 +3416 +3417 +3420 +3418 +3422 +3421 +3428 +3421 +3422 +3424 +3421 +3422 +3419 +3416 +3392 +3396 +3408 +3399 +3400 +3403 +3392 +3398 +3393 +3415 +3436 +3458 +3459 +3467 +3469 +3472 +3480 +3489 +3491 +3490 +3521 +3518 +3517 +3518 +3502 +3510 +3505 +3506 +3508 +3509 +3510 +3506 +3504 +3505 +3522 +3525 +3531 +3524 +3522 +3517 +3523 +3526 +3512 +3516 +3521 +3535 +3544 +3539 +3514 +3519 +3525 +3523 +3530 +3529 +3534 +3526 +3523 +3525 +3522 +3509 +3510 +3523 +3522 +3516 +3518 +3522 +3539 +3540 +3546 +3551 +3556 +3566 +3545 +3573 +3574 +3576 +3581 +3582 +3602 +3604 +3606 +3590 +3596 +3598 +3599 +3607 +3573 +3592 +3599 +3607 +3609 +3617 +3621 +3606 +3602 +3599 +3609 +3602 +3598 +3607 +3612 +3613 +3630 +3632 +3634 +3636 +3642 +3651 +3655 +3662 +3687 +3688 +3689 +3684 +3664 +3663 +3667 +3645 +3647 +3649 +3660 +3673 +3665 +3663 +3633 +3656 +3658 +3669 +3672 +3673 +3675 +3683 +3684 +3685 +3683 +3687 +3699 +3703 +3707 +3717 +3749 +3763 +3767 +3771 +3774 +3790 +3801 +3808 +3813 +3814 +3819 +3835 +3834 +3835 +3836 +3837 +3836 +3837 +3839 +3844 +3845 +3831 +3830 +3828 +3829 +3830 +3846 +3844 +3825 +3811 +3806 +3809 +3807 +3826 +3836 +3847 +3848 +3849 +3850 +3863 +3869 +3868 +3869 +3870 +3871 +3867 +3868 +3872 +3871 +3874 +3875 +3874 +3876 +3879 +3884 +3901 +3904 +3901 +3915 +3905 +3904 +3889 +3914 +3917 +3931 +3932 +3930 +3932 +3937 +3943 +3939 +3941 +3943 +3930 +3929 +3945 +3954 +3972 +3996 +3997 +4000 +4001 +3995 +4025 +4027 +4034 +4035 +4050 +4074 +4071 +4077 +4078 +4085 +4087 +4088 +4091 +4090 +4091 +4092 +4089 +4091 +4096 +4094 +4095 +4107 +4109 +4130 +4131 +4124 +4136 +4139 +4153 +4161 +4173 +4149 +4154 +4148 +4150 +4128 +4160 +4164 +4168 +4169 +4158 +4165 +4174 +4171 +4195 +4200 +4201 +4195 +4198 +4201 +4202 +4196 +4203 +4211 +4209 +4210 +4217 +4220 +4203 +4193 +4194 +4197 +4193 +4195 +4196 +4195 +4197 +4218 +4222 +4236 +4223 +4225 +4242 +4262 +4265 +4256 +4260 +4270 +4271 +4276 +4272 +4275 +4297 +4304 +4297 +4299 +4302 +4303 +4301 +4306 +4337 +4341 +4342 +4343 +4345 +4346 +4351 +4350 +4338 +4331 +4337 +4331 +4345 +4309 +4311 +4327 +4328 +4335 +4360 +4362 +4364 +4360 +4357 +4359 +4367 +4368 +4352 +4351 +4347 +4360 +4356 +4357 +4362 +4363 +4357 +4362 +4367 +4385 +4388 +4392 +4395 +4397 +4398 +4387 +4395 +4399 +4402 +4403 +4424 +4434 +4443 +4444 +4445 +4456 +4457 +4466 +4470 +4469 +4470 +4471 +4505 +4499 +4500 +4476 +4483 +4475 +4476 +4486 +4496 +4495 +4504 +4503 +4516 +4518 +4517 +4525 +4527 +4530 +4532 +4533 +4535 +4537 +4541 +4544 +4546 +4549 +4551 +4552 +4555 +4556 +4563 +4580 +4583 +4600 +4589 +4581 +4585 +4583 +4585 +4592 +4585 +4595 +4605 +4598 +4601 +4600 +4603 +4598 +4628 +4630 +4626 +4630 +4632 +4631 +4632 +4619 +4633 +4643 +4630 +4640 +4660 +4671 +4675 +4682 +4697 +4695 +4700 +4704 +4705 +4710 +4721 +4727 +4732 +4728 +4729 +4735 +4743 +4744 +4754 +4760 +4766 +4758 +4762 +4760 +4763 +4782 +4786 +4787 +4789 +4801 +4804 +4782 +4752 +4755 +4757 +4758 +4757 +4766 +4778 +4779 +4769 +4781 +4777 +4785 +4786 +4788 +4796 +4795 +4796 +4797 +4805 +4804 +4814 +4812 +4815 +4806 +4805 +4807 +4805 +4806 +4807 +4810 +4845 +4846 +4855 +4853 +4859 +4862 +4867 +4873 +4879 +4881 +4880 +4883 +4880 +4886 +4892 +4898 +4903 +4902 +4905 +4909 +4914 +4915 +4917 +4939 +4941 +4933 +4932 +4940 +4945 +4961 +4966 +4955 +4960 +4979 +4980 +4981 +4970 +4968 +4970 +4989 +4996 +5003 +4983 +4984 +5006 +5014 +5018 +5023 +5042 +5043 +5050 +5051 +5076 +5052 +5055 +5068 +5059 +5058 +5035 +5059 +5060 +5061 +5068 +5044 +5043 +5044 +5045 +5047 +5048 +5051 +5044 +5045 +5049 +5072 +5080 +5078 +5101 +5100 +5092 +5112 +5111 +5107 +5113 +5116 +5123 +5129 +5127 +5151 +5176 +5188 +5189 +5202 +5204 +5197 +5199 +5196 +5201 +5200 +5203 +5207 +5209 +5217 +5218 +5204 +5206 +5207 +5208 +5195 +5201 +5202 +5199 +5229 +5228 +5229 +5233 +5232 +5227 +5228 +5229 +5238 +5236 +5238 +5243 +5245 +5244 +5245 +5230 +5244 +5258 +5259 +5268 +5271 +5274 +5271 +5272 +5277 +5300 +5327 +5358 +5359 +5360 +5361 +5364 +5370 +5375 +5376 +5384 +5383 +5384 +5385 +5389 +5390 +5395 +5397 +5413 +5418 +5434 +5433 +5449 +5445 +5447 +5453 +5454 +5458 +5460 +5448 +5452 +5464 +5469 +5480 +5481 +5482 +5486 +5496 +5499 +5500 +5527 +5501 +5476 +5474 +5475 +5463 +5462 +5458 +5459 +5470 +5473 +5481 +5493 +5494 +5495 +5496 +5497 +5498 +5495 +5498 +5496 +5490 +5491 +5493 +5495 +5489 +5514 +5533 +5541 +5531 +5537 +5513 +5531 +5532 +5533 +5532 +5526 +5535 +5553 +5551 +5554 +5553 +5555 +5551 +5557 +5556 +5558 +5555 +5554 +5552 +5566 +5574 +5577 +5583 +5584 +5588 +5590 +5603 +5610 +5617 +5619 +5618 +5619 +5618 +5630 +5635 +5638 +5650 +5659 +5660 +5672 +5670 +5676 +5673 +5675 +5680 +5682 +5685 +5688 +5682 +5683 +5696 +5700 +5722 +5714 +5713 +5710 +5712 +5740 +5741 +5739 +5740 +5746 +5756 +5769 +5770 +5757 +5748 +5766 +5770 \ No newline at end of file diff --git a/inputs/day2 - Kopieren (2).txt b/inputs/day2 - Kopieren (2).txt new file mode 100644 index 0000000..18f8ac4 --- /dev/null +++ b/inputs/day2 - Kopieren (2).txt @@ -0,0 +1,1000 @@ +forward 3 +down 9 +forward 5 +up 1 +forward 2 +down 1 +down 7 +down 5 +up 6 +forward 3 +down 6 +forward 9 +down 6 +forward 2 +down 4 +forward 4 +down 9 +down 7 +down 2 +down 4 +forward 3 +forward 6 +down 3 +up 1 +down 5 +down 8 +down 1 +forward 9 +forward 4 +forward 3 +down 3 +down 6 +down 3 +up 2 +down 3 +down 9 +down 1 +down 9 +up 8 +down 1 +down 9 +forward 9 +forward 2 +down 1 +forward 2 +down 9 +forward 9 +up 7 +forward 1 +up 8 +forward 7 +forward 6 +forward 2 +down 8 +forward 7 +down 3 +down 2 +down 1 +forward 2 +down 6 +forward 8 +down 7 +forward 9 +down 7 +down 9 +forward 2 +forward 2 +up 3 +down 4 +down 8 +forward 5 +down 4 +down 8 +down 2 +up 7 +down 7 +up 9 +up 9 +up 1 +forward 2 +up 4 +forward 5 +forward 9 +forward 9 +forward 3 +down 6 +up 3 +down 1 +forward 8 +forward 2 +down 7 +forward 9 +forward 1 +forward 8 +forward 8 +down 2 +down 6 +forward 8 +forward 8 +forward 3 +forward 4 +down 3 +up 3 +forward 1 +forward 4 +down 1 +down 4 +down 2 +down 3 +forward 5 +down 3 +up 5 +forward 9 +down 8 +up 6 +down 6 +up 7 +up 7 +forward 1 +forward 7 +down 1 +up 3 +down 1 +forward 7 +forward 1 +forward 9 +down 2 +forward 9 +down 3 +down 5 +forward 2 +up 3 +forward 5 +forward 5 +down 8 +down 7 +forward 6 +down 2 +down 5 +up 4 +up 5 +down 6 +forward 5 +down 3 +down 8 +forward 7 +down 5 +down 5 +down 9 +down 9 +down 2 +down 7 +up 4 +forward 8 +up 6 +down 5 +forward 1 +up 2 +down 6 +up 8 +up 7 +down 6 +forward 4 +down 6 +up 6 +up 4 +forward 5 +forward 4 +forward 6 +down 3 +down 7 +down 9 +forward 2 +forward 6 +down 3 +forward 1 +forward 2 +forward 9 +up 5 +down 7 +down 6 +forward 2 +forward 1 +up 3 +down 8 +forward 9 +down 7 +forward 7 +up 2 +up 8 +up 8 +forward 7 +forward 5 +forward 9 +down 7 +down 7 +forward 5 +forward 4 +forward 2 +forward 8 +up 3 +up 7 +forward 8 +forward 6 +forward 2 +forward 6 +up 3 +up 1 +forward 6 +forward 9 +down 1 +forward 6 +forward 4 +up 6 +forward 1 +down 7 +forward 7 +up 5 +down 5 +down 3 +forward 4 +forward 6 +up 6 +forward 9 +forward 2 +down 7 +forward 9 +down 9 +forward 2 +up 1 +down 4 +forward 6 +forward 4 +down 6 +forward 1 +up 3 +up 5 +down 8 +forward 2 +up 7 +down 5 +down 2 +down 6 +forward 7 +down 8 +up 8 +down 7 +down 9 +down 7 +down 8 +down 4 +up 3 +up 9 +down 4 +forward 7 +down 5 +up 8 +down 3 +forward 8 +down 3 +down 4 +down 1 +forward 5 +down 4 +down 8 +up 7 +forward 2 +forward 8 +down 1 +down 3 +forward 4 +forward 5 +forward 8 +forward 1 +down 1 +down 9 +up 8 +forward 6 +down 8 +down 2 +forward 9 +down 5 +down 8 +up 8 +up 5 +forward 9 +up 6 +down 9 +up 1 +down 2 +down 4 +forward 9 +forward 1 +up 2 +down 7 +forward 9 +down 9 +down 6 +down 9 +down 8 +forward 7 +forward 6 +forward 9 +forward 9 +forward 8 +forward 5 +up 2 +forward 9 +forward 2 +down 1 +down 1 +down 5 +down 1 +down 7 +up 2 +up 7 +forward 7 +forward 8 +down 2 +down 2 +down 3 +up 8 +up 8 +up 3 +forward 3 +down 7 +up 4 +up 8 +down 5 +forward 4 +forward 7 +down 9 +up 7 +forward 8 +forward 5 +forward 8 +forward 8 +forward 6 +forward 5 +forward 2 +down 3 +up 2 +forward 6 +forward 5 +down 9 +down 2 +down 7 +down 2 +forward 2 +forward 6 +forward 8 +down 7 +forward 4 +down 3 +down 5 +forward 1 +down 9 +forward 5 +down 4 +forward 9 +down 5 +down 4 +down 4 +down 7 +forward 9 +down 3 +down 5 +down 6 +down 4 +forward 4 +down 4 +up 1 +down 4 +up 7 +forward 4 +forward 5 +up 9 +down 4 +up 9 +forward 9 +down 8 +down 1 +up 7 +down 4 +up 4 +forward 9 +down 9 +down 4 +up 4 +down 5 +forward 2 +up 4 +down 3 +forward 9 +forward 8 +down 2 +forward 5 +up 5 +down 9 +down 7 +down 5 +down 9 +down 1 +down 7 +down 2 +forward 4 +up 7 +forward 7 +down 8 +down 2 +down 8 +up 6 +down 7 +down 7 +forward 3 +up 3 +forward 6 +down 8 +down 3 +up 2 +down 9 +forward 3 +down 9 +down 6 +up 8 +forward 5 +down 9 +up 2 +up 8 +down 8 +up 1 +up 2 +forward 5 +up 3 +down 7 +forward 4 +forward 2 +up 1 +forward 2 +up 1 +down 1 +down 5 +forward 6 +up 2 +down 7 +down 8 +down 9 +up 9 +down 2 +up 2 +forward 9 +forward 6 +forward 5 +down 6 +up 6 +forward 6 +forward 3 +down 3 +forward 2 +forward 4 +forward 1 +down 9 +forward 3 +forward 2 +down 5 +up 2 +forward 7 +down 4 +forward 5 +down 4 +forward 2 +down 4 +up 3 +forward 6 +forward 9 +down 1 +forward 2 +up 8 +forward 4 +up 9 +up 4 +up 3 +forward 5 +down 7 +forward 2 +up 4 +forward 7 +down 8 +forward 6 +forward 4 +up 5 +down 4 +down 6 +down 3 +forward 6 +down 9 +up 6 +forward 3 +down 4 +forward 8 +forward 1 +down 3 +down 4 +up 4 +forward 1 +up 5 +up 9 +forward 4 +up 9 +forward 2 +up 5 +up 5 +up 7 +up 4 +down 3 +forward 8 +forward 1 +up 1 +down 8 +up 3 +up 4 +up 2 +up 8 +up 7 +down 8 +up 8 +forward 9 +down 8 +up 5 +forward 6 +forward 4 +down 8 +down 9 +down 4 +down 6 +forward 4 +up 6 +up 1 +forward 7 +up 4 +down 6 +up 3 +down 4 +forward 8 +forward 4 +up 2 +down 3 +up 3 +up 9 +down 4 +forward 4 +forward 5 +forward 2 +down 1 +down 6 +down 1 +forward 6 +down 2 +forward 1 +down 2 +down 4 +forward 1 +down 8 +up 2 +down 5 +forward 9 +forward 4 +down 9 +forward 8 +forward 2 +forward 7 +forward 1 +forward 1 +down 8 +forward 2 +forward 8 +forward 7 +forward 9 +down 4 +down 2 +forward 1 +forward 2 +down 1 +forward 1 +forward 5 +down 1 +down 5 +down 1 +forward 2 +up 9 +forward 2 +forward 4 +down 9 +up 7 +down 1 +up 4 +forward 9 +up 6 +up 8 +down 3 +forward 9 +up 6 +down 1 +forward 9 +forward 3 +up 5 +forward 9 +down 1 +forward 5 +up 5 +down 1 +up 4 +forward 3 +forward 1 +up 4 +forward 3 +forward 9 +down 2 +forward 5 +forward 4 +forward 9 +down 5 +forward 8 +forward 1 +down 3 +down 2 +down 3 +up 8 +forward 3 +forward 6 +up 8 +down 6 +forward 8 +forward 1 +down 8 +down 7 +forward 8 +down 2 +forward 8 +down 4 +forward 1 +down 1 +up 6 +forward 1 +up 7 +down 2 +forward 5 +up 9 +down 5 +forward 4 +down 6 +down 9 +forward 8 +up 2 +up 7 +forward 2 +forward 5 +up 9 +down 4 +forward 9 +down 4 +down 3 +down 6 +down 9 +down 9 +down 1 +down 1 +down 7 +down 4 +down 7 +up 5 +forward 6 +down 9 +forward 7 +down 5 +down 4 +down 2 +down 4 +down 9 +forward 1 +down 9 +down 8 +forward 2 +up 7 +up 3 +forward 9 +forward 4 +down 8 +down 4 +forward 2 +down 8 +up 3 +forward 6 +forward 4 +down 2 +up 9 +down 5 +up 8 +up 6 +up 3 +down 2 +forward 6 +forward 4 +forward 7 +forward 2 +down 5 +down 2 +forward 2 +forward 6 +down 5 +down 4 +forward 8 +up 3 +forward 7 +down 1 +forward 5 +down 8 +down 9 +forward 5 +down 7 +forward 7 +up 6 +down 3 +forward 1 +down 2 +down 9 +down 2 +down 1 +forward 4 +up 5 +up 9 +forward 1 +down 5 +forward 4 +up 3 +up 5 +forward 7 +forward 5 +down 2 +down 8 +forward 5 +down 7 +up 8 +down 5 +down 6 +forward 8 +forward 9 +down 8 +up 3 +down 8 +down 2 +forward 8 +forward 8 +forward 4 +forward 9 +up 7 +up 1 +down 5 +down 8 +down 5 +forward 3 +forward 2 +down 8 +down 3 +down 2 +down 5 +forward 8 +up 3 +down 9 +up 4 +up 1 +up 8 +down 8 +forward 5 +down 2 +forward 4 +forward 1 +down 7 +forward 4 +forward 5 +up 2 +down 6 +up 9 +forward 1 +down 9 +forward 4 +down 7 +down 9 +up 9 +forward 2 +forward 7 +down 7 +forward 9 +forward 1 +forward 1 +down 7 +up 6 +up 3 +forward 2 +forward 6 +forward 9 +forward 3 +forward 4 +forward 9 +forward 9 +forward 9 +down 8 +up 2 +forward 7 +down 8 +down 3 +up 8 +down 8 +forward 1 +forward 9 +forward 2 +forward 3 +down 8 +forward 1 +forward 4 +down 9 +down 4 +up 7 +forward 5 +down 4 +forward 5 +down 2 +forward 6 +down 1 +up 9 +down 5 +up 5 +down 2 +up 1 +up 8 +down 3 +up 3 +down 8 +forward 4 +forward 1 +up 5 +forward 1 +down 5 +up 5 +forward 8 +down 1 +up 4 +forward 9 +forward 7 +up 1 +up 9 +forward 7 +forward 1 +up 5 +forward 6 +down 2 +up 5 +down 4 +down 6 +down 3 +forward 8 +down 7 +down 5 +down 7 +forward 1 +down 7 +up 5 +down 4 +down 4 +down 4 +forward 3 +forward 4 +up 6 +forward 8 +forward 2 +up 1 +forward 5 +forward 6 +forward 6 +up 2 +down 3 +forward 3 +up 8 +forward 6 +forward 5 +up 2 +up 5 +down 6 +down 8 +down 1 +forward 6 +down 3 +down 2 +forward 4 +down 4 +down 7 +forward 9 +forward 4 +forward 5 +down 8 +down 9 +up 4 +up 4 +down 5 +up 1 +up 6 +down 9 +forward 9 +forward 4 +forward 9 +forward 9 +down 5 +down 1 +up 9 +down 3 +up 5 +down 7 +forward 6 +forward 2 +down 5 +down 6 +forward 7 +forward 2 +up 9 +forward 6 +down 7 +up 4 +forward 1 +down 5 +forward 2 +forward 1 +down 6 +down 1 +down 4 +forward 8 +forward 1 +down 5 +down 8 +down 3 +forward 4 +down 2 +forward 9 +up 1 +forward 8 +down 4 +down 3 +down 1 +forward 5 +forward 9 +down 3 +forward 6 +up 6 +up 9 +forward 8 +forward 2 +down 9 +forward 3 +down 4 +down 5 +down 4 +forward 2 +forward 6 +down 9 +down 5 +forward 6 +forward 3 +forward 5 +forward 6 +forward 5 +forward 1 +up 4 +up 1 +down 2 +up 6 +down 5 +down 1 +forward 9 +down 1 +down 2 +forward 6 +up 2 +down 4 +up 3 +forward 8 +down 4 +down 4 +down 6 +up 1 +down 7 +up 4 +down 6 +up 7 +up 6 +down 5 +forward 3 +forward 4 +up 5 +down 2 +down 9 +forward 9 \ No newline at end of file diff --git a/inputs/day2 - Kopieren.txt b/inputs/day2 - Kopieren.txt new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/inputs/day2 - Kopieren.txt @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/inputs/day2.txt b/inputs/day2.txt new file mode 100644 index 0000000..18f8ac4 --- /dev/null +++ b/inputs/day2.txt @@ -0,0 +1,1000 @@ +forward 3 +down 9 +forward 5 +up 1 +forward 2 +down 1 +down 7 +down 5 +up 6 +forward 3 +down 6 +forward 9 +down 6 +forward 2 +down 4 +forward 4 +down 9 +down 7 +down 2 +down 4 +forward 3 +forward 6 +down 3 +up 1 +down 5 +down 8 +down 1 +forward 9 +forward 4 +forward 3 +down 3 +down 6 +down 3 +up 2 +down 3 +down 9 +down 1 +down 9 +up 8 +down 1 +down 9 +forward 9 +forward 2 +down 1 +forward 2 +down 9 +forward 9 +up 7 +forward 1 +up 8 +forward 7 +forward 6 +forward 2 +down 8 +forward 7 +down 3 +down 2 +down 1 +forward 2 +down 6 +forward 8 +down 7 +forward 9 +down 7 +down 9 +forward 2 +forward 2 +up 3 +down 4 +down 8 +forward 5 +down 4 +down 8 +down 2 +up 7 +down 7 +up 9 +up 9 +up 1 +forward 2 +up 4 +forward 5 +forward 9 +forward 9 +forward 3 +down 6 +up 3 +down 1 +forward 8 +forward 2 +down 7 +forward 9 +forward 1 +forward 8 +forward 8 +down 2 +down 6 +forward 8 +forward 8 +forward 3 +forward 4 +down 3 +up 3 +forward 1 +forward 4 +down 1 +down 4 +down 2 +down 3 +forward 5 +down 3 +up 5 +forward 9 +down 8 +up 6 +down 6 +up 7 +up 7 +forward 1 +forward 7 +down 1 +up 3 +down 1 +forward 7 +forward 1 +forward 9 +down 2 +forward 9 +down 3 +down 5 +forward 2 +up 3 +forward 5 +forward 5 +down 8 +down 7 +forward 6 +down 2 +down 5 +up 4 +up 5 +down 6 +forward 5 +down 3 +down 8 +forward 7 +down 5 +down 5 +down 9 +down 9 +down 2 +down 7 +up 4 +forward 8 +up 6 +down 5 +forward 1 +up 2 +down 6 +up 8 +up 7 +down 6 +forward 4 +down 6 +up 6 +up 4 +forward 5 +forward 4 +forward 6 +down 3 +down 7 +down 9 +forward 2 +forward 6 +down 3 +forward 1 +forward 2 +forward 9 +up 5 +down 7 +down 6 +forward 2 +forward 1 +up 3 +down 8 +forward 9 +down 7 +forward 7 +up 2 +up 8 +up 8 +forward 7 +forward 5 +forward 9 +down 7 +down 7 +forward 5 +forward 4 +forward 2 +forward 8 +up 3 +up 7 +forward 8 +forward 6 +forward 2 +forward 6 +up 3 +up 1 +forward 6 +forward 9 +down 1 +forward 6 +forward 4 +up 6 +forward 1 +down 7 +forward 7 +up 5 +down 5 +down 3 +forward 4 +forward 6 +up 6 +forward 9 +forward 2 +down 7 +forward 9 +down 9 +forward 2 +up 1 +down 4 +forward 6 +forward 4 +down 6 +forward 1 +up 3 +up 5 +down 8 +forward 2 +up 7 +down 5 +down 2 +down 6 +forward 7 +down 8 +up 8 +down 7 +down 9 +down 7 +down 8 +down 4 +up 3 +up 9 +down 4 +forward 7 +down 5 +up 8 +down 3 +forward 8 +down 3 +down 4 +down 1 +forward 5 +down 4 +down 8 +up 7 +forward 2 +forward 8 +down 1 +down 3 +forward 4 +forward 5 +forward 8 +forward 1 +down 1 +down 9 +up 8 +forward 6 +down 8 +down 2 +forward 9 +down 5 +down 8 +up 8 +up 5 +forward 9 +up 6 +down 9 +up 1 +down 2 +down 4 +forward 9 +forward 1 +up 2 +down 7 +forward 9 +down 9 +down 6 +down 9 +down 8 +forward 7 +forward 6 +forward 9 +forward 9 +forward 8 +forward 5 +up 2 +forward 9 +forward 2 +down 1 +down 1 +down 5 +down 1 +down 7 +up 2 +up 7 +forward 7 +forward 8 +down 2 +down 2 +down 3 +up 8 +up 8 +up 3 +forward 3 +down 7 +up 4 +up 8 +down 5 +forward 4 +forward 7 +down 9 +up 7 +forward 8 +forward 5 +forward 8 +forward 8 +forward 6 +forward 5 +forward 2 +down 3 +up 2 +forward 6 +forward 5 +down 9 +down 2 +down 7 +down 2 +forward 2 +forward 6 +forward 8 +down 7 +forward 4 +down 3 +down 5 +forward 1 +down 9 +forward 5 +down 4 +forward 9 +down 5 +down 4 +down 4 +down 7 +forward 9 +down 3 +down 5 +down 6 +down 4 +forward 4 +down 4 +up 1 +down 4 +up 7 +forward 4 +forward 5 +up 9 +down 4 +up 9 +forward 9 +down 8 +down 1 +up 7 +down 4 +up 4 +forward 9 +down 9 +down 4 +up 4 +down 5 +forward 2 +up 4 +down 3 +forward 9 +forward 8 +down 2 +forward 5 +up 5 +down 9 +down 7 +down 5 +down 9 +down 1 +down 7 +down 2 +forward 4 +up 7 +forward 7 +down 8 +down 2 +down 8 +up 6 +down 7 +down 7 +forward 3 +up 3 +forward 6 +down 8 +down 3 +up 2 +down 9 +forward 3 +down 9 +down 6 +up 8 +forward 5 +down 9 +up 2 +up 8 +down 8 +up 1 +up 2 +forward 5 +up 3 +down 7 +forward 4 +forward 2 +up 1 +forward 2 +up 1 +down 1 +down 5 +forward 6 +up 2 +down 7 +down 8 +down 9 +up 9 +down 2 +up 2 +forward 9 +forward 6 +forward 5 +down 6 +up 6 +forward 6 +forward 3 +down 3 +forward 2 +forward 4 +forward 1 +down 9 +forward 3 +forward 2 +down 5 +up 2 +forward 7 +down 4 +forward 5 +down 4 +forward 2 +down 4 +up 3 +forward 6 +forward 9 +down 1 +forward 2 +up 8 +forward 4 +up 9 +up 4 +up 3 +forward 5 +down 7 +forward 2 +up 4 +forward 7 +down 8 +forward 6 +forward 4 +up 5 +down 4 +down 6 +down 3 +forward 6 +down 9 +up 6 +forward 3 +down 4 +forward 8 +forward 1 +down 3 +down 4 +up 4 +forward 1 +up 5 +up 9 +forward 4 +up 9 +forward 2 +up 5 +up 5 +up 7 +up 4 +down 3 +forward 8 +forward 1 +up 1 +down 8 +up 3 +up 4 +up 2 +up 8 +up 7 +down 8 +up 8 +forward 9 +down 8 +up 5 +forward 6 +forward 4 +down 8 +down 9 +down 4 +down 6 +forward 4 +up 6 +up 1 +forward 7 +up 4 +down 6 +up 3 +down 4 +forward 8 +forward 4 +up 2 +down 3 +up 3 +up 9 +down 4 +forward 4 +forward 5 +forward 2 +down 1 +down 6 +down 1 +forward 6 +down 2 +forward 1 +down 2 +down 4 +forward 1 +down 8 +up 2 +down 5 +forward 9 +forward 4 +down 9 +forward 8 +forward 2 +forward 7 +forward 1 +forward 1 +down 8 +forward 2 +forward 8 +forward 7 +forward 9 +down 4 +down 2 +forward 1 +forward 2 +down 1 +forward 1 +forward 5 +down 1 +down 5 +down 1 +forward 2 +up 9 +forward 2 +forward 4 +down 9 +up 7 +down 1 +up 4 +forward 9 +up 6 +up 8 +down 3 +forward 9 +up 6 +down 1 +forward 9 +forward 3 +up 5 +forward 9 +down 1 +forward 5 +up 5 +down 1 +up 4 +forward 3 +forward 1 +up 4 +forward 3 +forward 9 +down 2 +forward 5 +forward 4 +forward 9 +down 5 +forward 8 +forward 1 +down 3 +down 2 +down 3 +up 8 +forward 3 +forward 6 +up 8 +down 6 +forward 8 +forward 1 +down 8 +down 7 +forward 8 +down 2 +forward 8 +down 4 +forward 1 +down 1 +up 6 +forward 1 +up 7 +down 2 +forward 5 +up 9 +down 5 +forward 4 +down 6 +down 9 +forward 8 +up 2 +up 7 +forward 2 +forward 5 +up 9 +down 4 +forward 9 +down 4 +down 3 +down 6 +down 9 +down 9 +down 1 +down 1 +down 7 +down 4 +down 7 +up 5 +forward 6 +down 9 +forward 7 +down 5 +down 4 +down 2 +down 4 +down 9 +forward 1 +down 9 +down 8 +forward 2 +up 7 +up 3 +forward 9 +forward 4 +down 8 +down 4 +forward 2 +down 8 +up 3 +forward 6 +forward 4 +down 2 +up 9 +down 5 +up 8 +up 6 +up 3 +down 2 +forward 6 +forward 4 +forward 7 +forward 2 +down 5 +down 2 +forward 2 +forward 6 +down 5 +down 4 +forward 8 +up 3 +forward 7 +down 1 +forward 5 +down 8 +down 9 +forward 5 +down 7 +forward 7 +up 6 +down 3 +forward 1 +down 2 +down 9 +down 2 +down 1 +forward 4 +up 5 +up 9 +forward 1 +down 5 +forward 4 +up 3 +up 5 +forward 7 +forward 5 +down 2 +down 8 +forward 5 +down 7 +up 8 +down 5 +down 6 +forward 8 +forward 9 +down 8 +up 3 +down 8 +down 2 +forward 8 +forward 8 +forward 4 +forward 9 +up 7 +up 1 +down 5 +down 8 +down 5 +forward 3 +forward 2 +down 8 +down 3 +down 2 +down 5 +forward 8 +up 3 +down 9 +up 4 +up 1 +up 8 +down 8 +forward 5 +down 2 +forward 4 +forward 1 +down 7 +forward 4 +forward 5 +up 2 +down 6 +up 9 +forward 1 +down 9 +forward 4 +down 7 +down 9 +up 9 +forward 2 +forward 7 +down 7 +forward 9 +forward 1 +forward 1 +down 7 +up 6 +up 3 +forward 2 +forward 6 +forward 9 +forward 3 +forward 4 +forward 9 +forward 9 +forward 9 +down 8 +up 2 +forward 7 +down 8 +down 3 +up 8 +down 8 +forward 1 +forward 9 +forward 2 +forward 3 +down 8 +forward 1 +forward 4 +down 9 +down 4 +up 7 +forward 5 +down 4 +forward 5 +down 2 +forward 6 +down 1 +up 9 +down 5 +up 5 +down 2 +up 1 +up 8 +down 3 +up 3 +down 8 +forward 4 +forward 1 +up 5 +forward 1 +down 5 +up 5 +forward 8 +down 1 +up 4 +forward 9 +forward 7 +up 1 +up 9 +forward 7 +forward 1 +up 5 +forward 6 +down 2 +up 5 +down 4 +down 6 +down 3 +forward 8 +down 7 +down 5 +down 7 +forward 1 +down 7 +up 5 +down 4 +down 4 +down 4 +forward 3 +forward 4 +up 6 +forward 8 +forward 2 +up 1 +forward 5 +forward 6 +forward 6 +up 2 +down 3 +forward 3 +up 8 +forward 6 +forward 5 +up 2 +up 5 +down 6 +down 8 +down 1 +forward 6 +down 3 +down 2 +forward 4 +down 4 +down 7 +forward 9 +forward 4 +forward 5 +down 8 +down 9 +up 4 +up 4 +down 5 +up 1 +up 6 +down 9 +forward 9 +forward 4 +forward 9 +forward 9 +down 5 +down 1 +up 9 +down 3 +up 5 +down 7 +forward 6 +forward 2 +down 5 +down 6 +forward 7 +forward 2 +up 9 +forward 6 +down 7 +up 4 +forward 1 +down 5 +forward 2 +forward 1 +down 6 +down 1 +down 4 +forward 8 +forward 1 +down 5 +down 8 +down 3 +forward 4 +down 2 +forward 9 +up 1 +forward 8 +down 4 +down 3 +down 1 +forward 5 +forward 9 +down 3 +forward 6 +up 6 +up 9 +forward 8 +forward 2 +down 9 +forward 3 +down 4 +down 5 +down 4 +forward 2 +forward 6 +down 9 +down 5 +forward 6 +forward 3 +forward 5 +forward 6 +forward 5 +forward 1 +up 4 +up 1 +down 2 +up 6 +down 5 +down 1 +forward 9 +down 1 +down 2 +forward 6 +up 2 +down 4 +up 3 +forward 8 +down 4 +down 4 +down 6 +up 1 +down 7 +up 4 +down 6 +up 7 +up 6 +down 5 +forward 3 +forward 4 +up 5 +down 2 +down 9 +forward 9 \ No newline at end of file diff --git a/inputs/day3.txt b/inputs/day3.txt new file mode 100644 index 0000000..6216b59 --- /dev/null +++ b/inputs/day3.txt @@ -0,0 +1,1000 @@ +111100000101 +001110100010 +101110110011 +100000001101 +001101010011 +101111110000 +011101110001 +000000010111 +011011000010 +110110010000 +011101000000 +110010001001 +101110100111 +001001101111 +101001011010 +101001000001 +101110111101 +010100101100 +001000110010 +010100011110 +100100000001 +000110011000 +110100100001 +111000110000 +000111100100 +101100110100 +101111101001 +101110101001 +010010110001 +000111100001 +001100001000 +100011101001 +100010111000 +000001011000 +001011110100 +011110010001 +110000011010 +100011011111 +001001110101 +001010000101 +100000010010 +000011100010 +101010110101 +001110000101 +000111101101 +010100101010 +101111101011 +010001100000 +110101100010 +001001001111 +001101011010 +111010010101 +110001000011 +000011110100 +100010111101 +111100101110 +110110001101 +001000011011 +101110101110 +111011101110 +010000110001 +101111011111 +000001001110 +111101100011 +000100000000 +100001001111 +110010000010 +101111010011 +010000101000 +011010101111 +110101101100 +101101011100 +100101111101 +011101011110 +111001001000 +100111001101 +101101000100 +110111111010 +011001101001 +111101010110 +001111001110 +111100010111 +000100111100 +011100101001 +111100111100 +101000011100 +011100111100 +011010110010 +101111101101 +010111101010 +001011000111 +000010011111 +101000100110 +000100110101 +100101001100 +010100110110 +011111100110 +000000101011 +111111101110 +001011101101 +000010001101 +001100100100 +101010010111 +100010011001 +010100000110 +010000001101 +010001101011 +000111111001 +101110010010 +011100101000 +010101010001 +111011110111 +000010110001 +101111000111 +001101110000 +111111011011 +100010011010 +001011011010 +110111001001 +110101110100 +101100111100 +011110101010 +010000001010 +001111100001 +000110000110 +111010111010 +101110100100 +000001110010 +110111001101 +000001101000 +000010001111 +110000100011 +000000001001 +000111111110 +111101111010 +010110101010 +110101011111 +000111000110 +111001100001 +101111100000 +011011010111 +101011010111 +110011101111 +001110001111 +010001100100 +111001010000 +100111000100 +110101010100 +000011111101 +100010010000 +110110100100 +100111011110 +101011001101 +111011100110 +100000010000 +110000001111 +001000000111 +111011011011 +101111101000 +001110001010 +100110000000 +110001100110 +011110100010 +000001010110 +010100000101 +101010101010 +001101000110 +110100001111 +110000001101 +101101000000 +101101101011 +111001100101 +101010001111 +101101001101 +010111101011 +101000101101 +001010000111 +011110111001 +001011101000 +101101000010 +110111111110 +110001011011 +101111101100 +101110110101 +101100111101 +001110001101 +010111000110 +110101110110 +101001101001 +010100001000 +011011111110 +111010010001 +101110100000 +000101111100 +001111110111 +001010110011 +010011011001 +101111100001 +100101111110 +010001010011 +001101110001 +011100001000 +101100000101 +000111111101 +010101110000 +100110001100 +010101111100 +100101110100 +110111000001 +101110101000 +000011010000 +101011110101 +100011110100 +111100010110 +110100011001 +001001001100 +010110111000 +001000101111 +111101001110 +011110000011 +000111000100 +001101110101 +110111011101 +100000111001 +100000001001 +110110111011 +010011000110 +000100010101 +100101010001 +100100101100 +010001001100 +000010001010 +101100101101 +011011101111 +100010111011 +111111101111 +110001100001 +101011101111 +000100011101 +111000010001 +000001011001 +001101111101 +001000000001 +010100010100 +110010111011 +010100100011 +001010001010 +111111011010 +100101010101 +000111000010 +011010100000 +010100111111 +001011100010 +101010001011 +111011010101 +100100100111 +101110101010 +111100101001 +111010001000 +000100001111 +011010001000 +011011100100 +110011011111 +110111100010 +000100001100 +001001101101 +110111110011 +101111001001 +101010001001 +011011000111 +000110001001 +111011001010 +000110000100 +000000111011 +010110110110 +101000000000 +011100101111 +111101111000 +001110011100 +111110011001 +000010111000 +010111001100 +010010111111 +110101100111 +000110111010 +000001111110 +111000000000 +001110011101 +100000111100 +100010100001 +010011101100 +010001101010 +001001101011 +110100010100 +011000000110 +011000011001 +010001101111 +000101001111 +011101111101 +100010010011 +100101111000 +001101110111 +001000000000 +100100101011 +111000100011 +101100011011 +000000101101 +001110010011 +001010010000 +011000001110 +101011111001 +110101100000 +011011111010 +001000011111 +011000100000 +000010101100 +111100010011 +101010000011 +001100111111 +000001111000 +111101110101 +001010100111 +011100111111 +111010111000 +100101011111 +011100001101 +001011000011 +110001110110 +000011101000 +111110010111 +100010101101 +110001011101 +011010100010 +001110000011 +101001101111 +100110100100 +011010000111 +001111010011 +110111101111 +110101100101 +100011010000 +011110000100 +010110100010 +011000111001 +011111011010 +011110110101 +011011110111 +001111100101 +101110100110 +101010100000 +110100001100 +111010110101 +011010001111 +000010111110 +100110010111 +011100011011 +100101100011 +010110111100 +010011110111 +111001011101 +000011111100 +000111111111 +101000111010 +010110110011 +100110101111 +100010111010 +111001111111 +000110110011 +010010111101 +110001100011 +111100001000 +010011000011 +011011101011 +001010101101 +100011010011 +001100101110 +111000111111 +101001011101 +111011010011 +110101011101 +001011010111 +011001010100 +010011010100 +011100100110 +101111110001 +110111111101 +111110100110 +110001100000 +010110010011 +011100110001 +010111111011 +001010101000 +010100101111 +111101000001 +100000111010 +001010100000 +000001011011 +100111011101 +100011110010 +011111010000 +111001010110 +110111111100 +010110100011 +101111111010 +110111110000 +111100000110 +111101011110 +100101111100 +111110001101 +111110011110 +010101100010 +110101101101 +111100001101 +000100011100 +010011110011 +000100010100 +000110110010 +001010111000 +110111001111 +110101000101 +100011110000 +101010010010 +111110000010 +111011001011 +010110111010 +011101010100 +010010101010 +010011110001 +010000010110 +101111000011 +111111010100 +001111001001 +101001100111 +000011011111 +100111000001 +010111010110 +010100011100 +010100011101 +001111110011 +101100010111 +101110100010 +111101110100 +100100100010 +111010011011 +010110000100 +100100010100 +101000011010 +101001111101 +010000010001 +110111101101 +000001110110 +010001110100 +100100110001 +011111010111 +100000000110 +100001110110 +000001011110 +011000001100 +011001110110 +010010101110 +111100111000 +001010010011 +000001000001 +100010111001 +010001011111 +001110000000 +000010000000 +001101110011 +010100011001 +000001001010 +110001000110 +100010100101 +011100010001 +101100000110 +001001100000 +110100000000 +000010100010 +101101100111 +100001111011 +011000011101 +110100110010 +001011001101 +000111001110 +011100100100 +100010000100 +001101100000 +100010011111 +010101010111 +000101010011 +100011100000 +100001011101 +110011111100 +111010011001 +001011110111 +011010010100 +000011001110 +010110111001 +111000001001 +011100111010 +011111000010 +101100111010 +010100111101 +111001100100 +101111010110 +110111110100 +111110101010 +010011001110 +110101101001 +111101011000 +001010001101 +101111000010 +111110000111 +110000001100 +011111001101 +101001000101 +010111001011 +001010011110 +111010100100 +110000101000 +011101000011 +010010100110 +111010000001 +111101000111 +001010100101 +101011001100 +110010111001 +111000111100 +100101011101 +110010101001 +010010111000 +010101001110 +110000101111 +001101001101 +001000101011 +001110110111 +101111111011 +111001100110 +100101110000 +010000011011 +001010000000 +011001010110 +010101101010 +100100000011 +110010101110 +110011101000 +001010001000 +010000101100 +100110011110 +001010001111 +111010001101 +100100010000 +100100111001 +111111010110 +100010011101 +110100100100 +000110011101 +000101101001 +001011001100 +101000000001 +111101100000 +110110111000 +111111000010 +001010111011 +011011111000 +010111000101 +011100110011 +111111100010 +000000100010 +001000011110 +010001011001 +111100111101 +001111010010 +010110011011 +111110001110 +101111100100 +011100011101 +111001111001 +101001000100 +001011000110 +100011010101 +001101100010 +110111101110 +010101111000 +111010000111 +000110010111 +001100111101 +100000101101 +000110101000 +011000011100 +000101001110 +011010101100 +100010010100 +001001111001 +101100100000 +010011011000 +100110101011 +110111110110 +100111001100 +111010010011 +000100011110 +011100011000 +010000011001 +100110011010 +010000001000 +101010011010 +111111011100 +010110100111 +000110001101 +001011111000 +011010111001 +111011011101 +110000010110 +100110111001 +110010000001 +110001011110 +111100001010 +101110111100 +110011110100 +101111011101 +000101010010 +001111000110 +110010011010 +000010010001 +001110110110 +111101100101 +000000111101 +011110000110 +111011001101 +110111000110 +101100110101 +010001001001 +001010110101 +101100011010 +100011001010 +001011101110 +101000010110 +100100111011 +001011101100 +111110111010 +110011111010 +000001111101 +010000110111 +101101101100 +000110000000 +111110110100 +101100000010 +011000000001 +001000001001 +111101111011 +010100001110 +111100101000 +011000010111 +001000111101 +100000100101 +110111000101 +001111100000 +101110111001 +000100101111 +101011010100 +101111111001 +000010000101 +001100001111 +101001011001 +001110111000 +010011011101 +110110111001 +011111010010 +100111101011 +101110011000 +010011100110 +101111000000 +101000110111 +001100000111 +110001101111 +010011101010 +100100000111 +100011111101 +010111010010 +001010111010 +011111010110 +101101100101 +011110001000 +000100111111 +001010111100 +101101100000 +010010000011 +010011010111 +111000011110 +110111010101 +100100101000 +101001001000 +001111110100 +111011110101 +110001000100 +100111111001 +101010110100 +010111101001 +011011010010 +011111101010 +111100111110 +110011101101 +110110101101 +110010100101 +111110101111 +000011110011 +001100001011 +111110110111 +011011101100 +110111101011 +010111010000 +101000010111 +010100010001 +111101100100 +011101101010 +010000110110 +111001110000 +111111000100 +011001100000 +111100101111 +011001001011 +110100100011 +011001111000 +101010001100 +100010001110 +010111110110 +001011011111 +000001011100 +010010001111 +011101011000 +001010011010 +100010011110 +010011000111 +101011011111 +100101000010 +110111010111 +110111101010 +010100001011 +001001010011 +001011001111 +011000001111 +010100000111 +100011001111 +110100111100 +101110010000 +000010110010 +100010100010 +001010011000 +010101100101 +101100010001 +011011001010 +000101100000 +000101111010 +001001110010 +100011100001 +011110111011 +100000010111 +100001001101 +111000100010 +011000011000 +100001100010 +000000110011 +000101010111 +000101000100 +110111000111 +001100000000 +110100010110 +101001000011 +110111100100 +000111100011 +101110001001 +000010011101 +000011010111 +111101011001 +111010001111 +000100110100 +000011100001 +100100111000 +100111101110 +001110101011 +000111110100 +110000010111 +110010011111 +000001111111 +101011110011 +101100001101 +110101111011 +011111000111 +011110011011 +001000010110 +110110110100 +010101001011 +000100111000 +011101111111 +000111101001 +110101111010 +110000111001 +011000111101 +001101001010 +110100110100 +100110010001 +100000000100 +001100111000 +100000001110 +101000011000 +100010110110 +101011001001 +010010001010 +111011101100 +100010100110 +101101000111 +100110110101 +111001010100 +101000110000 +000101011010 +010001010110 +010111011110 +001101011110 +000100000101 +000001011101 +010010100000 +110110010001 +100111000111 +100010110000 +010110100000 +110111111111 +011111011111 +001011010010 +001111100011 +100010110100 +011010001011 +110011001010 +101110111000 +111001010011 +010011010101 +011100100101 +101010110011 +001001100101 +110010100000 +011000111110 +011101001110 +110110000100 +001111101100 +101100010100 +110001100101 +111111010001 +011001100001 +110100000101 +000000010000 +110101000111 +100100110100 +010010110100 +010010000100 +011000111111 +011001101010 +011111101110 +110110010100 +110001001110 +111111100011 +010001100001 +001001111011 +000101110010 +011111110111 +000011000110 +110101000001 +101110000011 +000000111010 +000101110011 +000011100111 +010010010011 +110011011010 +111100100100 +110010011101 +100001001000 +101000110001 +101001010011 +111000111101 +101011111000 +110011110110 +111110100011 +010110100100 +010101000011 +001010101100 +101010101001 +111100100000 +001111011111 +110101010011 +101111010000 +110011110010 +110110110001 +011010011110 +100010010101 +101000101010 +010111010001 +000001111100 +001000011001 +011110110001 +110100011000 +110000111110 +001001011100 +110110110101 +011011100110 +011110010100 +111011110110 +111110111001 +111010010100 +001000001011 +111101010011 +100111101010 +010100001100 +111101111111 +000111111000 +001010011101 +100000001011 +010010001110 +011011011101 +100000000111 +100101100100 +001110000010 +000000000000 +101000110100 +011010110001 +100001101110 +110001110011 +101100010000 +001111111111 +111110110101 +010111001101 +011001000001 +111110011100 +100100011010 +001000011000 +011101101100 +100110111111 +111011011010 +101001101000 +010011110000 +110010110011 +111000000001 +101101110110 +111000001101 +011111001001 +010010110101 +001100010101 +111011110010 +100011000101 +111010000100 +011001111101 +111010011110 +111011111011 +110110011010 +011111011011 +010010001100 +110100111110 +010100111011 +110110011101 +110011010000 +110001001010 +000011000111 +100011101101 +101010100010 +110111001010 +100101101110 +111100101010 +110001011001 +011010011001 +000001111010 +001010101010 +010001110000 +001001111100 +011110000010 +000100010001 +110100000110 +010110111011 +001100111100 +111100011000 +011011011010 +111001001010 +110110100111 +001011000000 +000001110001 +101100011100 +100011000011 +001100010001 +000100111011 +001001110011 +100111111100 +111010001001 +101001000110 +001101000100 +110000000100 +111010110011 +000101110000 +010000010101 +000110111001 +100100100000 +110010001011 +110111100011 +101101101001 +100001100100 +000111010100 \ No newline at end of file