From 86c172cb2ff14215244f52249d30586014a482c6 Mon Sep 17 00:00:00 2001 From: not manx Date: Sat, 5 Dec 2020 14:53:11 +0000 Subject: [PATCH] Initial commit Signed-off-by: not manx --- .gitignore | 11 + AdventOfCode.sln | 25 + AdventOfCode/AoC.csproj | 18 + AdventOfCode/AoC.csproj.user | 9 + AdventOfCode/Contracts/Day.cs | 43 + AdventOfCode/Input/2020/Day5.txt | 761 +++++++ AdventOfCode/Input/2020/day1.txt | 200 ++ AdventOfCode/Input/2020/day2.txt | 1000 +++++++++ AdventOfCode/Input/2020/day3.txt | 323 +++ AdventOfCode/Input/2020/day4.txt | 2058 +++++++++++++++++++ AdventOfCode/IntcodeComputer.cs | 149 ++ AdventOfCode/Program.cs | 98 + AdventOfCode/Properties/launchSettings.json | 8 + AdventOfCode/TwentyTwenty/Five.cs | 165 ++ AdventOfCode/TwentyTwenty/Four.cs | 106 + AdventOfCode/TwentyTwenty/One.cs | 57 + AdventOfCode/TwentyTwenty/Three.cs | 54 + AdventOfCode/TwentyTwenty/Two.cs | 80 + AdventOfCode/Utility.cs | 60 + AdventOfCode/Utils/Collections.cs | 23 + 20 files changed, 5248 insertions(+) create mode 100644 .gitignore create mode 100755 AdventOfCode.sln create mode 100755 AdventOfCode/AoC.csproj create mode 100755 AdventOfCode/AoC.csproj.user create mode 100755 AdventOfCode/Contracts/Day.cs create mode 100755 AdventOfCode/Input/2020/Day5.txt create mode 100755 AdventOfCode/Input/2020/day1.txt create mode 100755 AdventOfCode/Input/2020/day2.txt create mode 100755 AdventOfCode/Input/2020/day3.txt create mode 100755 AdventOfCode/Input/2020/day4.txt create mode 100755 AdventOfCode/IntcodeComputer.cs create mode 100755 AdventOfCode/Program.cs create mode 100755 AdventOfCode/Properties/launchSettings.json create mode 100755 AdventOfCode/TwentyTwenty/Five.cs create mode 100755 AdventOfCode/TwentyTwenty/Four.cs create mode 100755 AdventOfCode/TwentyTwenty/One.cs create mode 100755 AdventOfCode/TwentyTwenty/Three.cs create mode 100755 AdventOfCode/TwentyTwenty/Two.cs create mode 100755 AdventOfCode/Utility.cs create mode 100755 AdventOfCode/Utils/Collections.cs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4955e38 --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +bin +obj +AdventOfCode/Input/2015 +AdventOfCode/Input/2016 +AdventOfCode/Input/2017 +AdventOfCode/Input/2018 +AdventOfCode/Input/2019 +TwentyFifteen +TwentySixteen +TwentyNineteen +.vs diff --git a/AdventOfCode.sln b/AdventOfCode.sln new file mode 100755 index 0000000..0347cb3 --- /dev/null +++ b/AdventOfCode.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29411.108 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AoC", "AdventOfCode\AoC.csproj", "{8511470D-BE2D-46EF-8DEF-6446A109E2AD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8511470D-BE2D-46EF-8DEF-6446A109E2AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8511470D-BE2D-46EF-8DEF-6446A109E2AD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8511470D-BE2D-46EF-8DEF-6446A109E2AD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8511470D-BE2D-46EF-8DEF-6446A109E2AD}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {D3D5C89C-5551-41B3-95B5-9B98D3AE8C6B} + EndGlobalSection +EndGlobal diff --git a/AdventOfCode/AoC.csproj b/AdventOfCode/AoC.csproj new file mode 100755 index 0000000..de16c06 --- /dev/null +++ b/AdventOfCode/AoC.csproj @@ -0,0 +1,18 @@ + + + + Exe + net5.0 + + + + + + + + + + + + + diff --git a/AdventOfCode/AoC.csproj.user b/AdventOfCode/AoC.csproj.user new file mode 100755 index 0000000..6e528a9 --- /dev/null +++ b/AdventOfCode/AoC.csproj.user @@ -0,0 +1,9 @@ + + + + ProjectDebugger + + + AdventOfCode + + \ No newline at end of file diff --git a/AdventOfCode/Contracts/Day.cs b/AdventOfCode/Contracts/Day.cs new file mode 100755 index 0000000..c6bc8bf --- /dev/null +++ b/AdventOfCode/Contracts/Day.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; + +namespace AdventOfCode.Contracts +{ + public abstract class Day + { + public abstract int Year { get; } + public abstract int DayNumber { get; } + + private List Output { get; set; } = new List(); + + protected void Print(string part, object output) => + Output.Add($"{Year} Day {DayNumber} Part {part}: {output}"); + + protected void Print(string part, long elapsed, object output) => + Output.Add($"{Year} Day {DayNumber} Part {part}: {output} {Environment.NewLine}Time: {elapsed}"); + + public void Write() => + Console.WriteLine(string.Join(Environment.NewLine, Output)); + + public void Execute(bool bigBoi) + { + string[] input = File.ReadAllLines($"../../../Input/{Year}/day{DayNumber}.txt"); + + Part1(input); + Part2(input); + + if (bigBoi) + { + BigBoi(File.ReadAllLines($"../../../Input/{Year}/BigBoi/day{DayNumber}.txt")); + } + } + + public abstract void Part1(string[] input); + + public abstract void Part2(string[] input); + + public abstract void BigBoi(string[] input); + } +} \ No newline at end of file diff --git a/AdventOfCode/Input/2020/Day5.txt b/AdventOfCode/Input/2020/Day5.txt new file mode 100755 index 0000000..0837989 --- /dev/null +++ b/AdventOfCode/Input/2020/Day5.txt @@ -0,0 +1,761 @@ +BFBBBFBLRR +BBFFFFFLRR +BFBFBFFRLR +FBBBBFFLLL +BFBBBBFRRL +FFBFFBFRLR +FFFBFBBRRL +FBFBBFBLRL +FBFFFBFLLR +FFBBFBBLLL +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RL +BFBBBBBLLR +BFFBBFBLRR +BFFFBFBLRL +FBBBFFFRLL +FBBFBFBRRL +FBFFFFFRRL diff --git a/AdventOfCode/Input/2020/day1.txt b/AdventOfCode/Input/2020/day1.txt new file mode 100755 index 0000000..7662181 --- /dev/null +++ b/AdventOfCode/Input/2020/day1.txt @@ -0,0 +1,200 @@ +1706 +1466 +1427 +1744 +1684 +1386 +2001 +1750 +1753 +1770 +1559 +1616 +1408 +1860 +1940 +2002 +1862 +1918 +1456 +1209 +1840 +1462 +1783 +1644 +1901 +1791 +1506 +2005 +1338 +1383 +1420 +1631 +1784 +1897 +1771 +1588 +1955 +1937 +1392 +1396 +1803 +1429 +1407 +1698 +1562 +1913 +1678 +1198 +1398 +1703 +1831 +1489 +1782 +1864 +1708 +1397 +1915 +1953 +1395 +1610 +1549 +1564 +1973 +1931 +2009 +1980 +1800 +1443 +1993 +1900 +1964 +1581 +1904 +1665 +1567 +1057 +1805 +1402 +1878 +1729 +1825 +1682 +1719 +1469 +1004 +1591 +1594 +811 +1523 +1424 +1756 +373 +1442 +1718 +1411 +1892 +1820 +1977 +1871 +1890 +1653 +1372 +1475 +1476 +1422 +2004 +1755 +1676 +639 +1425 +1853 +1712 +1525 +1514 +1455 +1658 +1963 +1579 +1861 +1458 +1474 +1613 +1681 +1586 +1441 +1499 +1865 +1735 +1989 +1952 +792 +1669 +1509 +1481 +1893 +1445 +1834 +1779 +1732 +1826 +1595 +1829 +449 +1920 +1707 +1780 +1935 +1867 +1769 +1107 +919 +1382 +1604 +1875 +1453 +1496 +1946 +1659 +1570 +1692 +1630 +1638 +1922 +1691 +1580 +1880 +1482 +1762 +1775 +1376 +1434 +1856 +1971 +1646 +1951 +1416 +1889 +1773 +1814 +1471 +1488 +1736 +1743 +1459 +1389 +1498 +1663 +1611 +1727 +1699 +1624 +1511 +1767 +1754 +1785 +1491 +1235 +1510 +1500 +1485 diff --git a/AdventOfCode/Input/2020/day2.txt b/AdventOfCode/Input/2020/day2.txt new file mode 100755 index 0000000..7e695b9 --- /dev/null +++ b/AdventOfCode/Input/2020/day2.txt @@ -0,0 +1,1000 @@ +1-7 q: qqqqxvqrkbqqztlqlzq +1-3 q: cqbm +15-16 h: hhhhhhhhhhhhhhbsh +4-16 x: xvbxswpnvxtnfjrxxx +6-7 v: kbbvnswp +17-18 h: hhhvhhhhhhhhhhhhhh +1-7 w: twftdrb +4-5 t: wcjtfpt +3-9 f: mbfvfptbfq +3-10 x: xfxxxxxxxv +5-11 p: ppvhkgpmwfjp +5-8 c: cbhhrtsbpf +13-14 t: ttttltttgttttvht +11-16 m: mmmmmmmrmmdmmmmxmmm +3-13 b: bbbbbgbbbbbkkbvd +7-10 d: ndddwdmdddhddv +4-7 d: gcndnddkwhd +14-18 z: zzzzzzzzzzzzzvzzzzzz +5-6 c: mfcwccckdccfmzc +9-14 p: bppzpwhzdgnpnh +11-19 q: jqhqqqqqqqmfqqqqqqqq +5-6 h: kqhpgl +15-18 w: wwwwwwwwwwwwwwqwwqw +2-10 m: qmmmmtphbrw +10-20 k: jxlnkxnkhlkgkzhxbdvg +8-9 c: ccccccccc +12-19 k: vlkkkkklkzkkzkkckkfk +13-14 s: bsfssqsscsssdj +11-13 p: rmpdppplgcnpwxd +9-16 c: ccccccccrclccqcgcc +3-8 s: snsssmssdns +13-19 t: ttttttttttttttttttwt +7-8 q: dqqqdqqqqnqdq +10-11 w: wwwvwwvhwtvwwwmw +3-6 b: bbsnbpbckbb +1-4 g: gggjg +6-8 b: jvrqbbmb +2-6 t: cvdtzn +3-4 v: vvmd +2-8 z: vmwhtskz +2-6 b: jbrbjbs +1-2 d: ndzwd +17-20 r: xjfmlrrjcnnrmkvhrpwr +8-10 q: qqqwqqqqqdl +2-5 p: phppxpppppppp +9-10 z: zzzzzznzzz +8-9 k: phgksffkrfgp +11-13 w: wwwwwwwwwwnwz +9-11 k: krkkkkqkkkkskkk +19-20 d: dmcwfddgdddvdffdhdld +8-11 f: bflfqsffvfdffmfpfqf +6-10 v: wwqvvvjvrd +4-5 v: vvdvw +3-4 h: hdhh +9-10 d: dndfdddddd +3-13 n: nnfnnnnnnnnnnnnnnmnn +5-12 b: zwqcbkfcbbnbb +5-15 q: qqrdqqqmqqnqqnjkqqqw +6-8 l: vfllklxllclll +3-4 h: hchh +12-16 b: bbbbbbbbbbbhwbbtgbs +4-10 p: ppwxplpppp +4-5 s: szhss +8-10 w: tvdtvbwnlfvkspxp +4-9 z: zzznnkzwdzrz +5-14 p: pppppppppppjpp +6-7 n: hnnnnqnn +1-4 q: qqdqqq +7-8 w: wwwwwwbpww +3-10 x: xfxxnxjxxxpx +5-19 m: kmqhgpjdszvgrfrdlhm +10-12 k: kqqzkkkkkkkk +4-7 l: llpqcgmll +4-5 p: rwppp +2-6 q: mqqhrsdk +7-10 m: cmmvscmmkm +9-18 k: kkkkkzkkqdpkdlkjpgk +2-7 m: xmglcvmkmln +8-12 n: nnnnnnnfjnnbn +4-5 n: nnnnn +13-17 z: zzzzzzzzzzzzkzzzz +1-5 t: mfftmn +2-3 n: nskh +11-18 s: sjssgsssfstzsbhnsw +14-16 d: pgxrmlxdthpdndfdt +2-3 h: hhhhh +3-4 s: hssn +7-9 f: fffffcmff +2-4 s: srwbvhnlqssdpsssx +3-4 v: vvvvvsvxvvh +12-13 x: xxxxsxsxxdxmpjxlxxf +15-16 m: cjcmmmmgdmbnmcmm +8-11 l: hsjlnlvlfchgjlrdl +9-11 k: kkknkkdkdkkk +5-6 q: qgqqfpq +16-19 w: wwwwfwwwwwwwvlwwwtw +2-13 n: nnnjngnwgldsnrnrr +5-6 x: qwbpxx +4-5 x: xxxhx +11-13 t: ctpskdtbwbtkstfj +2-8 z: jwznsgln +17-18 r: rrrrrrrrrrrrrrrrwnr +7-12 v: bkpvwzzsdnsd +5-7 h: hxxnpzh +7-8 z: zzzzzzxs +3-7 z: hzstpkrlht +7-10 p: ppgkppnpdppj +10-11 g: gghhgvgggwf +9-11 q: qqqqxqqqqpqqqq +2-3 r: qrrfr +3-8 x: xvxzsxtxgxb +11-14 q: fbqtzvjdqqhqqrqjrqq +11-16 c: cccpccccccscwccfccn +9-11 m: snmmmcmmsmmmmkm +2-11 m: mmmczqsmclmrvmbzlv +10-15 z: zzzzzzzzzjzzzzkjzzm +3-13 j: jjxjjjjwjjjjbjjjdjjd +7-10 j: sjjqjjvzjjcjrh +8-9 x: xxxxxxxzxxx +4-11 n: nnmnmndfnhqnhnn +16-19 v: kntvxvvvvpvvvvghkzp +6-9 b: pbbbxxjfqvngbvbb +16-17 j: jjjjjjjjmjjjjjjjjj +2-3 t: wttttttt +10-15 c: cccccccccgpcccccc +7-10 j: jjjjjjqjjrj +1-7 f: cffffftfff +8-14 r: rrnrrrrrfrrgscrmr +1-12 b: jbbbjbkwbgbb +13-16 m: mmxmmmmmwmmwmfmmmhbm +1-9 s: fsssssssqs +8-15 q: pxqqqqvbqqsbqzjngkv +3-4 w: wkspxwm +1-7 h: gkfhhhjhhhch +1-4 w: sqrnwwgwqdw +2-6 d: dpdwdld +2-3 m: mmmmm +4-6 p: pppspp +2-7 c: ctcglxx +11-13 x: xxqxxxxxxxxxxd +7-9 c: cgccccbcrc +6-9 p: xspppkppprp +4-5 v: vvfqrv +15-19 l: llwllllllfllllglllcl +10-17 v: vvvvvvvvvgvvvvvvk +11-14 s: sstngtbhsfsgds +3-4 c: dxklc +6-7 l: lllllll +8-10 w: wwwwwwxtwkwnw +3-4 l: sgllkmdpzgzvllzv +7-17 w: zdfsdmwbphwhzwrxww +2-12 l: rbwfpnmzgtsl +3-6 s: qssdwlfbnm +5-16 f: fffffffffffffffzff +12-14 l: lllfllllldlllljll +14-19 x: pxxxxxxxqxxxxxxxkxwx +12-14 b: bbbbbbbbbbbrbnbbbb +2-12 j: trjqljjgrjjq +1-10 q: qqqqqqqqqqqqq +1-6 t: jttttrtt +1-2 v: rpvfcxhcgx +4-5 r: frsrr +1-6 v: jvvvvqvvvv +2-4 v: tvvb +4-5 h: hhchhzhqhcvh +8-9 c: ccphccccccc +13-15 c: cccbccccccxccxclcscc +5-6 b: bbkbpczbs +10-16 g: gdgggggggggggggggg +1-11 f: fmffxfffgcfwfffbzff +3-13 m: mzmmkmntbmmmmcz +1-2 g: xkgq +10-12 r: rbrmrrrrrwrrhrqvkr +7-8 m: wbbmmmmmfmm +3-4 l: dsnt +4-5 k: kkkkkkk +16-17 r: rrrrcrgrrmqwjrpwmtr +15-17 z: zzzzzzzzzzzzzzzzzzz +13-15 b: zbbbbbbbbbbttbbb +8-13 w: twrwwwlwtwwww +10-11 w: wwwwwwwwwwwwwwwwww +4-6 b: pxvqbb +5-8 n: wnnnznngw +4-9 q: njjqqkrlq +10-15 c: cckhfccdhfccccj +10-15 c: ccrktcccgccgccz +1-5 s: dvssx +2-3 w: wwnw +3-4 n: nnnnc +7-16 n: tdlhmgsqknfnwgnnwmn +9-11 z: zgdzzzzwfgjwzzzm +4-5 f: ffpffff +3-6 f: fvgfcff +5-6 f: fkffhhlhrfg +7-13 g: gtflglggggwbg +4-5 w: wwdwrw +8-10 w: hwpzzwwwjbqfww +5-11 f: ftgfffffffpqffffffff +6-7 f: fffffml +6-12 j: jjtjjtjjjzjzjh +4-6 h: phwtrn +10-14 l: lllllllllcllll +6-7 d: hdwxdsk +13-18 w: kwwwwwwwwwwwwwwjwww +3-8 q: bpqtzmqqljll +1-3 c: cccds +4-5 m: mmmmzd +4-7 c: cccjcck +4-6 t: ctdvts +3-10 x: xsxrxshzjxrt +3-6 j: wljvmxqzrjhctx +4-5 v: vwvvcld +8-9 l: blllllvllglllll +4-14 j: jjjjjjjxxsjmjjjjj +8-12 v: bvvvvvvqvvvbvv +2-6 g: pgsgcglt +1-4 g: qggs +7-9 h: phchhpxhqhhh +5-7 z: czzjzrnq +3-4 k: kkkw +2-3 v: vjfv +7-11 v: slrrxhrhnvvk +7-10 t: czhvlfwthc +2-17 m: zmmmmtbmzlwmmmmslbm +1-4 m: fmjz +6-8 d: sdddddddddw +2-5 h: pnfkhrwchvc +2-4 r: brsrktfkqdlhzvvsfhf +3-4 n: qnknnn +7-10 f: rvnzfmfzrfdqkffc +2-5 x: hxxqxkxxw +1-7 w: wwqzwkww +2-3 s: ssps +8-16 d: ddjdddddddddbddddd +10-12 d: dddxddddwldfsd +1-6 v: skcvcwjf +2-7 g: ggggzlggjgwg +2-5 j: rjzfjqjzjtjkfp +15-17 f: bqslszncqcvrpfrff +2-13 d: xcddddddddwdzdmddzd +1-9 l: lllmllxlljlxhll +10-17 p: msbwpcprpppnsbpppzk +2-13 v: vwdvvrsjrvvvpcvvv +5-9 c: xscgtfxjbchcp +4-6 g: jghgfg +7-8 v: vvvvnvvv +10-12 z: zzzzzmzzhbxz +11-17 b: fknnqwzpgbbqnxkckj +1-3 h: zgbpdwdnmmhbnqxm +4-6 t: httsznfnx +5-10 f: fflfffrfvxvgdq +1-3 r: zrrrrrrrrnrr +5-7 k: kkkkkkkkkkk +6-7 r: rrrrrfgrrrz +3-12 s: sssssssssssssss +3-5 t: ttjdtt +3-4 s: zzhslfrtwsj +5-6 d: dddpddv +1-7 q: bqqqdqpqq +10-13 s: ssstscpsslsrsssds +7-8 r: lrrrrrrr +5-10 z: jzfwzlzjlz +3-8 g: grpggggg +1-7 c: jccccjvcc +12-13 n: nnnnnnnnnnnhn +1-5 t: ztwwnt +8-9 z: zszzzzzbzzzz +1-5 p: pppppp +8-9 j: jjjjjbjkcjgj +5-6 x: xwhxlx +5-8 d: ddddwddx +5-17 l: lllztxdllwblllllv +9-18 m: mmgmmzmrmzchvrhqmm +17-18 c: wzsjwnccrgbcwhrmgc +10-17 f: fbdmffffchfcfkfft +17-18 r: rzbzrszcnnrmlrrrzk +1-9 p: cppppppppppp +1-9 t: ttptqthtttct +5-7 c: ncwnhmswscrqgtjtdgcr +5-10 f: dffsfffpffhzf +8-19 n: mnscfmjnnlvznnvlktn +7-8 z: zzzzxzzd +8-18 z: lzzbzbczzhdkzzwzgzz +1-9 x: rxxsxxxxxxxfxxxx +5-10 w: kjrwwptbww +12-13 z: zzzfzzzrzzzzz +5-6 g: gghggg +16-18 q: qqqqqqqqqqqlqqqqqxqq +5-9 c: lmcsxccccqjhmtcq +1-3 x: xxtnxfqzxxx +13-15 w: wddxxwwgqwwxwwww +12-16 r: mrrjmrrrhrrrrrrrrr +18-19 j: nmfjvcjljptwjnjjjjj +1-13 g: ggggggggggggggg +11-15 p: tpldppcbbbpzpvppw +2-11 x: hbxdxxgnqxbxxxxjjxx +9-11 s: nsnsksshzsqss +1-16 k: knkkfkkqkhhbkppvkk +2-4 x: tlwd +5-7 h: npmhclh +15-17 t: ttttttttttttttsttt +5-6 d: dxddrkddhdl +8-12 d: bddjdffdddtkgdhddd +7-8 z: dkxzgbzzlw +3-4 z: pzzz +5-6 t: ttttqvv +2-7 d: tpsdkqds +18-19 c: cccccccccccccccccbcc +2-3 c: hcmj +5-6 l: llllwl +2-6 t: tqtttx +11-12 r: rrrfrrrvrrrcrrrrrrr +9-12 s: dspssssshssssss +1-3 d: ddddc +4-5 t: tbpttzvtqr +4-6 j: jjgjdjj +2-4 t: tbtb +4-5 w: wbwbwwvww +10-11 s: dwsspssssssss +1-8 s: tssssssl +6-8 k: kksgmgkq +6-11 p: pppppppjcpq +7-8 c: ggcccpcclr +13-14 h: hhhhhhhhhhhhbfh +14-15 n: hsnnnnnnnnbnnwmnnn +11-13 k: xxmqpkkcqkkjn +12-14 w: qwkwwwxqwwzwcw +1-17 n: nnnnnfnnvnnnnnnrpnn +2-3 b: xbsgcgnrh +4-5 v: ckpfvkvvswdnh +6-7 q: qqqfqqf +8-10 m: vntcbkgmmm +9-13 m: bvxrzxbmlnmxcvmrwrc +4-5 j: fjjlj +1-3 k: lkskjkkc +8-14 d: ftbhrdxmmfdbkwrsqr +1-6 q: qrwcqqmtsqqhq +16-17 h: zlmjqfbxhhhfmpvsdg +3-8 v: bpwnbflvsljdzfkdmv +8-18 m: mskwllxmbgbrdjmhwmn +9-10 h: hhhhhzhhhq +6-8 t: jttttztv +2-4 m: xmmm +15-17 f: ffffffffffffffjfwfff +3-5 q: xrqqq +1-4 h: hhqfmhhh +14-15 f: ffffffffffhfcffd +2-11 w: fjjnmtswwwbhwcrgjwgd +4-9 q: qqqqqhqxqqxqt +8-11 g: gggggggcggggggggg +1-5 s: dbstvs +2-4 z: zzzgz +10-13 r: rrrrrrrrrrrrr +3-4 r: wrzr +5-9 c: cccddcrfccc +2-8 k: vkkvlgvvsqzzkkvnk +8-9 d: djdxdddwxdqrd +5-7 j: cjjpjggqhjwtth +5-15 n: nmnbnmnrxnrkznnvnn +3-13 j: cjjjjvgjqdjjdqjr +6-7 r: rzkrrvr +3-5 v: nvczvzgrnk +6-7 x: xxxxxdv +2-5 c: hccpcw +9-16 d: ddddddddddddddddd +6-9 c: ccfccdpcqccccp +4-5 q: kqtqq +1-2 z: zzzk +9-13 d: ddddddddddddd +5-8 q: prfjgqvzqbqqqq +2-6 h: rhrvghkfx +3-10 d: rddszpfmrdfgqt +7-11 w: wwvwwwkwwwlwwwwwww +7-9 b: bbbbbbbbm +1-2 r: ffnppzhtrkj +1-10 m: mxnmfmlkwmwpkj +3-10 n: nnwmnxnxnnl +14-16 p: pppppppppppppfppp +1-2 m: mmgn +11-12 p: hpppppkpppppp +6-14 l: lfvlllscxnlpll +11-12 r: rrrbrdrrrrrm +3-6 w: wwwcgw +9-12 b: rbfhbqblnbbbbdb +5-6 m: hmmkmmqmkm +4-6 q: qclhqjqq +4-16 l: lllnpllllllllllblllr +4-5 m: nxcmmtmr +3-5 q: qmblr +4-5 m: mmmmm +16-17 b: bbbbbbbbbbbbbbbcbb +1-7 p: tjppppppppp +5-6 k: kkkksf +2-10 x: cxjbfjkwjxqwzjxcbq +2-5 t: tsjkfn +4-7 g: xgbcrst +4-5 x: xxxxxx +2-5 s: sszxb +4-12 k: wcrkhkgkzklkqkh +8-10 b: bbbbbbbnbn +2-7 k: fkzfkkkkkklk +4-8 w: wwwwwwwww +4-8 h: hhhhhhhjh +4-11 h: tgbhnnrzpshbjhq +6-7 b: bsbdqbbb +2-6 t: sqvtbgttbftt +2-7 c: mctjgnn +3-8 m: ktthpgrfmrqkcj +5-7 x: whcxpgxvfq +5-14 w: wwwwwwwwwwwwwww +2-14 m: nmbxjbsmfjhdxmswks +7-11 b: jbbprkhndbqclbb +5-7 f: ffbfhfq +6-10 z: zzzzzzzzzzzz +4-7 d: mkdddgdhdh +2-4 d: pkjd +5-7 c: ccctqptcccccc +15-16 h: hshfjthnhssrvdhb +4-5 b: bbbxb +5-12 l: llllmllllllnl +3-4 t: tbgt +5-9 w: wwvzwblwgwwwwvwww +3-4 g: mmggfggg +8-14 j: jnjjvjcjtmpjtjjxcpw +8-9 h: hhhhwhhpch +5-7 v: vvdzhcvv +16-17 v: vvvvvvvvvvvvvvvtq +12-18 s: sdcvjsfqtgnhcsmmsm +6-13 n: hnqglmrjfgdnnpvtjr +12-13 q: qmqqvqqqtqqvqqq +1-9 z: nzzzzzzzzzzzzzz +1-4 l: lllllll +15-17 j: jjjjjjjjjjqjjjpjhj +2-3 t: bttb +3-4 q: qqqx +1-3 t: wtjt +18-19 x: xgnmxxljxwxxztxjvxx +2-4 n: pkpf +17-19 s: sssvssssssssssssssss +13-14 l: llqlllllllllll +5-9 m: mxgnmmrdmzll +3-5 m: mmcmmmmwmmm +4-8 b: bbbbbmplb +4-6 x: xxxxvx +1-2 m: lvfb +9-10 n: npnnnnnpnnnn +3-5 m: mmnmwmmmm +15-20 r: mwrrrrrrrwrrrrrrnrrr +1-2 l: rzlll +9-11 s: sssdssnssts +3-5 c: lccncc +13-14 v: vvvvvvvvvvvvvv +2-12 g: vshnfnhkzgjgkqn +6-9 k: kqskrckkwg +18-19 v: xzwbgvvnwlprqdxvshl +16-17 v: vvvvvvvvvvvvvvvzv +6-13 m: vkmmclmmwjfcvnmmm +5-11 j: sjjjqwjjrjjqj +5-7 q: djqhqcqhlz +8-9 f: fffmcfftw +12-14 x: xqpnjxjxlpxwxxb +7-16 h: hhhglhnhbcxhvhhxhh +12-13 v: vcvxvvvvvvvvvvv +12-13 g: ggdngtlxwlrtsgcgmtgm +5-6 n: nhnnhcn +3-4 n: nnngwk +9-10 k: kkkkkkpkkk +6-11 r: rrrrrkrrmrtr +3-9 d: dwdwdddqnfdddddddd +8-15 q: qvqqxqqwqrqqqfjq +6-7 f: ffffflf +4-9 m: rpmsmphdmmbpdmmhmpr +3-9 q: qqqqqqqqcq +3-4 d: hddds +2-4 f: rcfj +3-4 k: kkhn +6-9 n: npnnnnnlj +1-6 k: tvspqddqktkkqkvk +11-12 x: slxrptmpfqtp +12-14 l: jjvwhlldtlllllh +13-14 g: ngggggggggggks +14-15 z: zzzzzzzzzzzzzjvzz +5-6 l: vbsnvllnhlchblllc +7-13 z: zgczzbzgzlpnczzz +17-18 v: vvvvvvvvrvvvvvvvvvv +15-16 h: hhhhhhhhhghhhhhh +1-5 n: snnqv +6-7 m: mmmmmmmm +15-17 p: pppppppppppspqpppxp +12-14 w: wwwwwhwwwwwwwwwww +4-8 s: fssltbzbsrn +5-7 g: gkxgbggg +15-16 s: ssssssssssssssss +2-4 l: lxtswwg +5-6 p: plppzkpp +9-10 r: srrrprgrhrrrvrr +1-2 d: ddlhchdfll +3-4 j: jjwg +7-11 b: bkfbvbdvzlbz +7-13 q: qgvwkzkrkvvks +2-7 c: ccjtcbccccgv +2-3 q: fqqq +3-4 b: btssh +6-7 m: mnmmmmm +3-4 n: nrnn +5-14 n: fcsxngnnkqxnjnn +14-19 x: rmxcxxxxwxzxxhxxxlc +3-13 q: qqqqqgqmdshrqnqlqlqt +14-16 v: vvpvvvvvjvvnvvvvvvvv +15-16 c: cccccccccclcccch +4-6 v: hvvcvv +7-9 d: dcdmddxdld +16-18 x: rxxxxxxxzxxxxxxxdx +11-14 l: llcsqllgvfmhlvtvb +7-10 h: hhhhhdmhhwhhhh +5-17 g: ggggggggggggggggg +4-6 q: fbsnmzqdsqsqfpdr +12-16 n: fnnlvnflmcnndtfnlw +8-13 c: cpwshcvbccbjmlch +7-9 l: sfhcltwlc +9-13 w: xwwwwxwwwwwgwwkw +5-6 q: kqqqqqjqqqqqqk +14-17 k: kkkkkkkkcvbkkqxtkkkk +8-9 h: qjhxhjhzl +3-6 l: jlllvl +10-11 q: shkxnqwfrhhznlb +3-9 l: dwbvfgngtzcbhzlft +16-20 b: qstrwcrclxzbwtlbpnwb +8-10 n: ndhpptnnnjnnnbnn +4-8 l: lllnlllw +1-3 v: vdfxksvvn +14-17 b: blbbmbbbbbbbbbxbbbb +9-10 t: tttrkltgfbtth +10-12 n: njhnnnznnnnn +8-9 w: hfwwdwwww +4-5 c: scrcccwc +17-18 t: ttttttttttttttttmp +10-11 t: tttttttttvjtttttt +1-3 m: mdlrc +8-9 r: zrnjxkbrrppzgvf +3-4 d: sqddksgdjmd +3-5 m: mmmmmmm +1-8 h: nhclfdhlqwhhczn +2-7 c: bbcbccgxhcwn +4-6 l: zldqlgl +9-11 n: pqbxnxfzhtd +2-15 r: drmrjfxlqvmlcnwlbn +14-15 k: kkkskkkkkkkkktk +4-5 x: mxxzsxxxxx +1-2 p: hhfwz +6-13 b: mbdbkbpbjbbcb +12-16 t: tthfzkrqvhltzhlttwtw +6-11 h: hhhhhhhhhchzh +3-8 q: knndgrkmnqqxjj +5-7 v: svkvhfvv +6-9 r: rrrrrwrrrrr +3-10 p: pspxqhpxfqp +3-9 z: xfzzmjgqzgjzczqpnj +6-10 n: nnnncrnnnqnnnnn +1-7 k: kkkkkkkkk +2-4 m: mhmj +3-7 j: qjtjjmbjjkfjjrj +2-7 r: nrdxvnr +1-2 l: wrrr +3-4 t: ttjktt +9-13 l: lllllllclslllll +12-19 p: cpplpppphpppppdpntp +10-12 p: dnpppppppwpgpppp +2-4 z: pzzb +1-2 k: kpkt +4-7 r: rrrrrrq +1-7 t: xttwtnqttd +1-4 g: zngs +4-6 d: qszrkcxxdt +1-6 b: cpbhfm +3-4 m: knmn +9-11 c: lpdbchcckwnrc +3-4 r: rrrrr +12-18 q: qzqqwqqqqxrqqwqqqdqq +6-9 v: wvvvvpvbq +6-7 g: sggxxdhl +12-17 b: mbsgqwvzlnjskhxctt +4-5 f: rsfkc +9-12 h: hhhhhhhhshhhhhh +4-5 p: nppcn +3-5 g: ggwsmggsgggfg +4-6 p: gppfpsh +13-14 v: fvftvjtqvxsqhzrv +2-3 l: jlmbl +2-4 v: wwjvv +4-8 l: lllhlhllmlplg +1-14 f: znvtwnmslnfhjrds +3-10 z: zzhzkhzzlkdxzzz +17-19 r: rrrrrrrrrrrrrrrrrrrr +15-16 q: qpvqdgqkqqqqqqqq +5-12 k: wkkkkknkszpkkrk +3-8 j: jjhjjjjwj +2-12 s: qvknfbrpsrfsp +11-12 j: jjjjjjlfjjcrzjtj +3-13 m: mmmmglpmhtrfvmfmmmx +6-17 l: lllllblllllllllldll +4-5 q: rqqnqqqqq +8-9 p: fppppnspp +11-17 q: pqqqqqqqqqjqlqqqqd +3-4 l: lslll +1-10 r: bgrrrrrrrprrr +12-17 g: gggwjnxgmggngggrgpg +14-16 z: zxzzzzzzzzzzzpzgz +4-12 t: sttttttttttttwtz +6-7 x: xlzxxxxg +3-4 g: ggcg +3-11 c: zblkwrxvcnl +3-16 l: lhlljbljsllfhlklrlv +8-9 v: vvvvvvvvtp +2-5 f: fpbqcglx +3-15 g: cwmgbgntbgwccqggpv +4-11 m: mwwfhdgxdsmxckqcqvpg +12-14 v: vvpvvvvvvvvfnwvv +2-4 b: bbsxbwqbbx +4-7 s: knsnxlsmg +3-4 z: zzzzz +1-4 x: mxxxxxxx +2-7 w: pxwmtbkskmmfcddczqd +9-12 b: bbbbbqlbgbbb +3-4 l: mlqrlchqn +2-3 b: bbbb +13-15 x: lxxfjvqxhxhlxxx +5-8 m: mtmnkvmcm +3-7 v: xvwvvvwbtvs +2-16 x: wsbhsvzxbjfjwlzlzr +3-4 d: dzrd +5-7 l: llllllml +14-15 d: dddddddddddddwb +6-7 t: ttttfbttg +11-12 v: vvvvvvvvvvvvvvvv +11-14 z: zzzzzlzzzzdfvjtzk +4-20 b: jfnnqxxvxwhbfmbxqdxq +6-9 d: dddddzdddd +1-2 s: rnwsscss +2-3 q: kqkrhq +8-16 r: krlrxhrchrrrrvrkr +5-7 r: svcrrfq +2-13 b: bbbbbbbbbbbbbbs +3-7 k: pdxkstw +9-16 w: wwwwwwwwvwwwgwwww +3-5 g: gbgkggpcmjgrc +13-15 d: dddmdddmdddmldg +3-17 t: tkpttktttbttttttt +1-5 n: pnnngnnn +3-4 f: ffhf +3-7 p: tqpnncpczlp +4-13 b: ppbnsfztshmbbggn +1-4 r: rvlrrqrrrt +4-8 s: snfwsssrsrrssssszp +1-7 w: fwwwwwww +1-4 d: fdjb +7-8 l: llglthmjvlllt +7-8 w: wwwwwwzjw +7-9 v: zrgvvvvvvv +2-7 d: pdddzvh +2-9 w: nwwwbjswwxwxczlmh +5-10 w: wwcwwwwfwwghwbw +6-8 n: dqgnqjnnnnn +4-14 r: rdrfrrrrrrrrrvrrr +10-11 d: ddddddghtdfdhd +2-6 n: gngqzn +6-7 f: ffffdff +5-9 b: bbbbwbbbzb +7-9 n: knnnngnfnnn +8-14 b: gbnbsdbwcwdbvb +6-9 w: nttwjwbmw +3-13 c: gswwmvqdchfcgfrqcn +11-12 k: kzkvhkfrjxxjv +3-9 d: xdzkdgfdrx +6-13 q: qqqqcqqqqqqqqqq +7-9 b: bmbbbbbbb +8-16 p: hppgwpbmppcppppd +9-12 m: mwmmscmmdmpkmmm +3-6 n: nnnnnnn +3-16 f: lfqfhfffdfffszfkh +12-13 f: ffffffffffffmftffxf +1-5 k: kkkqk +3-6 f: ffsgft +2-9 z: ktzvzztzzrzzfnk +4-7 p: pppppgp +5-9 j: jgtjkvjhtjmvtc +4-5 g: ngngw +5-6 f: ffffcgf +3-11 k: xkkkcvwkkck +7-11 c: qcccpchcccc +3-17 h: hhnhhhhhhhhhhhhhhh +4-5 x: bxjxj +18-19 v: vbvcvvvcwvvvvvvvvtn +12-14 d: dddddddddddwdxddd +6-10 b: bbbbbbbbbbbb +1-4 f: pfjf +1-8 b: bbbbbbltbbbbbb +14-15 d: dzddkfqcdxwfdnd +8-10 t: tvxwlxltjt +7-9 l: lxklrwlhl +3-6 c: cclccdc +15-17 w: wdwwwwwwwwxwwwqwfw +1-4 h: ngkhh +3-4 j: jjjj +4-9 h: nphhzhhmhgb +5-10 v: tsxzvvdvmvvsvp +1-11 r: frjgrqrrrrkrrmrl +10-12 p: zlkppppppmxppphsgd +5-8 p: stmggpsmx +3-5 r: rrrrrrrrrrrrrr +2-3 t: ttgt +6-11 m: mmjmsmhmmsmdmfmvm +6-8 s: pnkbhsfsfgsr +7-13 t: gchcvtttwgkmlbw +8-11 l: lllllllrllrlh +5-7 d: djvddzdd +3-4 z: zzzzkk +5-11 s: wsbdskxssjtqcs +2-3 w: wwwszj +1-4 m: mmvm +3-9 x: bkzkrvkjfbtxn +5-6 z: zzzzzwz +1-4 v: vvvrvv +1-4 d: zdxd +6-8 k: klfnzkrswq +1-6 p: pkjpcpntjzvp +14-16 p: pdpppqmpmppqppppgp +9-10 w: wwvglrwkrbwwwkwzww +3-6 v: vfdvvcsvv +9-13 z: zzzzzzbzzgfzzzzzczz +4-5 n: nnnqnn +4-13 m: jmbmmmmmmmnmmmvmm +2-10 r: rlrcrrdnkrkrsqr +9-14 r: rzrgrrrrhrrbrsrr +9-11 f: ffpffzfvffzf +10-11 j: jzjjjjzfpjjjrsgjjt +3-4 b: bbbnbb +4-6 z: zgzwzqhq +10-11 j: jjxjxhjjjwj +4-5 b: bbbbb +4-5 d: dbzhw +2-8 r: rrrlrrrrgrgfrwdf +1-5 q: qmtrq +9-13 j: jkjjjjjjjzjjt +3-7 j: rjjjjjjjm +5-9 z: zzzzdzzznzz +2-13 t: tjtttttttfttsttt +12-13 d: kbddmmkmcwdkddw +3-4 q: qqql +5-6 j: jjjjsqjj +1-2 b: bbgwqt +3-11 t: tftjtttttttttt +9-12 h: hjxhhhhhqhhzz +1-2 m: ncmmmml +1-3 x: qxxs +1-7 t: dtstrnxttt +11-13 q: qqdqqpjjqktqbqnqqq +2-5 p: pppppp +2-4 n: njdjzpnghzbgvnngqn +11-12 g: lpfwcvsqgmggfrjmdvs +1-7 n: hrwhnvrmm +12-13 s: hssdssscsgsksjssss +3-8 x: csxgdxkxxptmlw +9-11 q: qqqqqqnqkqmqqqqq +3-4 g: wzkf +7-8 t: cktttttt +4-12 c: fgdjrccpmhcccwcgfm +6-8 p: jppppppt +1-4 p: pppppr +1-7 n: nnrrrtndwn +1-6 l: rldlkq +2-4 x: rglr +2-7 p: vpvmkgp +4-5 n: nnnnz +5-18 w: txgfflhvtdpdvwlwmmq +9-10 l: tlllllllddl +1-3 b: xpzbbbrbbr +3-5 n: npnpnn +10-14 q: nqqqqqqqqqqqqqqdqx +7-10 w: bdwwwwgwljxgv +7-11 k: kwknkkdlzkk +1-10 w: wsjbvzwslmwttq +15-18 b: bbbbbbbcbbbrbbbbbbb +6-8 j: jdjjnlfj +10-11 r: xrgrrrrrnvwrrfrr +11-15 x: xxxxxxxxxxxxxxjx +5-10 w: wfwwnwvngwlwwlw +2-4 k: kkkk +3-5 h: hjhhh +7-8 s: lqsssscjrss +10-12 t: tttsttttttttg +3-8 p: szpsqzqp +3-8 x: xxxxxxxxx +6-7 r: rrxrrdrr +1-2 b: zbbbbbbbbbbbbb +3-6 v: vxvkvv +4-5 w: wwwwwwdw +3-5 n: nnfnn +11-12 g: gggggggvggxgg +10-12 s: sssqssssssssns +3-7 h: hlmhhhhhhh +7-8 v: vsdcvkvvszzm +6-9 g: ggwnldgws +14-15 q: qqqqkqqqqqqqkwkq +8-9 l: bttjllqhnqjdvhsnk +10-11 s: sqsscsqsscts +10-14 h: hjhxhhhnhhxglkhvzl +3-6 r: krrnvr +12-17 z: zzsfzzzjzzzrzhzzgh +1-5 b: bdnmb +18-19 c: cccccccccccccccccckc +13-16 t: tttttttrtttcdttpt +5-6 c: ccczlxc +2-7 b: phbqtkkkdglk +4-6 x: tgrmqlxwgrgwxmkfr +2-7 p: xspljfg +4-9 b: bbbwbbbbmbbb +3-9 b: brbvbbxqb +13-14 c: cccpckqscbcchc +1-3 m: mmmm +1-2 v: bvvvvc +2-3 b: bbsbbbnbbb +1-2 f: gkfms +5-6 n: nnnnnq +4-5 c: kffccnrmn +1-6 b: slgwbm +2-3 x: mxcj +3-4 p: gpbqpfsp +5-8 s: szwszsss +5-6 g: zkgjggg +3-10 v: twmqbvvnvv +3-5 z: shlzs +1-6 r: wrrljrfntswb +2-7 j: jjjjjjjjjj +4-5 f: jfffqw +1-3 r: kwrrrrfwp +2-9 c: ccmcrthdqtk +13-15 w: wwwwwwwwwwwwrwwww +14-15 s: ssssssssssssssss +2-5 r: rhmrfmr +6-7 x: dwxgfpsbtvx +7-8 b: bbbbcbbb +1-5 l: slllcqlll +3-4 h: hhbr +3-6 k: kkkpkkk +2-5 s: nsssmsssbs +7-8 s: xtxtwtzspxsszmgjlpzx +2-4 r: jzqc +9-10 h: hhhhhhhbwh +8-13 g: xgzjgjgggggmgggzc +1-10 j: lrhzsjmfrzz +4-10 z: dkqdhhrszpcplmfqgg +7-9 x: xxxxxxwxxx +12-13 f: fffpfqcfbkdvsbtzwwf +5-8 g: ghsvggggzgggg +10-14 z: ctzzkszzzlzmzzzz +2-4 d: xfwdd +9-15 j: xjjdjcjhnjjjfjjj +1-2 h: hhhhhgwjhznh +9-13 d: kddddbdddxddjsdsdd +7-9 x: rxxxxdwxxxxnxkxcx +6-16 r: rlrtlkdftfgqpkrsljr +1-3 z: pzzz +5-6 h: krhbsh +8-9 x: mxqhpmqglxxwxqwxxxp +2-4 z: vmfj +12-15 s: sssfsssssksssst +3-5 f: fwhfb +10-12 j: jjjjjzwjjjjw +4-6 j: jjjjjjjjjjj +11-12 k: kkkkvfktkkkkkkwwzknk +5-8 m: mhhmbvmvms +10-14 r: rlwrdfzkhgrcrlz +5-6 h: hhhhfh +2-4 w: wwqhwww +1-5 x: nxxxwxx +11-16 h: xpshnhxbwclbhrhwsh +7-9 t: ttttflgtkh +10-20 n: bnknnnnnnlnnnnmnvncn +2-5 w: pwwhwkq +1-5 j: jhjjj +5-6 f: fzffzfwfr +3-6 s: sssssgs +9-10 w: wwwwwnwxbrww +5-6 z: xzzhzjzzzzhzhz +17-18 v: vvvvvvvvvvvvvvvtvbv +13-20 l: llllldllllllllllllll +8-14 k: kkkkkkkgkkkkkkkk +7-9 j: jjnjjjjjjj +7-14 j: tjbjljjrjjjjzjjjj +1-4 m: jcmmm +6-9 g: ggnggsghggg +2-16 v: pvvqdcrpzpsmppfvdftf +8-11 j: jjjjjjjjjvj +4-6 m: qbmmxmjpm +2-12 l: pllqdxmwfmmlmznqr +3-4 b: bsbhbbbbb +1-4 w: wwww +1-11 r: rrrrjrrrgmrr +3-8 t: tnrztcht +3-14 p: pjppkpplsphlpn +7-8 j: tdfcjdjbjjjvjj +10-11 n: nnnnnnmhnnnnrddrnn +1-7 p: tppgqppptqscprnp +3-4 c: cqcmcc +2-8 l: llllllrlll +9-12 j: dmcwsjjrvmzjp +4-8 h: hhhrhhhb +1-5 n: nnnnnn +5-6 s: srssss +2-8 n: nrbngnntnnn +1-13 f: bffmjfdfffffp +7-8 t: tqtttttt +3-4 x: xxhh +15-18 j: jjjjjjjjjjjjjjpjjk +7-9 v: vkvvmzvvv +5-7 j: xjjgkjknjjp +2-4 l: llslkh +10-11 m: mmmmmmmmmjwmmmwmm +5-6 j: pjjzjqbqv +5-11 n: nnnncnnnnnfnnnnnn +2-13 g: gdfrmlcszxcwj +9-16 b: bbbbbbwhpztbhdbzb +1-4 f: fffffc +1-3 f: fffkf +16-17 p: pppppppppppppppkt +6-10 h: wzcnzhvhml +1-9 f: ffffffffff +3-8 f: kffgggng +8-13 m: mmmmmmmmmmmmmm +12-19 k: zkzzlkkvpnllksklljr +1-4 j: jjmjjjjxjwj +4-5 h: phhhhzhhhmhhprh +11-12 p: ppppppppppvppp +13-16 j: hpgjjjwfhjgmdttl +2-4 w: wwjwhthzhvpmpfkw +9-10 k: kkxkkkkskkv +17-20 j: jjjjjjbjjjzjjjjjjjjj +1-3 v: cvvvb +5-8 s: zbnmbfgdp +10-11 x: xxxxgmdtxxtxxxbx +12-17 n: nmnnjcndnndcnncnnrnn +3-6 p: lmblxwpjvfgjps +9-12 s: ssssssssfsssw +9-10 g: ggggggwgkzgggg +5-12 m: pzmmmfxgvmtmlmq +2-7 p: ptppprn +9-10 c: bgqtkccxcqb +8-11 r: rdrrrrrhrrmr +7-9 w: wwqwwwfwwjwhgrw +5-7 r: rrrrrrh +2-10 s: rsflsvlwfs +3-7 b: bbqbbbb +11-12 m: mmjmmqmnmmmm +7-13 h: hhhhhhphhhnhghh +12-13 b: bbbbbbblbbbtk +5-13 h: ppgzjhhhlhhqx +14-19 q: qlbqmqqqjqqqqrqkjnq +3-19 f: pxmznsfdhzjqrdfjqrd +16-17 q: qqmdqrqqxcqfxfgjg +12-13 j: njjjzjghjjjjc +9-11 l: vmbsllkcshmrhklrl +1-2 c: tccccc +3-6 p: jspprpjxhn +5-8 x: xrxzxfwxxx +9-10 z: zdznzzzzzzzgzz +4-5 j: jjpjq +4-6 r: rcxscm +2-6 k: pkqjskrlfknnrqt +3-11 k: bqbskncdkfrphshvv +11-13 g: ggqgggggggggggg +6-14 f: fffdxmfffjfffmffff +19-20 z: zzzznzzzzzzzzzzzzzzz +5-8 j: jjjjjjjjjgjjjjjjjjj +2-4 k: pkbkqpsrgkcwc +8-12 b: dbbwtbwbqxvbwrbl +1-8 v: rvrvfcnlcwflcvlsv +4-5 f: hffhfkq +3-12 g: zggpngtnvzgd +4-8 t: ttttwrwt +12-13 x: xxxxxxxvxxxdnx +9-12 j: jrvjjjjjbjjp +1-13 b: zbhbbbbbbbbbvbb +1-2 w: wwwwwww +15-16 k: tfkxskmvqlkkmfkj +12-18 b: bdpxktjwpxhsbgmrfb +8-10 v: vvvvvvtzvzvv +18-19 g: ggglgggggggggggggggg +4-8 s: pnzsjvwsmxwgrjmsm +14-17 p: pppppxppppppppprpkp +9-17 n: nvlnqnwnnnztfcgnpdn +3-5 l: mlqflfl +7-11 z: dzzzzdmnzznzvzzz +14-16 r: xrrsvrhhrlnjjrvrr +12-14 z: vnwzqsvvtdnpvvdrhgz +1-4 h: mhhhh +1-5 m: pmmmmmm +6-11 j: jmkljhjjvjmfmjpj +2-4 f: xhtkdf +5-14 x: frqqxljjwsxndx diff --git a/AdventOfCode/Input/2020/day3.txt b/AdventOfCode/Input/2020/day3.txt new file mode 100755 index 0000000..3c4bd1c --- /dev/null +++ b/AdventOfCode/Input/2020/day3.txt @@ -0,0 +1,323 @@ +.#..#.....#....##.............. +...#.#...#...#.#..........#.... +#...###...#.#.....#.##.#.#...#. +#.....#.#...##....#...#...#.... +##.......##.#.....#........##.# +#..#....#......#..#......#...#. +#..#......#.......#............ +##...#.#..#...#........#....##. +#.#.#...#...#..#........#....#. +.......#...........##......#... +##.##.##......#..#............# +..#.###..#..............#...... +.##..#.....#......#.#.......... +........#.........#....#....### +#..........#........#.#.#...... +...##.....#..####.###..#.##.... +....#...###............#..#.... +...#.#...#.#...#..#.#........## +.....#...#.............#..#.... +....#.#.#.##.....##.##....#.... +..#....#............#.##.##..#. +.#..#..#................#...### +#..###.#..##..#............#... +.......#.#....#.##.#.##........ +##...###.#....#...........###.# +...#.#....#..####.........#.... +....##........#.#.#.###........ +#...#..#.....#....##..#.##...#. +##....................##..#.... +.#....##...........##...##...#. +.#.#..#.........#.........#.#.# +#.#..#.....#.#..#..#..#.#...... +...#.............#......#....## +....#.#.......#....#...#.##...# +#.#.#..###..........#...#...... +......#.....#..#..#.......##..# +.#......#......#.....#...#..... +......#..#......#.#............ +..#............#..#....#.#..... +.....#..##.......#...##.###.#.# +.....#........##....#.#...##..# +..........##.#..#.#...#..#....# +#.#.#.#.##...................#. +.....#....##.....#..#...#..#... +...#....#.............#....#.#. +.........#.##..##.............. +#...#.#....#..#...#.......#.... +.#...#......#.##.#...#.#..###.. +..#.#.#......#..#...##..##.##.. +.........#.....#......##....##. +...###.......#..#........#..... +...#....#...#.#.#......##....#. +.#.....#......#...##.##..#..... +..#.##...#....####...##........ +..#.#.###....#..##.......##.... +.....#....##...#......#.......# +.#....#......#..............#.. +.......#.#......#..#....#.#.#.. +.......#.#.........###....#.... +.#...#.......#.#..#..####....#. +..#...#.#......#..#.##.###..#.. +..##.........#............#.#.# +#.........##.##.........#.###.. +...#....#.......#..#..##....... +.#....##........##.......#..#.. +...#.....#.#.##.#.#.....##..... +.#.#........#.......#.#..#..#.. +.....####..##.##.#.#....#...... +..#.##.#.#.#....###..#....#.#.. +..##..#.#......##.#..#......... +....#..#.#.##.......#...##..... +....###.....#..###...#....###.# +..#....#.......#......#...##..# +..#..##......#....#.###..#..##. +..#..#...............#.#.#..... +...##...#.#..#.#...#......#.... +#....#...#.#.#.#.#....#....#... +....##...#....#.....##..#.....# +......##.....#...##..#.......#. +......###......#....#.##..#.... +.....#........#........#...#..# +.#..##.....##....#.#......#.#.. +#..#.#.....#........#......#.#. +.#..#.##.....#####.#....#.#.... +....##........#..........#.#... +.......#.....#.......#...#.#... +.#....#...##.###....#.#......#. +#...#...........##.#........... +#...##.......#..#........#.#..# +.....#..##..###....#.#.#....#.. +..#..#.....#............#.#.... +............#......#.....#..... +.#..#.....##.........#....###.# +#.........#....#....#.#..#...#. +##.#...##....#..#...#.#...#.... +....###..##...................# +....##...#......#...#.#...#...# +#....#....###..........#...#..# +.....##.#....###.###....#..###. +#.....#...........#...........# +##..###.##........#..#.#..#.#.. +.##...#..#.......#.#....#.....# +......##..#..#.......#.#...##.. +......#..#..#.#...###..#.#....# +#.##.#..#......#...##........## +.....#..........##.....#...#... +........#....##......#......#.# +..#..#.#...#.#.#.......#......# +.#....#........#............#.. +......##.....#...#............. +#......##..#.......##....##.#.. +.....#..#..#...#.......#..#.... +...#..##.#..#.#....##.....#..## +......#...#.#...#.#......###.#. +.#.#...#.....#..###.....#...... +#..####.#....#.......##...#.... +.##.......#.....#.........#.... +#......##.#...............#.... +.######.#...##...#...#...#..##. +....#...####....##.#..#...##... +.#...................#.#..#..#. +.#.#....##...#...#.#..#.#.#.#.. +......#......#........##.#...#. +##..#...#..#.............##.#.. +#.............#..........#.#... +...##.....#.............#...... +......###.....#................ +#.#.#....#..##.#.....#......... +.#.#........#.........#.#.##.#. +......#...##...#.#.....#....#.. +#...#.........##.##.#.......... +#..............#..#.......##... +#...#......#.#......#...#....#. +...#...#........#.#......#.###. +##.....#...#.#..#..#..#.......# +..#.##..##.........#...##.##... +#....#....#.....#..........#... +#.####..#..###.....#..#..#..... +..#.....#.##.##..####....#.#.#. +...#.#....#...#.......#..#..... +......###...#.#..#..#.......... +.........#..#.....#.#.##......# +.......#.#....##.....##.#..#.#. +.#..#.#..#......##.###...##..#. +....###...........#.....#....#. +.#.##.....#..#.....#......##... +#..##....#..........#.##.##..#. +.###.#.#..#.#.....#..##....#.#. +..##.#....#.....##..#.......... +##........#...#..#........###.# +#...#...........##.......#.#... +...###.....##.#....#...#...#... +......#....#.#.......###....#.. +...#...#.......##.......###.#.. +..............#.#..........##.. +#.#....###..#..#.........#..... +.###.#.......#.....#....#.#.... +.....###...#.#..#.#.......#.... +.........#.##.#......#.#..#.... +.......#....#....#.#....#..##.# +...............#...##.#..#.#..# +.....##........#..##........... +.##.#..#....#..#.#...#......... +.#.#..##.#..#......#....#.#...# +##....#.......##...........#... +..#...#.............#.#....#..# +..#......#..#.....#...##.....#. +....##...#.#...##...#..##...... +.....#..#..........#........... +..##....#..#.#....#..#........# +.###....#.....#.#....#..##..... +#.......##.......#..#..#....#.# +.##..#...........#..##..##..#.. +.#.................#...#....#.. +.######.......#............##.. +.#.........#......##.#.#.#.#.#. +.#.......#...#...#....###....#. +....#...##.#.#...#.....#.#..#.. +.#..#..#...#.....###....#...... +...#.##.###........#.....##.... +..#....#.#.#..........#..#..#.. +......#.....#...#..#..##..#.#.. +#.#.......##.......#....#.....# +..#...#..#.#....#.##.##........ +..#....#..##..#..##......#..... +#....#..##.....#....###........ +##...#......#..###.#.....#..... +#..###....#...#...#...#......## +.....###....#......#..#..#...#. +.##......#.......##...#........ +....#.#.....##.....#.....#..... +...##.#.....#..##...#...##.#... +..#...#.#....#....#...##....... +......#....#..#....#.#......... +..........#.#.#...##....#...... +...#....................#..#... +...#....###....#..#.....#.....# +..#....#....#..#.#..##.#...#... +..#.##....##.....#.#........#.. +#.....###..#.#.#...#..#....#... +........#..#.#..#........##.... +.##....#................##.#.## +..##...#.#.#.....##..#....#.... +....#..#....#..#........#..##.. +...#...##....#....#..##......#. +##........#...#.....#.....#...# +.#......#....##...#.........##. +##........#...#.....#..#...#.#. +...##..#..#.....#..###.#..#.... +....#..#..............#.......# +.......#.##...#......#.###..... +#........##..##....#.#.#....... +#.#..##.#.......#..##.....###.. +.....##...#..#.....#........... +...#..#..#......#...#.#........ +.#....#....#.#.....#.....#....# +...#..#...#..#.##.#......#.#.#. +..##....#..#..#.....#....#....# +...#....#.##.#..#.###......#... +.......#..#.....#.......#..#... +..###.#####..#..##.#.........#. +...#.......##...#.#..#.#......# +....#...#.###..#..........#.... +...........#...#..##........#.. +.......#...#....#....#.#..#.... +.........#..........#...#....## +.##.........##..#.......##.#... +........#......###...##...#.#.# +#.#...##.##...........#...#.#.. +.....###...#..##......#..#..... +#.#.....#.#....##..........#..# +#..#.......#.#.........####.... +#.#...#.....#........#.....#..# +.....#..#.#.###.....#.#.###.... +.###..#......##..#..#.......... +#....#.#......#...#.##......#.. +..#.........##.#.....#......... +...#....#.....##.#..#..##.#..#. +##.....#.#..#.#....#......#.... +....###.#.....#.......#..#.#... +#.....##.....##...........#.... +..........#..#......#.##...#... +#...#.###....##....#.###..###.. +##........#.#...#..#.........#. +##........##.......#.....###... +.##....###........#..##...#...# +......#..##....##.....#..#.#... +.....#..##..#.......#.......#.. +......#....#.......##.#........ +.#.####.#..#......#..#......... +.##..#....#...##.#....#....#... +..#..#..#####.........#...#.... +....#.....#.#.#.#...#.#......#. +....#...#.#..#.##...#...#...... +..#...#...#...#...#..#.#.##..#. +..#......#.#.#.##.##.##..#..... +#..###......#.##...#....#.##.#. +.#.#.......##..##....##...##.#. +.##......##....##.#.......#...# +..#...#...................#.... +.#...#.......######.....#.#..## +......#.##.....#.#............. +...........##.#........#..#.... +#.............#.#.....#....##.. +#...........#...#..###.....#... +....#.......#.#..#..#.#........ +......#...##.......#..##....#.. +......#.##.##..#........#.#...# +.#..#...##...................#. +.#.............#...#.#.#.#...#. +.........#.....#........#.#.... +#..#...#.............##.#.....# +...#.#....#...##............#.. +..#...#.##.###.#.....#......##. +...#.#..###...#.#............#. +...#....#........#.#........... +.#......#.#.#.........#.#....#. +....#..#......#.##.....#.#..... +..#..###....#....#.........###. +#..#.#....##.#....#.##..#...... +#..#.....#.#.....##..#.##...... +......#...#.#.............#..#. +#.#....#.#..#...#......#.#..... +..#.........#.#....#...#....... +.#..#.#...#....#...#......#...# +.......#........#.#..#..#...#.. +..##.#......#..##.##.#..#..#... +.##...#....##.....#.....#...##. +#.....##.#....#.#......##..#... +.......#.#..#...#.......#.#...# +..#...#.......#...#..##........ +#....##..#...#..#.#......#..#.# +##.#....#....#....#...#..#.##.. +###........#.#..#..#......#.... +.#......#.....#....#.#..#...#.. +.#.....#.....#...##.......#..## +#..##.#..#..........#.......... +...#.##.........#.#.##.#....... +.#..#...............#...#.#.#.. +.....#.#.....#...####..#.....#. +.#....#.##..##...#...##.#...#.# +....#......##...#.#.#.....#.##. +#...#..#.#...#.#.....##...#.... +..#..#....##..###......#..#.... +.........#......##.....##....#. +.......#....#...#........###... +.....#..#..#...#...#......#.... +..#..#...#.....#.....###..#.### +............#.#..#..#....#..... +...#..#...###.......#.......#.. +#.........#........#.....##.... +.#.#........#.....#........###. +....#.##.#...#.#.#.....#....#.. +.##...#..#.......#.#........... +##...#.##...#...........#.....# +##....#.#.....##..#.......#.... +##....#...#....#..#.......####. +......#...#..#.....#.#....#...# +.......#.....#..###............ +#.#.#..#.....#.............#..# +.#..#.....##.....#...#.......## +..#.##........##...........#.#. +....##.#..###.#.........#...##. diff --git a/AdventOfCode/Input/2020/day4.txt b/AdventOfCode/Input/2020/day4.txt new file mode 100755 index 0000000..e741ff2 --- /dev/null +++ b/AdventOfCode/Input/2020/day4.txt @@ -0,0 +1,2058 @@ +ecl:amb +pid:690616023 +byr:1994 +iyr:2014 +hgt:172cm +hcl:#c0946f +eyr:2022 + +eyr:1980 +cid:97 +hcl:z +ecl:#102145 +iyr:2011 +byr:1945 +pid:187cm +hgt:179in + +ecl:amb +iyr:2011 +cid:113 +eyr:2021 +hcl:#b6652a +pid:004682943 +byr:1940 +hgt:173cm + +iyr:2023 +cid:146 +byr:2022 +ecl:dne +hgt:76in +eyr:2040 +hcl:z + +hcl:#f97e30 +cid:73 +iyr:2013 +byr:1929 +hgt:157cm +eyr:2024 +ecl:blu +pid:673398662 + +hcl:5343fe +hgt:152 +byr:2018 +eyr:1992 +pid:85999926 +iyr:1938 +ecl:#15bd97 + +byr:1975 +hcl:z +eyr:1988 +pid:#c36f52 +iyr:2018 +hgt:184cm + +byr:1954 +eyr:2023 +hgt:170cm +iyr:2012 +ecl:blu +pid:299556897 +hcl:#b6652a + +hgt:191cm +ecl:oth +hcl:#7d3b0c +iyr:2016 +pid:187567535 +byr:1999 +eyr:2023 + +pid:814358147 +eyr:2022 +iyr:2000 +byr:2001 +hcl:#18171d +ecl:blu +hgt:76in + +ecl:hzl +hgt:163cm +byr:1955 +iyr:2018 +eyr:2024 +hcl:#6b5442 +pid:343362099 + +eyr:2020 +pid:185090160 +ecl:#21a5e6 +iyr:1928 +byr:2006 +hcl:a2ebbf +hgt:104 + +hgt:153cm +hcl:#a97842 +ecl:blu +eyr:2028 +byr:1969 +iyr:2019 +pid:729700590 + +iyr:2019 +byr:1981 +hgt:150cm +pid:606092356 +hcl:#18171d +eyr:2026 +ecl:grn + +pid:760899887 +eyr:2023 +hcl:#866857 +hgt:185cm +iyr:2017 +byr:1976 +ecl:gry + +byr:1965 +eyr:2026 +hcl:#623a2f +ecl:blu +pid:483363116 +iyr:2010 +hgt:178cm +cid:204 + +ecl:oth +eyr:2022 +pid:268557763 +byr:1965 +iyr:2015 +hcl:#c0946f +hgt:164cm + +ecl:gry +hgt:168cm +hcl:#623a2f +eyr:2020 +cid:163 +pid:124082663 +iyr:2016 +byr:1996 + +hcl:4c44fb +iyr:1957 +eyr:2039 +ecl:grt +hgt:63cm +byr:2012 +cid:104 + +byr:2024 +iyr:2023 +ecl:gry +eyr:2007 +pid:170cm +hgt:68 +hcl:d57b67 +cid:333 + +byr:1956 +hgt:169cm +iyr:2013 +pid:370491367 +ecl:gry +hcl:#5bc41d + +eyr:2023 +iyr:2028 +byr:1969 +ecl:lzr +hcl:1989b1 +hgt:71cm +pid:#12c226 + +cid:304 +pid:866132461 +byr:2022 +hcl:z +hgt:191in +ecl:lzr +iyr:2029 +eyr:1989 + +ecl:brn +hcl:#9a45a7 +hgt:176cm +byr:1974 +pid:758747330 +iyr:2014 +eyr:2020 + +cid:190 +ecl:hzl +iyr:2014 +byr:1990 +hgt:69in +eyr:2037 +pid:384015829 +hcl:#ceb3a1 + +byr:1998 +eyr:2022 +iyr:2018 +hgt:153cm +hcl:#733820 +pid:424512443 +ecl:blu + +hcl:27c41f +byr:1972 +eyr:1994 +pid:777840405 +ecl:gry +hgt:179cm +iyr:2021 + +hgt:166cm +eyr:2032 +ecl:gry +byr:1936 +pid:41703652 + +hcl:#efcc98 +iyr:2019 +byr:1936 +pid:985830958 +eyr:2021 +hgt:175cm +ecl:brn + +eyr:2025 +pid:972163513 +hgt:155cm +ecl:brn +cid:169 +iyr:2015 +hcl:#6b5442 + +eyr:2026 +hgt:173cm +byr:1984 +cid:191 +pid:791209101 +hcl:#341e13 +iyr:2020 +ecl:hzl + +hgt:64cm +iyr:2010 +byr:1978 +pid:618891746 +hcl:#d6ac23 +eyr:2023 +ecl:brn + +eyr:2021 +hcl:#341e13 +iyr:2018 +pid:502081929 +ecl:blu + +ecl:amb +iyr:2018 +pid:8933462515 +hgt:160cm +hcl:e330f0 +eyr:2030 +byr:2007 + +ecl:gry +byr:1980 +hcl:#341e13 +iyr:2015 +pid:830724822 +hgt:167cm +cid:156 +eyr:2023 + +ecl:gry +hcl:#c39b75 +byr:1995 +hgt:153cm +eyr:2029 +pid:83056475 +iyr:2013 + +byr:1965 +cid:250 +ecl:oth +iyr:2016 +pid:242792947 +eyr:2025 +hcl:#efcc98 + +byr:2011 +ecl:#62fe2d +hcl:#2b434a +hgt:190cm +eyr:2031 +iyr:1964 +pid:7096872943 + +cid:258 +hcl:#c0946f +pid:698224453 +eyr:2029 +hgt:189cm +iyr:2012 +ecl:blu +byr:1963 + +eyr:2028 +byr:1942 +hgt:156cm +pid:836243052 +iyr:2016 +hcl:#888785 +cid:310 +ecl:brn + +hcl:#a97842 +pid:740164307 +ecl:oth +byr:1997 +hgt:166cm +iyr:2015 +eyr:2026 + +hcl:4ee9da +iyr:2020 +eyr:1933 +hgt:136 +ecl:#8dee29 +pid:44266010 +byr:1966 +cid:82 + +ecl:amb +byr:1921 +hgt:182cm +eyr:2026 +hcl:#c0946f +iyr:2010 + +hgt:178cm +cid:343 +eyr:2023 +pid:197119382 +hcl:#623a2f +iyr:2017 +ecl:brn +byr:2002 + +eyr:2030 +byr:1967 +ecl:blu +hgt:166cm +iyr:2017 +pid:655602762 +hcl:#6b5442 + +cid:143 +hgt:152cm +eyr:2026 +iyr:2018 +byr:1950 +ecl:grn +hcl:#866857 +pid:067535973 + +byr:2019 +ecl:#e3c288 +iyr:1948 +hgt:72cm +hcl:7da71b +eyr:1956 + +hcl:#cfa07d +pid:688405238 +cid:200 +byr:1950 +iyr:2020 +ecl:hzl +hgt:170cm + +eyr:2026 +hgt:164cm +iyr:2010 +hcl:#b6652a +pid:404835595 +byr:1924 +ecl:blu + +iyr:2016 +hcl:#866857 +ecl:gry +eyr:2023 +pid:986813245 +cid:247 +byr:1977 +hgt:173cm + +ecl:#a59335 +eyr:2023 +hcl:033f22 +byr:1947 +hgt:152 +iyr:2029 +pid:#1e686a +cid:305 + +byr:2005 +ecl:amb +hcl:#a97842 +iyr:1972 +eyr:1967 +pid:274884869 + +eyr:2038 +iyr:2018 +pid:181cm +ecl:xry +hgt:185in +hcl:109b28 +cid:287 + +ecl:amb +byr:1943 +pid:002483342 +hgt:178cm +hcl:#c0946f +eyr:2030 +iyr:2014 + +iyr:2020 +byr:1963 +cid:131 +hcl:#18171d +hgt:181cm +pid:146726616 +eyr:2021 + +pid:062629370 +byr:1931 +hgt:188cm +eyr:2021 +ecl:gry +hcl:#166b3d + +pid:007028786 +ecl:blu +hgt:156cm +byr:1981 +hcl:#888785 +cid:53 +iyr:2019 + +iyr:2014 +hcl:#623a2f +ecl:hzl +eyr:2029 +byr:1988 +pid:849096536 +hgt:167cm +cid:322 + +pid:160824363 +hcl:#19bed3 +eyr:2024 +hgt:171cm +byr:1968 +iyr:2019 + +eyr:2024 +hcl:#dd66d0 +byr:1986 +cid:105 +pid:816153574 +ecl:hzl +iyr:2013 +hgt:173cm + +hcl:#ceb3a1 +hgt:62in +ecl:gry +iyr:2017 +cid:234 +byr:1963 +eyr:2029 +pid:514406488 + +hcl:#fffffd +ecl:blu +eyr:2020 +iyr:2010 +pid:544347103 +hgt:164cm +byr:1939 + +eyr:2021 +pid:999479324 +hgt:164in +ecl:brn +iyr:2016 +hcl:#a97842 +byr:2020 + +pid:053149570 +byr:1920 +eyr:2027 +hgt:190cm +iyr:2011 +hcl:#fffffd +ecl:oth + +hgt:165cm +hcl:#cfa07d +ecl:oth +eyr:2023 +pid:186cm +byr:1937 +iyr:2012 + +eyr:2026 +hgt:64cm +hcl:#ac426a +byr:1969 +cid:345 +iyr:1960 +pid:#df648a +ecl:blu + +byr:1923 +iyr:2017 +eyr:2027 +pid:798497862 +hgt:182cm +hcl:#ceb3a1 +ecl:oth + +hgt:182cm +eyr:1990 +ecl:grn +hcl:#efcc98 +byr:1968 +pid:005962011 +iyr:2010 + +cid:74 +eyr:2020 +hgt:71in +iyr:2015 +pid:487940408 +byr:1952 +hcl:#733820 + +hgt:75cm +cid:249 +ecl:hzl +hcl:#6b5442 +pid:4860441 +eyr:2020 + +ecl:hzl +eyr:2025 +hgt:183cm +iyr:2020 +byr:1993 +pid:572766871 +hcl:#866857 + +hcl:#888785 +pid:200125941 +hgt:155cm +byr:1923 +eyr:2021 +iyr:2010 +ecl:gry + +pid:502547835 +iyr:2014 +hcl:#b6652a +byr:1985 +hgt:189cm +eyr:2024 + +eyr:2024 +hcl:#fffffd +ecl:amb +byr:1952 +pid:724639818 +iyr:2013 +hgt:183cm + +byr:2023 +iyr:2026 +ecl:gry +eyr:2032 +hcl:3e0fc4 +pid:5620497552 +hgt:84 + +cid:79 +hgt:68cm +iyr:2021 +pid:#365b83 +byr:1928 +ecl:#79a6b3 +eyr:2027 +hcl:54130e + +hgt:74cm +byr:1953 +cid:263 +iyr:2018 +ecl:zzz +hcl:#efcc98 +pid:154cm +eyr:1951 + +cid:272 +pid:0638528559 +hcl:z +hgt:63cm +byr:2029 +ecl:zzz +eyr:2033 + +iyr:2016 +hgt:193cm +hcl:#6b5442 +pid:715518898 +ecl:brn +cid:195 +eyr:2025 + +ecl:oth +eyr:2025 +hgt:166cm +byr:1944 +iyr:2017 +pid:814141652 + +eyr:2025 +cid:140 +ecl:hzl +hcl:#c0946f +pid:824866056 +iyr:2011 +hgt:65in +byr:1947 + +iyr:2016 +ecl:brn +eyr:2021 +hgt:161cm +byr:1984 +hcl:#602927 +pid:821539320 + +hgt:175cm +cid:190 +hcl:#ceb3a1 +ecl:brn +byr:1927 +iyr:2017 +eyr:2029 +pid:836598854 + +eyr:2026 +ecl:brn +hgt:157cm +pid:038645205 +byr:1995 +iyr:2019 +cid:339 + +ecl:brn +hgt:70in +hcl:#c0946f +pid:535498918 +cid:153 +iyr:2012 +eyr:2030 + +byr:1995 +hcl:#efcc98 +hgt:174cm +eyr:2030 +pid:180839761 +ecl:grn +iyr:2010 + +hgt:59cm +eyr:2035 +byr:2021 +iyr:2012 +ecl:hzl +pid:219328725 +hcl:#888785 + +ecl:oth +hgt:184cm +byr:1984 +iyr:2016 +hcl:#cfa07d + +iyr:1998 +byr:2024 +ecl:lzr +hgt:187 +hcl:z +eyr:1935 +pid:#789b56 + +iyr:1967 +hcl:z +pid:828930046 +hgt:59in +cid:153 +byr:2021 +ecl:grn +eyr:1935 + +byr:1991 +hcl:#341e13 +ecl:gry +iyr:2018 +hgt:67in +pid:157970631 +eyr:2021 + +byr:1941 +hgt:169cm +pid:322510952 +hcl:#cfa07d +cid:75 +ecl:oth +eyr:2021 +iyr:2020 + +hcl:#7d3b0c +iyr:2013 +cid:78 +hgt:167cm +ecl:brn +byr:1974 +pid:237404828 + +pid:1567157833 +hcl:#7d3b0c +iyr:2025 +eyr:2023 +byr:2002 +ecl:oth +hgt:191cm + +ecl:amb +iyr:2014 +hgt:182cm +pid:526612838 +cid:287 +eyr:2025 +byr:1988 +hcl:#866857 + +hcl:#866857 +hgt:174cm +byr:1992 +eyr:2028 +iyr:2015 + +eyr:2029 +hgt:190cm +hcl:#18171d +cid:245 +ecl:oth +pid:3636033742 +byr:2024 +iyr:2019 + +byr:1972 +hgt:163cm +eyr:2020 +hcl:#b6652a +pid:360516396 +iyr:2019 +ecl:grn + +iyr:1997 +ecl:#be02d2 +eyr:2020 +cid:259 +byr:1953 +hcl:#6b5442 +hgt:177cm +pid:978155362 + +pid:377596476 +cid:153 +eyr:2025 +byr:2000 +hgt:181cm +iyr:2014 +hcl:#abc5cb +ecl:hzl + +cid:171 +ecl:lzr +iyr:2013 +eyr:1973 +byr:2004 +pid:#267099 +hgt:101 + +hcl:#623a2f +pid:029193661 +hgt:183cm +ecl:hzl +eyr:2029 +iyr:2013 +byr:1977 + +ecl:amb +eyr:2021 +hgt:159cm +byr:1970 +cid:152 +hcl:#b6652a +iyr:2020 +pid:180512119 + +eyr:2025 +ecl:grn +hgt:60in +iyr:2013 +pid:697352361 +hcl:#18171d +byr:1989 + +byr:1934 +hgt:165cm +pid:703537570 +ecl:hzl +iyr:2015 +hcl:#888785 + +ecl:gmt +hcl:6dd6a5 +byr:1951 +pid:#7ab761 +cid:304 +iyr:1924 +eyr:1953 +hgt:71in + +ecl:amb +hcl:#733820 +eyr:2030 +hgt:178cm +pid:692422832 +iyr:2019 +cid:276 + +iyr:2012 +ecl:oth +pid:674969358 +eyr:2027 +hgt:157cm +cid:247 +hcl:#a97842 + +byr:2017 +eyr:2031 +hgt:180cm +hcl:#ceb3a1 +pid:372071110 +iyr:2015 +ecl:amb + +hgt:165cm +iyr:2015 +eyr:2021 +ecl:amb +byr:2000 +cid:235 + +eyr:2027 +hcl:#623a2f +pid:595874068 +ecl:amb +hgt:177cm +iyr:2019 +byr:1929 + +pid:8150929412 +hgt:191in +eyr:2031 +cid:233 +byr:2027 +iyr:2026 +ecl:#e94348 +hcl:z + +hgt:65 +byr:2009 +iyr:2029 +hcl:#fffffd +eyr:1950 +pid:950012410 +cid:212 +ecl:#5a6042 + +ecl:#44c561 +hgt:178cm +eyr:2021 +pid:753771724 +iyr:2014 +hcl:#70adb2 +byr:1989 + +iyr:2018 +pid:809109448 +ecl:amb +hcl:#b6652a +hgt:63in +byr:1976 +cid:96 + +byr:2021 +ecl:grn +pid:9284377919 +iyr:2011 +hgt:75cm +hcl:#18171d +eyr:2026 + +ecl:oth +byr:1926 +hgt:63 +iyr:1948 +cid:61 +hcl:a528d1 +eyr:2034 + +byr:1978 +pid:150503169 +iyr:2015 +ecl:grn +hgt:172cm +cid:70 +eyr:2022 +hcl:#7d3b0c + +byr:1957 +hcl:#cfa07d +iyr:2010 +ecl:amb +eyr:2025 +pid:921901279 + +ecl:utc +pid:154cm +byr:1964 +eyr:1978 +hgt:114 +hcl:z + +byr:1929 +ecl:amb +eyr:2028 +iyr:2013 +hcl:#fffffd +pid:479814281 +cid:105 +hgt:64in + +pid:949640425 +cid:205 +hcl:#341e13 +ecl:amb +hgt:171cm +byr:1998 + +hgt:190cm +cid:113 +ecl:grn +eyr:2037 +hcl:#ceb3a1 +pid:7994792779 +iyr:2011 + +hgt:152cm +iyr:2010 +byr:1992 +eyr:2020 +hcl:#602927 +cid:66 +pid:604149642 + +eyr:2028 +byr:1961 +hgt:71in +iyr:2013 +cid:135 +pid:534090716 +hcl:#ceb3a1 +ecl:oth + +iyr:1937 +byr:1995 +cid:200 +eyr:2037 +pid:#daf9af +hcl:052017 +ecl:zzz +hgt:73cm + +ecl:amb +hcl:#a97842 +iyr:2018 +hgt:153cm +cid:149 +eyr:2023 +pid:533403632 + +cid:275 +ecl:brn +iyr:2017 +pid:087665205 +byr:1945 +hcl:#7d3b0c +eyr:2025 + +eyr:2030 +hgt:177cm +hcl:#cfa07d +iyr:2018 +pid:734113761 +byr:1965 + +hgt:163cm +byr:1924 +ecl:blu +cid:125 +eyr:2027 +hcl:#fffffd +pid:137238888 + +hgt:174cm +hcl:#623a2f +eyr:2023 +ecl:gry +pid:585758460 +iyr:2011 + +cid:183 +byr:1928 +pid:471385060 +hgt:192cm +ecl:oth +iyr:2010 +hcl:#623a2f +eyr:2020 + +hgt:177cm +cid:273 +ecl:oth +eyr:2020 +hcl:#efcc98 +iyr:2012 +pid:246299733 +byr:1954 + +pid:052203766 +cid:146 +ecl:hzl +byr:1974 +hcl:#6b5442 +eyr:2030 +hgt:173cm +iyr:2011 + +hgt:167cm +byr:1972 +iyr:2010 +pid:783359411 +ecl:hzl +hcl:#9f8cc9 +eyr:2028 + +iyr:2020 +hcl:#18171d +ecl:grn +byr:1992 +hgt:189cm +eyr:2023 +pid:736882272 + +cid:230 +ecl:utc +iyr:2022 +pid:170cm +byr:2015 +hcl:#c0946f +eyr:2031 + +cid:261 +byr:1922 +hgt:170cm +ecl:brn +eyr:2021 +pid:593276915 +hcl:#18171d +iyr:2017 + +hcl:#341e13 +pid:038417039 +hgt:61in +eyr:2025 +iyr:2017 +cid:117 + +iyr:2017 +eyr:2026 +pid:441484223 +hgt:155cm +byr:1968 +hcl:#ceb3a1 +ecl:hzl + +eyr:2021 +hgt:64in +ecl:oth +hcl:#b6652a +byr:1954 +pid:204959612 +iyr:2016 + +hcl:z +eyr:1969 +pid:162cm +ecl:#944b0f +iyr:2030 +byr:2029 + +hgt:114 +eyr:2034 +byr:2026 +hcl:84fa1a +pid:47909473 +iyr:2028 +ecl:utc + +eyr:2025 +ecl:blu +hgt:157cm +iyr:2014 +hcl:#a97842 +byr:1974 +pid:702610675 +cid:241 + +pid:732388109 +hcl:#6b5442 +cid:272 +eyr:2026 +hgt:193cm +ecl:amb +byr:1982 + +eyr:2030 +byr:1994 +hgt:177in +ecl:amb +pid:1589147420 +iyr:2011 +hcl:#4bf920 +cid:252 + +ecl:oth +eyr:2022 +byr:1948 +pid:177cm +cid:90 +hgt:102 +hcl:z +iyr:2028 + +hgt:157cm +pid:233347213 +hcl:z +byr:2009 +eyr:2027 +cid:235 +ecl:blu +iyr:1965 + +ecl:blu +iyr:2030 +eyr:2028 +hcl:#18171d +pid:322593908 +byr:1954 +cid:215 +hgt:63in + +hgt:72cm +cid:345 +pid:911728732 +eyr:2025 +byr:2004 +ecl:#0c4af7 +hcl:3bb675 + +pid:171714794 +byr:2019 +hcl:#866857 +cid:290 +hgt:183in +ecl:#d0c30f +eyr:2032 + +iyr:2016 +pid:905945155 +hcl:#ceb3a1 +byr:1958 +hgt:159cm +eyr:2028 +cid:180 +ecl:oth + +hcl:efb614 +eyr:2022 +hgt:177cm +pid:46962273 +byr:1974 +ecl:#089bdd +iyr:1988 + +pid:662993164 +iyr:2011 +eyr:2025 +ecl:hzl +byr:1942 +hcl:#fffffd +hgt:175cm + +hcl:#7d3b0c +iyr:2016 +hgt:175cm +eyr:2022 +pid:953132241 +byr:1963 +cid:261 +ecl:grn + +iyr:2013 +hgt:180cm +cid:318 +ecl:amb +byr:1985 +pid:439097817 +eyr:2029 +hcl:#602927 + +hgt:162cm +ecl:blu +pid:675749832 +cid:73 +byr:1940 +hcl:#888785 +eyr:2026 + +pid:275352007 +iyr:2012 +eyr:2020 +ecl:amb +hcl:#623a2f +hgt:175cm +cid:317 +byr:1988 + +hcl:z +hgt:164in +iyr:2026 +eyr:1961 +ecl:#2df35e +pid:#5c9ed5 +cid:341 + +pid:848086119 +ecl:oth +eyr:2021 +iyr:2011 +hgt:180cm +byr:1923 +hcl:#93461b + +eyr:2028 +iyr:2014 +byr:1978 +hgt:184cm +pid:966277564 +ecl:hzl +cid:176 + +hcl:#888785 +ecl:amb +cid:329 +pid:835961958 +byr:1927 +eyr:2028 +iyr:2016 + +pid:160cm +eyr:2026 +hcl:#08714b +ecl:hzl +iyr:1961 +hgt:156cm +byr:1984 + +ecl:gry +cid:302 +byr:1965 +iyr:2019 +hcl:#ceb3a1 +eyr:2027 +pid:458192010 +hgt:156cm + +pid:058273969 +byr:1942 +eyr:2027 +hcl:#c0946f +iyr:2013 +hgt:179cm + +iyr:2019 +hgt:193in +pid:52144528 +eyr:2036 +cid:169 +ecl:grt +hcl:7e7039 + +hgt:192cm +ecl:blu +iyr:2015 +pid:544936486 +eyr:2024 +byr:1972 +hcl:#c0946f + +eyr:2000 +hcl:78de23 +byr:2020 +hgt:171in +pid:160cm +cid:68 +iyr:1956 +ecl:gmt + +hcl:#733820 +ecl:grn +iyr:2018 +byr:2001 +pid:770957230 + +cid:103 +ecl:grn +iyr:2018 +pid:068344094 +eyr:2023 +hgt:69in +byr:1984 +hcl:#6b5442 + +hgt:193cm +eyr:2021 +ecl:grn +hcl:#602927 +byr:1938 +iyr:2011 + +iyr:1931 +hcl:c0a318 +pid:99195939 +byr:2028 +ecl:grt +hgt:164 +eyr:2017 + +eyr:1980 +ecl:zzz +hgt:98 +cid:161 +pid:#96fe01 +hcl:z +iyr:1974 + +byr:1936 +hgt:176cm +pid:56797167 +iyr:2015 +ecl:#07ad47 +hcl:z + +pid:48720181 +hcl:270e76 +byr:2022 +hgt:180cm +ecl:#dde399 +eyr:2035 +iyr:2023 + +eyr:2030 +byr:2022 +iyr:2018 +hgt:162in +ecl:gry +hcl:#63e2ec +pid:615812600 + +ecl:grn +cid:56 +hcl:#623a2f +eyr:2020 +hgt:167cm +byr:1971 +iyr:2012 +pid:262692066 + +hgt:61 +hcl:#efcc98 +iyr:2011 +eyr:2026 +byr:1938 +ecl:amb +pid:385025739 + +pid:972423724 +hcl:#602927 +eyr:2027 +ecl:oth +iyr:2015 +hgt:158cm +byr:1956 + +pid:530035096 +ecl:hzl +iyr:2017 +eyr:2024 +hcl:#888785 +byr:1962 +hgt:64in + +byr:1935 +eyr:2022 +ecl:grn +hcl:#7d3b0c +pid:294714199 + +eyr:2029 +iyr:2013 +byr:1927 +hgt:175cm +pid:058261075 +hcl:#cfa07d +ecl:amb + +ecl:blu +pid:188764763 +hgt:155cm +byr:1921 +iyr:2018 +eyr:2029 +hcl:#b6652a + +byr:1975 +hcl:930e76 +iyr:2019 +pid:169cm +eyr:2009 +hgt:191 +ecl:#d28c56 + +hcl:z +pid:3190617557 +hgt:160cm +cid:80 +ecl:oth +iyr:2022 +eyr:2008 +byr:2016 + +hcl:#888785 +byr:1999 +ecl:blu +cid:238 +iyr:2018 +hgt:160cm +eyr:2028 +pid:174517111 + +eyr:2035 +hcl:z +byr:2020 +pid:262135957 +cid:324 +iyr:2016 +hgt:161cm +ecl:grn + +byr:1936 +ecl:grn +iyr:2013 +hcl:#623a2f +eyr:2029 +hgt:166cm + +hcl:#cfa07d +hgt:159cm +eyr:2021 +ecl:hzl +iyr:2014 +pid:816039817 +byr:1935 + +pid:596634790 +hgt:161cm +eyr:2036 +iyr:2016 +hcl:#7d3b0c +byr:2015 +ecl:brn + +byr:1952 +hgt:157cm +eyr:2024 +cid:60 +pid:876160626 +ecl:blu +iyr:2011 +hcl:z + +hgt:193cm +iyr:2020 +eyr:2026 +pid:0136642346 +ecl:hzl +hcl:#efcc98 +byr:1995 + +byr:1934 +hgt:177cm +pid:445993865 +ecl:brn +iyr:2018 +eyr:2030 +hcl:#733820 + +eyr:2021 +hgt:71in +pid:918630878 +hcl:#602927 +iyr:2017 +byr:1943 +ecl:gry + +ecl:#81de2c +iyr:2021 +hgt:176cm +eyr:1947 +hcl:#888785 +pid:1370052400 + +ecl:amb +byr:1922 +iyr:2012 +eyr:2022 +pid:098866466 +hcl:#18171d +hgt:63in + +eyr:2028 +iyr:2010 +hcl:184355 +byr:1968 +pid:337089458 +ecl:brn +hgt:181cm + +hcl:#733820 +pid:225958483 +ecl:gry +eyr:2030 +hgt:62in +iyr:2012 +byr:1987 + +eyr:1955 +hcl:03199c +pid:#3e832e +byr:2014 +ecl:#453931 +hgt:70cm + +byr:1975 +ecl:blu +hcl:#7d3b0c +cid:169 +pid:582470437 +hgt:151cm +iyr:2019 +eyr:2027 + +iyr:2017 +byr:1971 +pid:343492418 +hgt:150cm +hcl:#fffffd +eyr:2024 + +byr:1997 +eyr:2026 +cid:257 +hcl:#7d3b0c +ecl:blu +hgt:166cm +iyr:2016 +pid:117625518 + +iyr:2014 +cid:248 +hgt:165cm +hcl:#18171d +pid:294270262 +byr:1925 +ecl:amb +eyr:2028 + +hgt:167in +ecl:dne +pid:174cm +iyr:2019 +byr:2005 +hcl:b29331 +cid:86 + +hcl:#733820 +pid:259969636 +eyr:2023 +ecl:hzl +cid:317 +hgt:185cm +byr:2025 +iyr:2012 + +hcl:#cfa07d +hgt:152cm +pid:807755992 +iyr:2020 +byr:1922 +ecl:grn +eyr:2025 +cid:241 + +pid:997807107 +byr:1958 +ecl:dne +iyr:2013 +eyr:2023 +hcl:#18171d +hgt:152cm + +ecl:blu +hgt:170cm +byr:1932 +pid:775223495 +eyr:2024 +iyr:2015 + +iyr:2011 +ecl:grn +hcl:#ceb3a1 +pid:190577415 +hgt:63in +eyr:2021 +byr:1986 + +ecl:oth +eyr:2025 +hgt:180cm +pid:258195402 +iyr:2017 +byr:1961 +cid:109 +hcl:#888785 + +hgt:178cm +byr:1952 +eyr:2023 +hcl:#733820 +pid:106939563 +ecl:brn +iyr:2012 + +hgt:188cm +iyr:2012 +hcl:#fffffd +byr:1942 +ecl:brn +pid:804371742 + +byr:1978 +cid:120 +eyr:2026 +pid:405714523 +hgt:60in +hcl:#a97842 +ecl:blu +iyr:2017 + +iyr:2015 +byr:1958 +ecl:grn +hcl:#b6652a +pid:#9e8af3 +eyr:2026 +hgt:167cm + +hgt:171cm +hcl:#888785 +cid:274 +ecl:grn +pid:919263460 +eyr:2023 +iyr:2020 + +pid:606726472 +eyr:2022 +byr:2008 +ecl:zzz +cid:72 +hgt:173in + +eyr:2032 +byr:2004 +hcl:z +iyr:2011 +ecl:hzl +pid:523494728 +hgt:70cm + +hgt:169cm +pid:755822781 +byr:1984 +ecl:hzl +hcl:#6b5442 +iyr:2014 + +eyr:2020 +byr:1942 +cid:85 +hgt:157cm +pid:558287447 +hcl:#efcc98 +ecl:hzl + +byr:1980 +cid:225 +pid:367501996 +iyr:2016 +ecl:grn +hcl:#efcc98 +hgt:175cm +eyr:2029 + +pid:264780775 +hgt:182cm +ecl:grn +hcl:#18171d +eyr:2024 +byr:1926 +iyr:2013 + +byr:1969 +iyr:2015 +eyr:2026 +ecl:blu +hcl:#fffffd +pid:005695878 +cid:273 + +ecl:brn +byr:2006 +hgt:152cm +hcl:#888785 +pid:171cm +cid:249 +iyr:2026 +eyr:2022 + +byr:2011 +iyr:2020 +ecl:zzz +hcl:z +pid:412624100 +eyr:2031 + +cid:111 +hcl:df9bd0 +iyr:2022 +ecl:#32fdf9 +byr:2017 +eyr:2000 +hgt:166in +pid:0654651026 + +eyr:2021 +ecl:gry +pid:587324819 +hgt:187cm +byr:1951 +hcl:#6b5442 + +iyr:2011 +pid:180780096 +hcl:#623a2f +ecl:amb +hgt:160cm +byr:1991 +eyr:2026 + +byr:2022 +hgt:152cm +eyr:2023 +cid:70 +ecl:grn +hcl:e0a24e +iyr:1959 +pid:77110462 + +pid:251982311 +byr:1994 +ecl:gry +hgt:165cm +eyr:2021 +hcl:#623a2f +iyr:2019 + +ecl:blu +byr:1945 +cid:241 +pid:732768808 +hcl:#efcc98 +hgt:171cm +eyr:2020 +iyr:2012 + +cid:243 +eyr:2001 +hcl:01a022 +hgt:162 +pid:507703455 +byr:2003 +ecl:#c6a07b +iyr:1941 + +hcl:#733820 +cid:150 +ecl:hzl +pid:843607639 +hgt:190cm +byr:1958 +eyr:2025 + +eyr:2030 +pid:489370607 +iyr:2014 +ecl:oth +hcl:#cfa07d +byr:1995 +hgt:193cm + +hgt:68in +byr:1933 +iyr:2010 +ecl:brn +pid:380075958 +hcl:#623a2f +cid:279 +eyr:2025 + +iyr:2019 +byr:2001 +hcl:#cfa07d +ecl:brn +pid:349877352 +hgt:161cm +eyr:2029 + +hgt:171cm +eyr:2040 +ecl:dne +hcl:#6b5442 +iyr:2020 +byr:1990 + +hcl:#fffffd +hgt:154cm +byr:1979 +eyr:2020 +iyr:2018 +pid:118713281 +cid:174 + +hcl:#7d3b0c +eyr:2030 +ecl:brn +iyr:2017 +cid:184 +hgt:180cm +pid:504181498 +byr:1925 + +hgt:150cm +eyr:2020 +byr:1999 +hcl:#a97842 +iyr:2011 +ecl:grn +pid:620166468 + +hcl:#602927 +iyr:2015 +byr:1928 +pid:083747352 +eyr:2027 +hgt:193cm +ecl:hzl + +byr:1938 +ecl:gry +pid:511669464 +eyr:1973 +hgt:70cm +cid:262 +iyr:2015 +hcl:#c0946f + +eyr:2029 +byr:1923 +hgt:160cm +hcl:#7d3b0c +iyr:2013 +pid:525837692 +ecl:gry + +hcl:#602927 +eyr:2025 +pid:232338168 +hgt:174cm +cid:322 +iyr:2010 +ecl:oth + +hgt:192in +cid:126 +hcl:#6b5442 +pid:101406211 +byr:1922 +ecl:hzl +eyr:2022 +iyr:2013 + +eyr:2026 +ecl:amb +byr:1921 +cid:336 +iyr:2020 +hgt:182cm +pid:533626984 + +pid:411943955 +ecl:amb +eyr:2025 +hgt:166cm +byr:1964 +hcl:#341e13 +cid:285 +iyr:2010 + +ecl:grn +byr:1933 +eyr:2024 +hgt:153cm +hcl:#5cfb31 +iyr:2019 +pid:773885967 + +ecl:hzl +pid:426060511 +hgt:159cm +byr:1922 +hcl:#6ffd04 +iyr:2017 + +byr:2025 +pid:#097d1b +iyr:2020 +eyr:2029 +hcl:73d113 +hgt:69cm +ecl:utc + +ecl:amb +hgt:170cm +eyr:2025 +byr:1930 +iyr:2018 +hcl:#733820 +cid:262 + +iyr:2019 +eyr:2021 +cid:65 +pid:258615618 +ecl:oth +byr:1987 +hcl:#efcc98 +hgt:178cm + +hcl:z +eyr:1980 +ecl:#1c5fd1 +hgt:65cm +byr:2014 +cid:222 +pid:#c69fd5 +iyr:2020 + +cid:271 +pid:#4b8380 +hcl:80fab0 +byr:2024 +ecl:#20e25f +iyr:1945 +eyr:1935 +hgt:159cm diff --git a/AdventOfCode/IntcodeComputer.cs b/AdventOfCode/IntcodeComputer.cs new file mode 100755 index 0000000..640324e --- /dev/null +++ b/AdventOfCode/IntcodeComputer.cs @@ -0,0 +1,149 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace AdventOfCode +{ + public static class IntcodeComputer + { + public static (int[] opcodes, List output) Run(int[] opcodes, int? noun = null, int? verb = null, int[]? input = null) + { + opcodes[1] = noun ?? opcodes[1]; + opcodes[2] = verb ?? opcodes[2]; + + List output = new List(); + + int ptr = 0; + int inputPtr = 0; + + while (opcodes[ptr] != 99) + { + int GetOpcode(int opcode, Mode mode) => + mode switch + { + Mode.Position => opcodes[opcode], + Mode.Immediate => opcode, + _ => throw new Exception() + }; + + bool jumped = false; + Mode paramOne = opcodes[ptr] / 100 % 10 == 0 ? Mode.Position : Mode.Immediate; + Mode paramTwo = opcodes[ptr] / 1000 == 0 ? Mode.Position : Mode.Immediate; + + int code = opcodes[ptr] % 100; + + switch (code) + { + case 1: // Add + { + int x = GetOpcode(opcodes[ptr + 1], paramOne); + int y = GetOpcode(opcodes[ptr + 2], paramTwo); + + opcodes[opcodes[ptr + 3]] = x + y; + break; + } + + case 2: // Multiply + { + int x = GetOpcode(opcodes[ptr + 1], paramOne); + int y = GetOpcode(opcodes[ptr + 2], paramTwo); + + opcodes[opcodes[ptr + 3]] = x * y; + break; + } + + case 3: // Read input + if (input != null) + { + opcodes[opcodes[ptr + 1]] = inputPtr < input.Length ? input[inputPtr] : int.Parse(Console.ReadLine()); + inputPtr++; + break; + } + opcodes[opcodes[ptr + 1]] = int.Parse(Console.ReadLine()); + break; + + case 4: // Output + { + output.Add(GetOpcode(opcodes[ptr + 1], paramOne)); + break; + } + + case 5: // Jump if true + { + int x = GetOpcode(opcodes[ptr + 1], paramOne); + int y = GetOpcode(opcodes[ptr + 2], paramTwo); + + if (x != 0) + { + ptr = y; + jumped = true; + }; + break; + } + + case 6: // Jump if false + { + int x = GetOpcode(opcodes[ptr + 1], paramOne); + int y = GetOpcode(opcodes[ptr + 2], paramTwo); + if (x == 0) + { + ptr = y; + jumped = true; + }; + break; + } + + case 7: // Less than + { + int x = GetOpcode(opcodes[ptr + 1], paramOne); + int y = GetOpcode(opcodes[ptr + 2], paramTwo); + + opcodes[opcodes[ptr + 3]] = x < y ? 1 : 0; + break; + } + + case 8: // Equal to + { + int x = GetOpcode(opcodes[ptr + 1], paramOne); + int y = GetOpcode(opcodes[ptr + 2], paramTwo); + + opcodes[opcodes[ptr + 3]] = x == y ? 1 : 0; + break; + } + + case 99: + throw new Exception("Skipped an exit code"); + + default: + throw new Exception("Unknown opcode encountered"); + } + + if (!jumped) + { + ptr += InstructionLength[code]; + } + } + return (opcodes, output); + } + + private static readonly Dictionary InstructionLength = new Dictionary() + { + // Instruction number, How far to move the ptr + {1, 4 }, + {2, 4 }, + {3, 2 }, + {4, 2 }, + {5, 3 }, + {6, 3 }, + {7, 4 }, + {8, 4 }, + }; + + private enum Mode + { + Position = 0, + + Immediate = 1 + } + } +} \ No newline at end of file diff --git a/AdventOfCode/Program.cs b/AdventOfCode/Program.cs new file mode 100755 index 0000000..5420e47 --- /dev/null +++ b/AdventOfCode/Program.cs @@ -0,0 +1,98 @@ +using AdventOfCode.Contracts; +using Mono.Options; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; + +namespace AdventOfCode +{ + class Program + { + private static bool Help { get; set; } + private static bool BigBoi { get; set; } + private static List Year { get; set; } = new List(); + private static List Day { get; set; } = new List(); + + private static void Main(string[] args) + { + OptionSet options = new OptionSet() + { + { "h|?|help", "Prints this help message and exits", s => Help = s != null }, + { "y|year=", "The year of the challenge", (int s) => Year.Add(s) }, + { "d|day=", "The day(s) of the challenge. Accepts multiple (-d 1, -day=2)", (int s) => Day.Add(s) }, + { "b|BigBoi", "Tells the program if it should run the BigBoi input", s => BigBoi = s != null} + }; + + try + { + options.Parse(args); + } + catch (OptionException e) + { + Error(e.Message); + Exit(); + + return; + } + + if (Help) + { + Console.WriteLine("Usage: dotnet ./AoC.dll [OPTIONS]"); + Console.WriteLine("If no options are provided, all years and days will be run."); + Console.WriteLine("If only a year is provided, all days from that year will be run."); + Console.WriteLine("If only a day is provided, the provided day from all years will be run."); + options.WriteOptionDescriptions(Console.Out); + return; + } + + if (!Day.Any() && (Day.Min() < 0 || Day.Max() > 25)) + { + Error("Days must be between 1 and 25."); + + return; + } + + var days = GetDays(); + + if (Day.Any()) + { + days = days.Where(d => Day.Contains(d.DayNumber)); + } + + if (Year.Any()) + { + days = days.Where(d => Year.Contains(d.Year)); + } + + foreach (Day d in days) + { + d.Execute(BigBoi); + d.Write(); + } + + Exit(); + } + + private static void Error(string e) + { + Console.Write("Advent of Code:"); + Console.WriteLine(e); + Console.WriteLine("Try AdventOfCode --help for more information"); + } + + private static void Exit() + { + Console.WriteLine("Press any key to exit."); + Console.ReadKey(); + } + + private static IEnumerable GetDays() => + Assembly.GetExecutingAssembly() + .GetTypes() + .Where(t => t.BaseType == typeof(Day)) + .Select(t => (Day)Activator.CreateInstance(t)) + .OrderBy(t => t.Year) + .ThenBy(t => t.DayNumber); + } +} \ No newline at end of file diff --git a/AdventOfCode/Properties/launchSettings.json b/AdventOfCode/Properties/launchSettings.json new file mode 100755 index 0000000..90c2d94 --- /dev/null +++ b/AdventOfCode/Properties/launchSettings.json @@ -0,0 +1,8 @@ +{ + "profiles": { + "AdventOfCode": { + "commandName": "Project", + "commandLineArgs": "-y 2020 -d 5 -b" + } + } +} \ No newline at end of file diff --git a/AdventOfCode/TwentyTwenty/Five.cs b/AdventOfCode/TwentyTwenty/Five.cs new file mode 100755 index 0000000..3594563 --- /dev/null +++ b/AdventOfCode/TwentyTwenty/Five.cs @@ -0,0 +1,165 @@ +using AdventOfCode.Contracts; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; + +namespace AoC.TwentyTwenty +{ + class Five : Day + { + public override int Year => 2020; + public override int DayNumber => 5; + + public override void BigBoi(string[] input) + { + int grandTotal = 0; + HashSet seats = new HashSet(); + + foreach (string s in input) + { + + int upper = 127; + int lower = 0; + int left = 0; + int right = 7; + + int row = 64; + int col = 4; + foreach (char c in s) + { + _ = c switch + { + 'F' => upper -= row, + 'B' => lower += row, + 'L' => right -= col, + 'R' => left += col, + _ => throw new Exception("AAAAAAAAAAA") + }; + + if (c == 'F' || c == 'B') + { + row /= 2; + } + else + { + col /= 2; + } + } + + int total = (upper * 8) + left; + + if (total > grandTotal) + { + grandTotal = total; + } + + seats.Add(total); + } + + Print("BigBoi 1", grandTotal); + + for (int i = 0; i < int.MaxValue; i++) + { + if (!seats.Contains(i) && seats.Contains(i + 1) && seats.Contains(i - 1)) + { + Print("BigBoi 2", i); + break; + } + } + } + + public override void Part1(string[] input) + { + int grandTotal = 0; + + foreach (string s in input) + { + + int upper = 127; + int lower = 0; + int left = 0; + int right = 7; + + int row = 64; + int col = 4; + foreach (char c in s) + { + _ = c switch + { + 'F' => upper -= row, + 'B' => lower += row, + 'L' => right -= col, + 'R' => left += col, + _ => throw new Exception("AAAAAAAAAAA") + }; + + if (c == 'F' || c == 'B') + { + row /= 2; + } + else + { + col /= 2; + } + } + + int total = (upper * 8) + left; + + if (total > grandTotal) + { + grandTotal = total; + } + } + + Print("1", grandTotal); + } + + public override void Part2(string[] input) + { + HashSet seats = new HashSet(); + foreach (string s in input) + { + + int upper = 127; + int lower = 0; + int left = 0; + int right = 7; + + int row = 64; + int col = 4; + foreach (char c in s) + { + _ = c switch + { + 'F' => upper -= row, + 'B' => lower += row, + 'L' => right -= col, + 'R' => left += col, + _ => throw new Exception("AAAAAAAAAAA") + }; + + if (c == 'F' || c == 'B') + { + row /= 2; + } + else + { + col /= 2; + } + } + + seats.Add((upper * 8) + left); + } + + for (int i = 0; i < 1028; i++) + { + if (!seats.Contains(i) && seats.Contains(i + 1) && seats.Contains(i - 1)) + { + Print("2", i); + break; + } + } + } + } +} \ No newline at end of file diff --git a/AdventOfCode/TwentyTwenty/Four.cs b/AdventOfCode/TwentyTwenty/Four.cs new file mode 100755 index 0000000..45321be --- /dev/null +++ b/AdventOfCode/TwentyTwenty/Four.cs @@ -0,0 +1,106 @@ +using AdventOfCode.Contracts; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text.RegularExpressions; + +namespace AoC.TwentyTwenty +{ + namespace AoC.TwentyTwenty + { + class Four : Day + { + public override int Year => 2020; + public override int DayNumber => 4; + + public override void BigBoi(string[] input) + { + throw new NotImplementedException(); + } + + public override void Part1(string[] input) + { + IEnumerable inputbutforreal = input.ToList(); + inputbutforreal = inputbutforreal.Append(""); + HashSet keys = new HashSet(); + int valid = 0; + + foreach (string s in inputbutforreal) + { + if (s == string.Empty) + { + if (keys.Count == 7 && !keys.Contains("cid") || keys.Count > 7) + { + valid += 1; + } + + keys = new HashSet(); + continue; + } + + keys.Add(s.Split(":")[0]); + } + + Print("1", valid); + } + + public override void Part2(string[] input) + { + IEnumerable inputbutforreal = input.ToList(); + inputbutforreal = inputbutforreal.Append(""); + HashSet keys = new HashSet(); + + int valid = 0; + bool isValid = true; + + foreach (string s in inputbutforreal) + { + if (s == string.Empty) + { + if (isValid && (keys.Count == 7 && !keys.Contains("cid") || keys.Count > 7)) + { + valid += 1; + } + + isValid = true; + keys = new HashSet(); + continue; + } + + if (!isValid) + { + continue; + } + + string key = s.Split(":")[0]; + string value = s.Split(":")[1]; + + isValid = key switch + { + "byr" => Regex.IsMatch(value, "19([2-9][0-9])|200[0-2]"), + "iyr" => Regex.IsMatch(value, "20(1[0-9]|20)"), + "eyr" => Regex.IsMatch(value, "20(2[0-9]|30)"), + "hgt" => Regex.IsMatch(value, "^(1([5-8][0-9]|9[0-3])cm|(59|6[0-9]|7[0-3])in)$"), + "hcl" => Regex.IsMatch(value, "#[0-9a-f]{6}"), + "ecl" => Regex.IsMatch(value, "amb|blu|brn|gry|grn|hzl|oth"), + "pid" => Regex.IsMatch(value, "^\\d{9}$"), + "cid" => true, + _ => throw new Exception("NIGGERS") + }; + + + + if (key == "pid" && !Regex.IsMatch(value, "^\\d{9}$") && Regex.IsMatch(value, "\\d{9}")) + { + Console.WriteLine(value); + } + + keys.Add(key); + } + + Print("2", valid); + } + } + } +} \ No newline at end of file diff --git a/AdventOfCode/TwentyTwenty/One.cs b/AdventOfCode/TwentyTwenty/One.cs new file mode 100755 index 0000000..31ae61b --- /dev/null +++ b/AdventOfCode/TwentyTwenty/One.cs @@ -0,0 +1,57 @@ +using AdventOfCode.Contracts; +using AoC.Utils; +using System; +using System.Diagnostics; + +namespace AoC.TwentyTwenty +{ + class One : Day + { + public override int Year => 2020; + public override int DayNumber => 1; + + public override void BigBoi(string[] input) + { + throw new NotImplementedException(); + } + + public override void Part1(string[] input) + { + int[] nums = input.ToIntArray(); + + for (int i = 0; i < nums.Length; i++) + { + for (int j = 0; j < nums.Length; j++) + { + if (nums[i] + nums[j] == 2020) { + Print("1", nums[i] * nums[j]); + return; + } + } + } + } + + public override void Part2(string[] input) + { + Stopwatch sw = Stopwatch.StartNew(); + int[] nums = input.ToIntArray(); + + for (int i = 0; i < nums.Length; i++) + { + for (int j = 0; j < nums.Length; j++) + { + for (int k = 0; k < nums.Length; k++) + { + if (nums[i] + nums[j] + nums[k] == 2020) + { + Print("2", nums[i] * nums[j] * nums[k]); + Console.WriteLine(sw.Elapsed); + return; + } + } + + } + } + } + } +} \ No newline at end of file diff --git a/AdventOfCode/TwentyTwenty/Three.cs b/AdventOfCode/TwentyTwenty/Three.cs new file mode 100755 index 0000000..eef8972 --- /dev/null +++ b/AdventOfCode/TwentyTwenty/Three.cs @@ -0,0 +1,54 @@ +using AdventOfCode.Contracts; +using System; + +namespace AoC.TwentyTwenty +{ + namespace AoC.TwentyTwenty + { + class Three : Day + { + public override int Year => 2020; + public override int DayNumber => 3; + + public override void BigBoi(string[] input) + { + throw new NotImplementedException(); + } + + public override void Part1(string[] input) + { + Print("1", Numbers(input, 1, 3)); + } + + public override void Part2(string[] input) + { + var thing = + Numbers(input, 1, 1) * + Numbers(input, 1, 3) * + Numbers(input, 1, 5) * + Numbers(input, 1, 7) * + Numbers(input, 2, 1); + + Print("2", thing); + } + + public static long Numbers(string[] input, int rows, int columns) + { + int cursor = 0; + long trees = 0; + + for (int i = 0; i < input.Length; i += rows) + { + if (input[i][cursor % input[i].Length] == '#') + { + trees += 1; + } + + cursor += columns; + } + + return trees; + } + } + } +} \ No newline at end of file diff --git a/AdventOfCode/TwentyTwenty/Two.cs b/AdventOfCode/TwentyTwenty/Two.cs new file mode 100755 index 0000000..bb6f15f --- /dev/null +++ b/AdventOfCode/TwentyTwenty/Two.cs @@ -0,0 +1,80 @@ +using AdventOfCode.Contracts; +using AoC.Utils; +using System; +using System.Diagnostics; +namespace AoC.TwentyTwenty +{ + + + namespace AoC.TwentyTwenty + { + class Two : Day + { + public override int Year => 2020; + public override int DayNumber => 2; + + public override void BigBoi(string[] input) + { + throw new NotImplementedException(); + } + + public override void Part1(string[] input) + { + int total = 0; + foreach (string s in input) + { + int occurences = 0; + string[] split = s.Split(" "); + string[] startEnd = split[0].Split("-"); + int start = int.Parse(startEnd[0]); + int end = int.Parse(startEnd[1]); + char c = split[1][0]; + + foreach (char letter in split[2]) + { + if (letter == c) + { + occurences += 1; + } + } + + if (occurences >= start && occurences <= end) + { + total += 1; + } + } + + Print("1", total); + } + + public override void Part2(string[] input) + { + int total = 0; + foreach (string s in input) + { + string[] split = s.Split(" "); + string[] startEnd = split[0].Split("-"); + string password = split[2]; + char start = password[int.Parse(startEnd[0]) - 1]; + char end = password[int.Parse(startEnd[1]) - 1]; + char c = split[1][0]; + + + bool thing = (start, end) switch + { + _ when start == end => false, + _ when start == c || end == c => true, + _ => false + }; + + if (thing) + { + total += 1; + } + } + + Print("2", total); + } + } + } +} diff --git a/AdventOfCode/Utility.cs b/AdventOfCode/Utility.cs new file mode 100755 index 0000000..7e3d76d --- /dev/null +++ b/AdventOfCode/Utility.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace AdventOfCode +{ + public static class Utility + { + public static Array DeepClone(this Array arr) + { + Array temp = Array.CreateInstance(arr.GetValue(0).GetType(), arr.Length); + arr.CopyTo(temp, 0); + return temp; + } + + public static int ManhattenDistance(int x, int y) + { + return Math.Abs(x) + Math.Abs(y); + } + + public static int[] ToDigitArray(int n) + { + var result = new int[NumberOfDigits(n)]; + for (int i = result.Length - 1; i >= 0; i--) + { + result[i] = n % 10; + n /= 10; + } + return result; + } + + private static int NumberOfDigits(int n) + { + if (n < 0) + { + n = (n == int.MinValue) ? int.MaxValue : -n; + } + + return n switch + { + < 10 => 1, + < 100 => 2, + < 1000 => 3, + < 10000 => 4, + < 100000 => 5, + < 1000000 => 6, + < 10000000 => 7, + < 100000000 => 8, + < 1000000000 => 9, + _ => 10 + }; + } + + public static int[] GetOpcodes(string[] input) => + input.First() + .Split(',') + .Select(x => int.Parse(x)) + .ToArray(); + } +} \ No newline at end of file diff --git a/AdventOfCode/Utils/Collections.cs b/AdventOfCode/Utils/Collections.cs new file mode 100755 index 0000000..f200047 --- /dev/null +++ b/AdventOfCode/Utils/Collections.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AoC.Utils +{ + public static class Collections + { + public static int[] ToIntArray(this string[] input) + { + int[] output = new int[input.Length]; + + for (int i = 0; i < input.Length; i++) + { + output[i] = int.Parse(input[i]); + } + + return output; + } + } +}