From 4bb6f8d06c0e384f3394012b1d48da58ed28cc5e Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Sun, 12 Dec 2021 01:24:32 +0300 Subject: 2020, tracking --- 2020/day1/README.md | 13 + 2020/day1/input | 200 ++++ 2020/day1/sumto.pl | 28 + 2020/day1/threesum.pl | 44 + 2020/day10/input | 94 ++ 2020/day10/joltage.pl | 29 + 2020/day2/input | 1000 ++++++++++++++++++ 2020/day2/pwcountcheck.pl | 22 + 2020/day2/pwindexcheck.pl | 19 + 2020/day3/README.md | 11 + 2020/day3/input | 323 ++++++ 2020/day3/toboggan.pl | 30 + 2020/day3/toboggans.pl | 40 + 2020/day4/input | 1000 ++++++++++++++++++ 2020/day4/passport.pl | 68 ++ 2020/day5/boarding.py | 52 + 2020/day5/input | 824 +++++++++++++++ 2020/day6/declaration.pl | 30 + 2020/day6/group_declaration.pl | 32 + 2020/day6/input | 2190 ++++++++++++++++++++++++++++++++++++++++ 2020/day7/haversacks.py | 35 + 2020/day7/input | 594 +++++++++++ 2020/day7/inside_shiny.py | 45 + 2020/day8/gamechild.py | 55 + 2020/day8/handheld.py | 27 + 2020/day8/input | 642 ++++++++++++ 2020/day9/input | 1000 ++++++++++++++++++ 2020/day9/xmas_encoder.pl | 70 ++ 28 files changed, 8517 insertions(+) create mode 100644 2020/day1/README.md create mode 100644 2020/day1/input create mode 100644 2020/day1/sumto.pl create mode 100644 2020/day1/threesum.pl create mode 100644 2020/day10/input create mode 100644 2020/day10/joltage.pl create mode 100644 2020/day2/input create mode 100644 2020/day2/pwcountcheck.pl create mode 100644 2020/day2/pwindexcheck.pl create mode 100644 2020/day3/README.md create mode 100644 2020/day3/input create mode 100644 2020/day3/toboggan.pl create mode 100644 2020/day3/toboggans.pl create mode 100644 2020/day4/input create mode 100644 2020/day4/passport.pl create mode 100644 2020/day5/boarding.py create mode 100644 2020/day5/input create mode 100644 2020/day6/declaration.pl create mode 100644 2020/day6/group_declaration.pl create mode 100644 2020/day6/input create mode 100644 2020/day7/haversacks.py create mode 100644 2020/day7/input create mode 100644 2020/day7/inside_shiny.py create mode 100644 2020/day8/gamechild.py create mode 100644 2020/day8/handheld.py create mode 100644 2020/day8/input create mode 100644 2020/day9/input create mode 100644 2020/day9/xmas_encoder.pl (limited to '2020') diff --git a/2020/day1/README.md b/2020/day1/README.md new file mode 100644 index 0000000..f8ae070 --- /dev/null +++ b/2020/day1/README.md @@ -0,0 +1,13 @@ +# Day 1 + +## First Part + +Simple two sum problem + + perl sumto.pl + +## Second part + +[Three sum problem](https://www.callicoder.com/three-sum-problem/), which is like two sum problem after fixing the first index + + perl threesum.pl diff --git a/2020/day1/input b/2020/day1/input new file mode 100644 index 0000000..b221b17 --- /dev/null +++ b/2020/day1/input @@ -0,0 +1,200 @@ +997 +1582 +1790 +1798 +1094 +1831 +1879 +1730 +1995 +1702 +1680 +1869 +1964 +1777 +1862 +1928 +1997 +1741 +1604 +1691 +1219 +1458 +1749 +1717 +1786 +1665 +1724 +1998 +1589 +1828 +1953 +1848 +1500 +1590 +1968 +1948 +1323 +1800 +1986 +679 +1907 +1916 +1820 +1661 +1479 +1808 +1824 +1825 +1952 +1666 +1541 +1791 +1906 +1638 +1557 +1999 +1710 +1549 +1912 +1974 +1628 +1748 +1411 +1978 +1865 +1932 +1839 +1892 +1981 +1807 +357 +912 +1443 +1972 +1816 +1890 +1029 +1175 +1522 +1750 +2001 +1655 +1955 +1949 +1660 +233 +1891 +1994 +1934 +1908 +1573 +1712 +1622 +1770 +1574 +1778 +1851 +2004 +1818 +1200 +1229 +1110 +1005 +1716 +1765 +1835 +1773 +15 +1914 +1833 +1689 +1843 +1718 +1872 +390 +1941 +1178 +1670 +1899 +1864 +1913 +2010 +1855 +1797 +1767 +1673 +1657 +1607 +1305 +1341 +1662 +1845 +1980 +1534 +1789 +1876 +1849 +1926 +1958 +977 +1709 +1647 +1832 +1785 +1854 +1667 +1679 +1970 +1186 +2000 +1681 +1684 +1614 +1988 +1561 +1594 +1636 +1327 +1696 +1915 +1045 +1829 +1079 +1295 +1213 +1714 +1992 +1984 +1951 +1687 +1842 +1792 +87 +1732 +428 +1799 +1850 +1962 +1629 +1965 +1142 +1040 +131 +1844 +1454 +1779 +1369 +1960 +1887 +1725 +1893 +1465 +1676 +1826 +1462 +1408 +1937 +1643 +1069 +1759 diff --git a/2020/day1/sumto.pl b/2020/day1/sumto.pl new file mode 100644 index 0000000..931f5e2 --- /dev/null +++ b/2020/day1/sumto.pl @@ -0,0 +1,28 @@ +use strict; +use warnings; +use DDP; +use Smart::Comments; + +open my $fh, '<', "input" or die "no input present, $!"; +chomp(my @nums = <$fh>); +close $fh; + +@nums = sort { $a <=> $b } @nums; + +my $l_idx = 0; +my $r_idx = $#nums; + +my $total = $nums[$l_idx] + $nums[$r_idx]; + +while ($total != 2020) { + + if ($total < 2020) { + $l_idx++; # total too low, increase + } else { + $r_idx--; # total too high, decrease + } + + $total = $nums[$l_idx] + $nums[$r_idx]; +} + +print $nums[$l_idx] * $nums[$r_idx]; diff --git a/2020/day1/threesum.pl b/2020/day1/threesum.pl new file mode 100644 index 0000000..8f2083a --- /dev/null +++ b/2020/day1/threesum.pl @@ -0,0 +1,44 @@ +use strict; +use warnings; +use DDP; +# use Smart::Comments; + +open my $fh, '<', "input" or die "no input present, $!"; +chomp(my @nums = <$fh>); +close $fh; + +@nums = sort { $a <=> $b } @nums; + +# fix one index, solve two sum problem +my $fixed_idx = 0; +my $l_idx = 1; +my $r_idx = $#nums; + +my $total = $nums[$fixed_idx] + $nums[$l_idx] + $nums[$r_idx]; + +while ($total != 2020) { + + if ($total < 2020) { + $l_idx++; # total too low, increase + } else { + $r_idx--; # total too high, decrease + } + + # fixed index might not be correct + if ($l_idx > $r_idx) { + $fixed_idx++; + $l_idx = $fixed_idx + 1; + $r_idx = $#nums; + } + + $total = $nums[$fixed_idx] + $nums[$l_idx] + $nums[$r_idx]; + ### $total + + ### $fixed_idx + ### $l_idx + ### $r_idx + + # print("fixed: $nums[$fixed_idx]\nleft: $nums[$l_idx]\nright: $nums[$r_idx]\n"); +} + +print $nums[$fixed_idx] * $nums[$l_idx] * $nums[$r_idx]; diff --git a/2020/day10/input b/2020/day10/input new file mode 100644 index 0000000..8d69912 --- /dev/null +++ b/2020/day10/input @@ -0,0 +1,94 @@ +26 +97 +31 +7 +2 +10 +46 +38 +112 +54 +30 +93 +18 +111 +29 +75 +139 +23 +132 +85 +78 +99 +8 +113 +87 +57 +133 +41 +104 +98 +58 +90 +13 +91 +20 +68 +103 +127 +105 +114 +138 +126 +67 +32 +145 +115 +16 +141 +1 +73 +45 +119 +51 +40 +35 +150 +118 +53 +80 +79 +65 +135 +74 +47 +128 +64 +17 +4 +84 +83 +147 +142 +146 +9 +125 +94 +140 +131 +134 +92 +66 +122 +19 +86 +50 +52 +108 +100 +71 +61 +44 +39 +3 +72 diff --git a/2020/day10/joltage.pl b/2020/day10/joltage.pl new file mode 100644 index 0000000..3a22057 --- /dev/null +++ b/2020/day10/joltage.pl @@ -0,0 +1,29 @@ +use strict; +use warnings; +use DDP; +use Smart::Comments; +use List::Util qw(sum min); + +my @jolts = sort { $a <=> $b } map { int } <>; + +@jolts = (0, @jolts, $jolts[-1] + 3); + +my %diffs; + +my $curr = 0; + +foreach my $joltage (@jolts) { + $diffs{$joltage - $curr}++; + $curr = $joltage; +} + +p %diffs; + +print($diffs{1} * $diffs{3}); + +my @memoi = (1); +for my $k (1..$#jolts) { + push @memoi, sum map {$memoi[$k-$_]} grep {$jolts[$k-$_]+3 >= $jolts[$k]} 1..min($k,3); +} + +print "\n$memoi[-1]" diff --git a/2020/day2/input b/2020/day2/input new file mode 100644 index 0000000..8903fa4 --- /dev/null +++ b/2020/day2/input @@ -0,0 +1,1000 @@ +13-16 k: kkkkkgmkbvkkrskhd +5-6 p: qpppvzp +3-4 p: psppxhlfpvkh +3-10 w: wwwwwwwwwwdwww +4-5 r: rcgrrcr +3-4 c: clvccc +1-5 x: xfsfxmctb +9-14 k: kpkmkkckhkkkkvkk +5-6 s: gsfsss +4-8 c: cccdcqdcr +2-5 k: kmkpkkfgkkkkdkkk +9-11 f: pfnsfffwxsn +8-9 w: wjwnwcwxc +7-8 q: rrxhplqs +5-10 n: gpnkqnxnbjzgjnb +18-19 p: fvpkgfkfjgwllqwhrjd +12-13 v: kvvvbmdvvvvvvcvvvv +3-5 m: mdmkmvhszpjcxl +2-7 v: qjmvzdwxc +1-4 b: bbbbbbbb +2-5 c: fzcdccfkcsjhckccrcx +2-10 d: fhdwdbdddrsldrtdjdr +1-7 z: ztszzfzztcqzrz +4-6 j: mmjjjrj +11-12 b: smbgkbbmbpbbmkbbbb +3-5 r: jxzrk +13-15 d: fppsvgqrdgrbddd +12-14 w: wwwwkcwwwpwzwzwwsz +5-6 v: lmcvvv +12-14 x: xxxxxxvxxmxbjnx +1-2 p: hpgpt +10-11 k: qmktzklkgkcknfwkh +6-7 r: ntcrrrjrznk +7-8 v: vshxvzxw +9-13 c: cncccccclcdwccwmc +5-6 r: srrrgv +6-9 w: bwfswqthk +5-7 f: hfvsfjf +11-14 v: zbksgqcrclvvwpfvfr +8-9 v: vvvvvmvvvkv +1-12 n: gnnnnnnndnqnd +10-11 j: jtjjjvbjjhj +3-10 x: vgxxxwqxkxn +5-6 z: zzzztr +2-4 z: rzdhz +10-11 m: mmmmmmmmmmvj +2-4 z: jzczpvzzs +1-4 k: rkkhk +4-8 n: nwcwmnflpbnnl +2-4 w: dwwgwwssf +1-3 m: smzm +2-6 d: dsddwwljd +13-15 w: wwwwrwwwdvwwpwg +7-10 f: bhsfffzfjdbfmf +6-7 w: wwwwtwww +3-6 b: bbbbbbxb +7-9 d: dvwdxjgdhf +12-14 n: znnnnnnnnlnfnrn +1-7 v: qvkvvvgv +2-15 x: xsxxxxxxxxxxxxbx +5-11 n: nckpwnmmnzg +4-13 d: dzdddcdkxgqddqdp +5-17 m: mkxmzbmmmmvfvmmjvmmm +11-13 p: pppzppppswhqhpppp +4-5 b: bbbgg +5-8 v: vvvvvvsv +9-10 j: jnlkmhmvjvnbjcsvlwb +2-4 x: zxxxxv +1-17 r: drrrrrrrrrrrrrrrcr +11-17 w: wqmwlszsnnwwwzwwwww +2-3 m: mmmmmmmmm +9-10 n: nrnngngnvr +4-8 z: bxjtzkdzwkzz +5-8 g: vjtvqtgqjgtggggmj +2-5 q: qfgcqw +6-11 c: cgccccchcccvc +6-8 t: tpjgfjpr +5-10 h: hhhnhbhhczhh +11-14 d: gdddddddddwdddr +1-2 l: twngrmgrckmlmh +10-12 r: rrrrrrfprfrr +7-8 m: bmmmmsrhqm +2-11 w: wlwwwwdnqsvw +10-13 j: jjjjjjtjzjjjj +4-16 f: fdvgffxfzcffffff +2-6 q: wbfvkm +4-6 d: ddddddd +2-4 p: jpxprdpn +5-6 s: tgssrrpbvsgs +3-10 j: spjgjjjcbjsjxj +5-10 w: wwqrdvwwwpwwwr +3-4 x: hpxxxzf +4-8 d: dxcpddddddrddddddqj +15-16 z: zhfxlzzkzzgzhzzz +3-5 s: ssslsnc +2-3 j: rrjrwg +7-13 x: xxxxxxpxxxxxtxx +5-8 x: xxxxxxxrxxxxxxxgx +4-10 g: dmhcmbwnwwggcw +6-8 s: qtsxflsfshzvsgpxg +7-9 c: cbvccckcwc +15-16 r: rlrrrrrrnrrrrrsx +8-10 r: kjrbrrrbrnvrrx +6-7 q: zpsmcjmmr +5-10 p: ppgpsppppkpp +3-4 k: kbkkk +1-2 b: bbbbb +8-11 s: sssvssssbsw +5-7 m: lmwrmmmmgmfhd +16-18 j: jjjjjjjjjjjjjljsjt +1-14 b: bcjlbbcwbjbxbbvbf +2-5 z: qzzrfv +4-17 t: tttrtzttttttttttxttt +5-6 w: kwwwjw +7-9 l: bclgtbghdtd +1-8 h: mqhbhhhhhhh +5-6 j: zznjjfvvjwcths +5-7 t: tttbmttd +5-14 v: vvvvpjvvvvvvhm +2-4 x: vxlx +5-15 g: gfgfnnqkbgngpdpp +1-8 n: jnnnnpnvntrp +3-4 b: bbbb +6-7 z: frszzzfz +6-9 f: pbbmlvfpwvw +4-15 g: gbjgggfgvggggdgbq +1-9 w: tgwljtgwlm +14-15 k: kkkkkkkkkkkkkzk +11-12 p: ppppppppppklp +4-8 n: nnnvpkzsn +13-16 m: fmjsqwtmwbdxmnwmlmb +2-7 c: qccgccczcc +8-11 x: xxxxkxxbxxx +1-4 g: gcgb +6-7 l: pkjllll +2-3 n: mnntpwsrlqkxkgnlb +9-10 s: sssssssscss +6-16 n: rtthnbsrfvndnsnnj +1-2 h: hjdhh +1-3 f: ffff +6-9 l: xqtvlllllpmlxtl +6-11 r: rrrrrrrrrrr +1-6 z: fzzzzzzzzzz +2-7 q: qqdqqqgqqqqtxqqqq +9-13 k: dbfkszjjmkkkfkdkklxk +5-6 j: mdjjljdfzjvqd +5-10 s: tsbskgsbtsqdd +12-14 j: tjjsjdjfjtjjfjj +9-10 x: xxxxxxxxgx +8-11 r: rrgrrrrbrrcrrr +6-18 m: vmnmhmbmmmmmmmmmmz +6-8 k: llkkqrkc +1-2 c: cccc +2-8 x: xxxxxxxxxx +7-10 p: ppzppppppwp +9-17 v: cdjwncwrbcgkfvwzvkf +6-11 w: wwftwjwwwcwwvwwvw +12-16 g: gggggggggxggggggggh +1-4 z: kzxzcdnpgczhn +3-5 t: tttmtttvxtd +4-5 h: hhhwh +4-8 d: dvddddln +8-15 l: lvllfllllxllllwmpl +7-9 s: dbsksbwtj +8-15 q: qkbqmqqqqqqqccqhq +2-6 r: grcsrrqz +14-18 s: sssssssssssssssssss +7-10 r: ffrrttnrrrrs +2-11 c: csccccccfdgccgcccccc +3-5 r: rrrrr +3-4 h: qrhh +7-9 k: kkzqkrkwk +1-5 k: khkkfgkj +3-6 l: pplnxl +10-13 k: chsxfrtrkkjgq +6-9 b: lbbblnbrbbb +3-5 n: hqnlfpnj +5-8 f: shffkcnfdmswfrnsfrpg +2-7 j: jjjjcdcnwxnbr +4-13 z: dvxnzpcbfkngk +11-13 h: hwzpzbphjhrhk +1-10 v: vqptqpbbtq +1-4 b: bdfpt +13-18 p: pppppppppppppppppp +14-15 h: hhhfhhhhhhhhhnmhh +4-14 x: wxsbxxxjvxxbxx +9-10 m: mmdmmxsrjdmpdmzsmm +11-16 s: szsbssssssszsxss +9-13 h: hhhhbhvhthhvnh +5-6 q: qqqqqq +1-3 d: ddldcqrdmd +11-17 f: ffcfkfffffpwfqffm +3-6 m: rmmmqm +9-11 l: vlblgszllwbvpn +13-15 z: ghzvdlzrvrzzcnz +3-5 l: bglllcll +1-8 h: hhhhhhhhhh +2-7 j: qjsgtjjt +1-2 d: ddbctlvpdf +11-14 v: vvvbvvvvvvtvvvvv +14-15 g: ggzgggggggswgrjggm +9-13 v: hqtcqvnbvqnmv +12-13 b: bbbbbbbbbbbjzbbbbb +5-6 r: rrfrcv +4-6 p: pppppppppppp +6-12 d: fdddddddddddrd +12-17 g: ggghgggggggxggggfgp +2-7 h: hqhhhhjhh +8-12 v: vvvlvvvvvvvv +4-5 n: nnkpg +3-12 m: mmzmmmmmmmmmmmm +11-14 b: bbbbbpbbbbbbdbbbb +6-7 z: zzzzzzr +4-7 n: snnnnfnkn +1-2 h: hnshhqvmjpghntx +15-16 b: bbbbbbbbbbbrbbbb +4-6 n: nxnnpnnnh +2-9 v: sdghvmxtkz +5-7 j: jjjjjjj +4-10 l: plbhsmlllrl +12-18 g: ggtggdlghcjwqwggggg +5-7 b: bzbxrbxgwcdbb +5-15 m: mmmmmmmmmmmmmmmmm +4-13 j: jjjjjjjjjjjjjjj +4-11 k: kshkkwlkkkkkdkbk +1-15 w: bwwwzbwwwnwwwmcww +19-20 l: pblvxmgslllnnsplldnv +3-4 z: skzx +1-5 x: xxqdxgb +2-3 g: wgggc +5-9 d: dgcddwrdf +3-6 m: mfkzjg +5-8 s: hmssmgwxhssg +10-11 s: ssssshqssll +17-19 v: vvsvfvvvvxvvvgvvvbv +11-12 t: cwssdtfqkdttjv +1-5 b: hcptprhlpbwkg +2-8 j: ljjxjjjljp +2-5 q: qqqlqr +2-8 r: jrcwdbhrcltrnsgswpm +3-4 f: ffvff +5-10 h: hhhhhhhhhhzph +5-6 z: mzzmctzz +10-13 w: wwwwwjwqwwwwwwwwww +1-4 m: mmtm +11-12 z: tddzcrptcnlmbjj +3-6 l: llmllpl +2-4 f: ffsf +5-11 g: gggrvgggggg +2-10 k: zbmpktfnddfs +5-9 l: lsbblgpjlms +1-12 s: sssssssssssss +5-7 f: fffdrsc +9-11 z: rzzzzkfzzwqzrz +3-6 z: zwzrbzv +17-18 r: rrrrrrrrrrrrrrrrrg +2-4 n: nnnrgnnn +3-4 n: nfqq +2-3 h: khhc +9-10 x: xxxffbxxxnr +5-6 d: mtgnrjdnmzhddks +3-4 b: bbbb +11-15 p: kppxppppppppppppp +13-18 t: tttdtttttttttttttttt +1-7 p: frjpppwgdpzvvfwds +1-6 k: qkzkkvpk +4-15 n: nnnxnnnnnnnnnnpqn +6-7 l: ndlrqrl +4-5 r: rchrwr +11-12 f: ffffffffhfff +1-3 j: xjjjj +9-10 z: zzzzlzzzgn +6-17 g: tgrhpggcqbjwjggmgql +11-15 v: vvvvvvvvvvlvvvhv +10-13 w: wwwwwwwtwwwwswwfwww +1-2 l: plllllllllllpll +8-9 k: kkckklwkc +2-4 b: bvbp +1-6 r: rrrnqrrrrrrrrrrrrr +8-10 d: pwnvkxddpddd +3-6 k: kkkwkf +8-15 v: vvvvvvvvvvvvvvvvvvv +13-17 g: lhqgggcxlgcvgwgdg +6-13 x: kxxxxsxxxmxxxx +3-4 r: rrrqr +2-3 r: kvrsxjrmtvtr +1-2 h: jtbh +8-9 w: wwwwwdfckw +13-18 v: vvqwvvvnvvvvvvvsvv +6-14 t: mpfthffdnmtxmx +4-5 d: dddcsd +6-7 m: mlmmmnfmmh +5-7 x: xhxpkpqxqnx +9-11 v: vgvvqgvvwmkpfvvlv +15-18 l: jlxqvmjgrrnbhccpdl +2-9 k: kkkkznkkbf +14-15 w: wwwwwwwwwwwwwbwww +9-10 k: wkkvvmkkvgfkkk +10-15 g: bfggggggggggggg +7-8 x: xxxxxxxx +12-14 t: dmtmwtztltfsthtb +6-7 k: kkkkkwk +4-5 c: ccvsz +3-4 c: mclvcfjcqh +16-17 k: skkpknhxxsrqmcvkj +12-13 v: vvvvrfdfsdtvf +1-2 q: fpqp +7-8 b: bwbbbqbbb +5-6 h: hhhhhh +5-7 z: zzvzdzzxzwz +17-18 w: wwwwjhggnwbwwwwwzb +6-8 g: gggggtggg +4-8 n: lnnnzhbn +17-18 g: lggggggggcggglgggg +2-8 v: vbvvvvvkv +1-9 v: vvxvrvvtvvvvv +13-15 j: fhvxdngcrjdqxmnz +5-17 n: nnnnnnnznnnnnnwnnn +1-4 f: fnxdmjdsqbfffnjsnkf +3-8 q: dqqgbnbrpxqclq +4-6 b: xkpbbbk +11-12 l: llqllllllldjll +9-10 c: cwvlcdnmzr +6-8 l: zkjlllvlgvlnlblspm +4-9 b: lbbbbbbbbbwbbbw +9-12 g: gfgrggvgbggg +16-17 r: rrrrrrrrrrprrrrtc +2-16 r: mrbmrrxgrrbzrrmrrj +16-17 v: vnsvvczmjwfkvjvvvsrv +2-11 l: lglrllnlllqlll +2-8 t: sllgjrxkthl +3-7 d: ddldddk +8-13 c: ccckchmcdxccccccsf +8-9 t: cttbtztttfqdqh +4-5 b: tbbxh +12-17 w: wwwwwwwwlwwtwwwvtww +1-5 t: krfwxtzxcwphw +3-10 w: wwwwwwwwwwwww +1-2 n: nnjqqkspswql +9-13 w: wwwwwwwwfwwwwww +1-3 s: ssss +13-14 x: xfxxxxxtxxxxnx +4-5 x: xxxcj +5-15 k: kkkktkkkkkkkkkf +14-16 l: lrlzjxlllpqltlblvlll +5-6 t: ttttfct +11-14 z: zzzzzzrczdkzzz +6-8 f: ffffftfj +9-11 d: ljdngglsdvdsv +10-15 c: ccrqhcqzccnnjvcfcj +11-15 w: jwvwnccwwxzcwwww +9-10 s: ssssssssss +2-4 r: vzfmrr +5-8 l: blhlnlsqb +6-7 c: ccxxcfxldckpcc +2-4 j: czjkj +2-14 d: rlxksvpqsnhhpkds +16-19 k: kkkkkkkkkkkckvkjkkwp +3-9 j: kcjcbjjjjjjjjgljml +2-7 l: ljjzdll +4-8 r: fqnqjbsssqrrwrrrrr +5-15 t: xtnvhtttdsrhtttt +1-3 l: xlzl +6-10 g: ggggncchghgggghgg +10-11 m: msmmmmmcmgj +4-6 c: mcnprhmcfcclcl +12-13 s: ssssswssssstsss +13-14 m: mmmmmmmmmmmmmmmmm +9-11 p: kqvrdbpppcpgqh +6-7 q: qqqqqqq +9-10 b: bpbbnbbbkdbbsbblqrfb +12-13 b: bbbbbbbbbbstsb +8-11 g: ggbbfrsgdxhldnt +7-8 d: dddwddssdbd +6-7 b: bbbbkbfj +3-5 z: jtdklzthgz +5-6 l: hlnlllltmvhmlmq +3-6 q: qqpxqvqp +1-3 z: zskzmzzzhzzzhzvzrzzq +2-8 h: sskhzhlhkht +2-9 r: rltcgrrrrrrr +3-16 f: zrxffkfcvffffncffgff +1-2 r: rrcrhkns +14-17 b: bbbbbbbbbbbhjbgbdblb +4-15 c: cccccccwcckclccrcc +13-14 l: lkzlclbnlhlcnk +13-14 r: rrrrrrrrrrbrrr +4-5 k: cvhkkkbj +2-5 m: kmfnmzh +14-15 n: nnnnfnnnxnnnnnnndnnn +7-10 t: wttwkbhtpf +3-9 n: qjgzpnkpn +6-7 n: nhnnnzn +5-10 n: nngtndngcn +2-5 x: rdxnp +10-13 s: sssssssssxssssssss +6-8 n: mnjnnxnnvckn +2-10 p: gpxpglqwpppp +5-7 t: twtktdts +18-20 c: cccccccccccccccccccc +6-7 d: dddddddw +10-11 x: xxxjxxxxxvzxxxx +4-7 z: zrphzzlzhgfwd +4-8 l: lllnlllkl +2-7 q: kkwsgndmdrmsvfqj +4-7 m: mmnmjfmm +2-5 s: flhkzzs +12-15 x: xxxxxlxxxxxmxxs +9-11 v: vvvvvhvkbndjvx +1-9 n: kpqgbxnkx +5-10 f: ffdfrpfffffwfffff +1-3 f: jsvqkff +5-7 j: jsjjjfxl +8-14 z: zzznrzzzzzqzzz +1-12 d: dzlbdzhgmrdddc +12-13 k: kkkkkkkkkkkbk +7-8 m: pmmmmmmmm +1-6 s: bsssssvslx +6-8 d: dddgdgrtbfdm +11-14 k: gkplwxkmskwmdpm +6-10 x: xxxxxkxxlr +4-10 l: lllxlllllklllll +1-2 t: ttstmpksrrp +10-12 s: ssssdsssshscs +10-12 z: zzzzzzzzpwjszzzz +2-4 r: grrrctkzmw +1-2 l: fspl +3-5 k: kkkkk +5-12 b: bcbbbbjbbbbb +8-9 c: ccccccctcc +3-8 p: pmplmhpp +6-7 b: bjhfsbbx +16-19 d: dddddddddwdvddddkdg +5-6 j: sjrzcj +5-8 f: mfdffdgf +1-3 q: qcqqq +9-10 s: sbsssssspm +2-4 f: dffl +3-4 n: nnnn +4-10 t: wttthjpdmtlthttgwtkt +9-10 d: jpxdmbnddddd +10-19 q: sqhswtjrpqbxwjqzfqmr +2-6 w: swwzvgwbww +1-2 m: cfmmsl +9-14 w: pwdbjwwhbnpwllm +4-5 q: qqqqqqqqk +8-15 m: mmkdmwzkrvlmpmnmmmmf +17-18 q: qqqqqqqqqqqqgqqqnvq +3-6 g: gkkngh +1-8 g: gghdzwkg +3-11 j: vxdspqtvkpj +5-7 q: qqtqgpmqdq +6-8 d: bdmddddvd +5-6 w: zwwwwwvwxfw +2-11 n: bnplrmpvbpn +7-14 k: kkktbkkkkkkkkk +3-11 b: fmkqvvbztnxzqvjc +3-6 q: sscqqq +4-7 c: cfrrdrzbjmvpk +6-9 w: pwrtzwrww +2-5 v: vvcvv +2-4 f: ffmf +8-10 k: kkkkkkkpkd +6-7 v: mvjvvvv +8-11 c: vccvcckccfk +7-8 b: bbbbbbbsr +2-3 x: xxxmvx +6-7 l: llbllwsl +8-10 r: rrrrrbrrgrrrrnrb +12-16 g: ggggggzsggmwgggv +18-19 p: pprppppppppppppppppp +3-6 s: ssssssss +2-6 x: lwxkdx +2-3 n: xgbnf +2-4 p: dzrk +2-4 h: hlhpjhh +4-5 b: bmnbb +1-7 z: zczvzczsxmxpzznp +2-9 l: nlwxdwlblzl +1-4 r: xbtcqrfkv +13-16 k: skkkkkkvkkjkxrkfqk +9-14 b: bbbfcbwfjbbcbg +1-13 r: frrrrrrrrrrrfr +1-4 w: hwwxwnvvt +2-6 l: zzhlrx +3-8 v: vmzvggqtslnlqrj +15-16 s: dhssknsjztzssssssss +2-6 q: qqqqqqqq +2-3 t: mkktlt +7-17 b: bbbbbbbbbbbbbbbbdb +11-17 s: sssssszfssxssssskj +2-7 h: hnhkhshhhhhhhh +2-15 x: xzxjxnxxpxxkzxxxxj +15-16 p: pmcmpclzphppxplp +8-9 k: kkkkkkkdpkks +2-4 r: vrwt +8-12 r: qrrrhhwjrrrhrrr +3-4 j: vjjzq +8-10 q: qqqqqqqqgs +6-7 j: zjjjjjjj +1-11 m: mdgkdkmqzmmsrhxxmmj +1-7 x: pxxxrbq +3-4 z: zrhkzz +4-5 s: ssqlss +5-8 f: vtrfffffff +7-13 j: jjjjjjdjjjjjtj +1-7 n: dnnfxwz +2-11 n: nzgnqncnnnjg +4-5 x: xxxxx +5-7 v: rhbvvvvhvxvpz +10-11 z: zlbbddzlzwzv +10-13 v: vvvvvvvvvvvvvv +3-4 s: ssrs +11-12 m: mmmcmmfdmmsmmmmnm +5-7 s: sdstsssssrs +1-3 w: bwzw +3-4 h: hphq +7-16 q: qqqfqqdwksqlfcqjxq +6-7 x: kndcxfv +10-11 m: mmmmmmmmmmm +1-4 n: fvsvnfhgwcgcnp +13-14 s: ssssssssrssswrss +5-9 x: xmvkxwgrxrtwxmrxhxx +3-5 q: jdbvvxvdg +3-15 w: zlzcksssjbwcvgp +16-19 x: bxxxxxxxxxxxxxxxxxx +3-5 z: rzzhz +4-10 f: hpttvbtjmq +3-6 n: wsngjn +4-5 p: ppphg +10-12 c: bqlccfctmchqbchhcg +9-10 z: zzzzdzzzzhzzvz +7-9 w: nwgwcvdcxqqwmzq +14-19 x: pxtxxlbrxdpvspwmxxx +2-8 t: ssktwbft +8-9 j: jjjjjgjsjzjj +7-9 v: vvvvvvdvlvvwv +4-6 x: qxxkssx +11-13 g: ggggggggkgvgg +8-9 t: tttttvttjttwt +2-8 b: pfbbcsbwbbbb +8-16 r: mkrcrtsrrrrbxmprftvx +9-10 k: hvwlqvktkkb +1-6 w: wsbwwvjwwrwh +10-19 f: nfftfffrdhjffjsnffd +13-16 h: hhzghvhhhfhhhhhhhhh +14-16 x: kskxbwrwrvjxfvfg +1-4 k: rflk +6-7 b: bbbbbbgb +4-17 v: vvvvvvvvvvvvvvvvv +12-13 s: sdstmsspfwsssscqf +9-11 z: zzwzvmrzzczzzz +4-8 s: skslmgsqtszbswsssscs +4-12 h: bdshxnpgvwhktdwgdp +3-5 t: tltst +4-5 h: hhhhh +9-11 w: wwwwwnwxxwwwwwww +6-7 n: dcnngffnnzn +1-3 l: clflll +6-7 x: xxxzxxgx +6-7 n: nnnnnkgnnnnnn +1-6 m: mmmmmmmm +5-7 t: tktttpt +4-8 v: zpcvqvzvrvgttntrbl +6-7 d: dddrddd +3-5 k: jskdkswqjfftgkfr +5-6 f: ffffgrffn +6-8 l: lwlkllgl +10-13 p: ppppkpppppppd +4-5 d: hbjdd +9-15 r: rrxrrrrrrrrrrrrrgr +4-5 b: bbbbtbx +8-11 b: brbbtlvvlbdbbbqjsb +6-8 g: zgzqgwmg +4-9 r: qstrmxrtr +5-8 m: mbmjmmmmmr +5-7 v: tvvzqvgrvqvmvncshv +17-18 g: fgggggggggggggggwr +2-12 t: nttpgcjtkdjt +6-10 k: kkkkklkkkk +2-7 q: qqqmtgqq +3-6 n: npccknvnn +5-16 k: rtlhkbtdkmmntdbl +2-3 b: wwkb +7-17 q: qqqqqqqqqqqqqqqqqq +1-4 g: ltgc +2-6 l: lxlnln +13-15 q: qqqqqqqqqqqqqqxq +3-4 j: jvjj +5-15 c: cpmzlhcckwlnhwmwgzw +3-8 b: qvblmmchbcc +5-8 b: fqhdwtcxb +4-15 k: kkvkkkcwgkkbkkdkkkkn +11-12 f: fnffffffffffffff +9-10 t: tttttttpfvt +4-10 f: nfffpftfffffffnf +2-4 m: scgxnm +7-8 z: zzzzzzxhbz +6-9 z: vznwkzzzz +3-5 k: hkcdn +3-10 k: kkskkkkkkz +2-3 p: pbdf +1-4 m: mdhmm +6-10 b: lfbbwdbbtv +8-10 g: gggggggggggg +2-3 t: qgthtztbwtppb +15-17 n: nnnnnnnnnnnnnnbnjn +8-17 v: vvvvvvgkvfvvzvvvpv +4-5 f: vwffff +8-15 w: wwbvwwwwdwwkzwwwwwwf +7-13 n: srmzrmnvcgshljkchp +5-15 q: dqjvfqvpwqnmpwqzh +1-2 h: hhfs +2-6 h: jhqwhh +3-4 t: tthg +2-4 b: sxsqrrxkjb +6-8 q: qqqqqqqqqq +6-7 c: rqcxcclxccwqcgwq +4-5 v: vvmfv +6-7 m: mmmcmmmm +2-4 j: bqfj +2-12 k: kkkkvkkkkskkkkkk +5-9 q: xjtqqrnnkdplrnqq +1-6 k: bqkrfpkcrwwkk +1-4 r: mrblr +12-18 s: ssssbfdlqbbssplswpsl +8-9 b: bhbhhbbkbzbnbcbh +3-7 t: tsdtthx +12-15 f: xcmghffxtgfffjf +12-16 n: bxnnhnhnnzfnnnwrtgl +7-9 q: qqqcqmnqdq +2-3 m: rpbjgkxqtmjrzm +11-12 s: hssssssssshc +3-5 x: xxldx +3-4 k: kkkxt +7-9 k: wlgkqndkz +5-7 l: llmtllv +2-6 v: svzvfv +5-6 d: djdddvddd +5-6 k: mhkkkkkwvkkcfk +3-4 c: rjcc +4-8 t: ttttzfttc +10-11 g: ggzggngbzgg +14-16 w: qzqwdwbcwwwmllndzlsm +2-4 z: zzpz +12-13 g: gwxpwcbsvwgtthn +1-4 b: bbbbmzc +5-7 f: cnxlfdffmt +3-4 z: znsdz +10-13 c: mrckljhmrcmnc +2-9 m: dxmdhndrwpmpgc +7-16 z: zzzzzzzzzzzzzzzzz +1-3 j: jjjjjjjjjjjjjjjj +15-18 g: mmglvtgzggzgnggggg +4-10 c: cccncccccz +1-8 n: mnnnnnntn +10-13 l: llllllltzhlvvld +2-3 r: gnnd +3-7 v: vcnfzzbd +6-7 p: pprpctdp +5-8 g: gggggqgggg +1-13 f: wfffdfpbfjlfhb +3-8 j: dmjjkqwj +4-10 j: vfjhnswwwtzlfvmcdn +2-4 v: bnjd +4-7 w: btwwlfwkwzmzhhlsvs +14-15 g: gggggggggggggpgg +10-11 w: zwwwwwwpwgrww +2-3 b: dbbcgwqfzlhwcbs +1-9 f: qfpfvffffffmfxbcpf +9-10 t: tttbpttttmttcnt +2-3 l: lgll +8-9 s: vzgvjsnns +6-8 w: wwwdwsbtswrww +13-14 h: dhhhxhdjnvhrhrflhh +7-8 d: dddddvjd +14-15 l: lllqlllllllllnlxlh +12-13 d: ddddzdjdddhhkdd +9-14 p: pvtplhjvpzdvqjqvh +9-10 r: rjrrrrrtrrrr +6-8 g: gjjgfwgg +9-14 j: jjjjjjtjcjjjjhjjj +8-9 q: phxjqqnqq +5-6 k: lkkkkk +14-15 x: xxxxxgwxxxxxxtwxq +1-4 x: xqfxx +1-8 m: mmgmnmvm +2-3 n: hnwr +14-15 z: zzzzzzzzzzzzssz +2-6 p: pspppp +1-6 z: zzxzzx +9-18 z: zzzzzzgzzzzzzzzzzgz +6-11 z: wzhtdzzfxjz +3-4 v: vzvv +16-19 q: qqqqqqqlqqqqqxqqqqq +2-4 v: vvhvvvv +2-9 p: lpxppwppppgppspb +11-12 m: mmmmmmmmmmndm +8-9 v: vvvpjvvvpvv +16-19 k: kkkkkkkkkkkkkkfkkkk +9-10 z: zxlzfzczzzczrdn +12-18 p: ppppppppppbjpplpphp +1-3 p: pvpppx +1-2 x: vxlx +10-12 l: lllnlllllwlll +4-5 b: bphwg +7-10 c: gcjjpprxxjcwvk +6-9 l: llwqklmpxlszgzlvl +9-15 s: fsxsscswksvrmsh +15-16 q: lqxqqwqpqwptqqmg +10-13 r: xmpmqrdjkrzkpzc +3-5 c: kcbcclt +17-18 f: jffffsffffffffffbsff +1-3 t: vqcqdmmgc +1-2 n: qnnn +16-18 n: nnjzhnznnnxlrmmnsn +13-19 q: srxlcdznhbfxqtsqtsqx +2-7 m: vmmmnjmmmmz +6-7 v: vlvmjvg +7-15 k: xnpkbtzwgntptwkgmxm +15-19 g: wggggggggggsggkggxg +8-17 h: hhhhhhhwhhhhhhhhhh +2-5 w: kwwwww +4-12 k: kkkqkkkkkkkqkkkkkkk +7-11 d: hddcndsgddgz +2-7 t: tdzxnth +1-7 z: lzzcrvz +5-10 h: shvchmxxdh +12-13 f: kffwgtfsssfqnvff +1-9 b: mbbbbtxbrbbc +4-12 r: rnfvrprrrrzrrr +2-6 p: qzltppwqljg +2-4 w: hwdxwmmqphfkhthczx +3-4 r: rrwj +3-4 b: lbbbpldfj +4-12 g: gggggggggggggkv +4-5 r: rrqjtrrr +4-8 n: nnnrfhnfn +4-11 h: lrnxkwkbhgnhh +1-8 l: lvjlhbffl +6-10 g: ggtgghghghpfgg +1-2 s: szsss +3-6 s: dszxsdsssskssbs +11-14 x: xxxncxxxxxxxxq +5-10 m: mtmmmmmmmdmm +1-3 r: qrgr +2-7 m: gmhmmtd +1-3 c: cccswmjcmnm +2-9 x: qbcdsxxlx +6-7 s: nsswzssv +1-14 m: trmlzmsmgqmmmnfdsmtm +5-7 d: cdddzdtdd +3-4 k: tvczkxvvrw +2-8 s: slvmswvs +10-16 p: pppppppppgpptpptpp +2-11 l: jqxsjlvpzkgzjdmt +4-7 t: ttmtpttp +4-11 r: twbrxccwcrtffpnv +6-8 k: kkckkkkqkk +10-12 v: vvvvvvvvvvvv +4-6 k: gqzkkk +3-4 r: rrmxr +12-13 p: npgppsppppqnw +1-16 x: mxxxxxxxxxxxxxxv +5-6 l: llllll +1-4 k: bkkckkkkk +10-11 v: vkvtvkjltmlvtxlnlrsj +3-11 h: mzhrhlhhhhhwl +5-6 p: pppppp +1-17 m: mmmmmmmmmmmmmzmjmmmm +2-6 v: cvvcvfbgcvvvcq +4-7 n: nnsnnwj +2-3 k: xvkxkksvb +16-17 x: xxtxxxxxxxxxxxxxr +1-13 w: lwwwwwwwwwwwxw +3-14 d: ddjdddbddddddtdddd +4-10 g: jrxggnqmjg +1-3 b: bbfbbbbb +4-5 d: pdhdm +5-7 d: mvdsdnd +17-19 m: mlmmmmmmmmhmmmmmmmm +4-6 g: gtlgxggggsgc +6-7 m: mzvmhglmmmpmmxf +10-14 j: jrjjjxcjjtjjjhpljl +9-15 w: wwwwlwwwwwwwwwjwwdw +1-3 g: wtzgjgr +5-7 m: dmmmtmm +1-8 g: ggkdgpggg +5-6 x: xnjhmx +1-7 b: bbbbbbbfbbbb +3-11 n: mnnnngnnnvnnqnnvn +2-3 l: jglgdrczl +12-14 f: tffpffsmfffffg +10-13 d: mndmdwdxjdxpd +9-10 m: mlmmmmmmzvxm +6-8 l: ptpjwltl +7-8 r: rrdrprlqrr +8-9 n: nnnnnnnrc +6-7 p: ppppphn +4-8 t: smtptgwtmlttw +4-10 j: jsjjjjjjjj +15-18 k: kkhwkkkkkkkkkkkkkk +1-2 s: sksxb +2-10 g: sggchblktg +8-12 r: rrrrrrrrbwrr +13-14 v: vvvvvvvvzvcvvvvv +3-4 p: kppp +4-14 m: mmmsmmmmmmmmmzm +5-6 n: kndmnnnnpnznjqb +3-10 d: xlddcdbdlddpqdkdl +17-18 n: tnmcvdcznnnfnznldt +6-11 g: wgbgzgggggg +16-18 z: zzzzzttzzzzzzzzkzq +11-13 x: pxxlgmtvbjrlb +2-13 p: bmphpwxpsmmthppprdk +14-16 r: rmrrrrrdmrrrrztrjr +1-5 x: xdxxx +1-3 d: dgdddfzddfd +1-9 m: ddfmgwfgf +7-11 x: xwnqqtxdmns +5-6 v: ffvvvv +3-15 g: dggggggzggggggb +10-13 p: pptpppkdpwcngppf +11-12 x: xxngxbxxdxxxxnzxbxx +3-4 n: nxqc +1-2 x: dvxxx +4-5 h: zhvhh +3-5 j: jqpjj +2-7 f: ffffffpfz +8-10 k: kkkkkkkkkk +5-12 x: xxtxxxxxxxxxxx +12-14 c: cccccccccccccc +8-9 s: vhlssssws +1-4 k: dqkk +4-10 r: rrbrrrrrrdrr +1-3 r: hqljfr +8-12 c: qcccccszgjgcccddccw +6-14 m: mmmmmxmmpmmqmcmmdm +5-6 r: mwrrdtm +1-5 t: rdjtts +6-14 c: gpcbczvfbcbcckblzc +5-6 w: wxwwww +3-4 p: rjppp +10-13 t: ttttttctdtgtttts +3-14 c: cvlcpqscwgzgxzxvkmh +3-7 h: kxqfwfddhllhj +10-18 r: mdqrrmrdxkkvxftrrr +13-14 m: cmmmcgmmmmhvmm +2-7 h: khvhhjhhjbv +5-9 r: rrrzgrrrlr +1-8 c: gccccccsccc +15-17 v: vvvvvvvvvvvvvvdvn +9-13 v: vbvdgpvjvhvhwxv +6-9 z: zzxbqznzqjzh +3-6 r: rrrrrrrrrrrrrrrrrrrr +3-4 x: nxxxxst +7-10 q: qqqqqqfqqf +9-10 j: jjbjdjqcqw +9-13 z: dhzzzzzzzzzwxkzzzzjk +3-9 q: pqxgqqcqqjql +10-11 h: ljhgjwhzdrhhhh +18-19 v: vvvvvvvvvvvvvvvvvvvv +10-11 l: vgxrhvtfblwl +2-3 v: rvvvvpj +8-9 c: smchcscccdmf +2-3 n: nqmnn +15-17 x: xxxxxxxxxxxxxxqxrxk +11-14 j: jjjjjjjjjjljjvj +7-9 z: zvzzmzjkfbvzzczczlzm +2-6 z: zzzjzjzzmfzk +9-11 m: mvcmmbmlzrmmz +6-7 r: rrrrrrr +3-6 c: jtcfscccvvf +2-5 s: cssbntxggkwvwnchn +8-10 x: xxsxjzxqxx +6-7 n: ndnnnbg +9-16 j: jgzxxsmljbhbttqjw +3-4 k: gjsk +9-10 q: qqcrqqqpqq +2-4 t: thtt +3-4 w: wrfxww +9-14 v: vvsvvkqgzvmvvvvvlvvv +9-15 m: mmmmkmxdmdmmhmmwjw +3-9 b: bbbbwcwbb +3-6 c: ctdccs +7-8 k: kkqrkkkk +5-7 l: llmllcqjljlh +5-7 w: wnzbwgw +15-17 f: fcffffffffffffffpf +1-2 t: tttft +1-7 n: zctqhnxvbn +3-8 z: hdpqzzzlzsw +3-15 l: llslllllllllllml +8-19 w: rwtbwrwjwtwxcclthdw +4-5 g: zggggg +5-14 v: vvvvhvvvvvvvmlvv +1-7 l: mlgxllpgl +2-12 b: mvwbfjcddqjb +1-3 m: qmzm +2-3 r: rrrrrffr +1-7 x: xxsgxxv +8-10 d: tdrrqdzcdddddxddl +2-4 n: crnnfdcnnnzn +3-4 n: nnnz +9-10 z: zzzzqfzzzzz +10-16 n: nnnhmnnznsnntnnc +9-16 s: vssssbsscssssssjss +9-13 w: wwkwwwqqwvwwww +4-5 d: hkdhwddtdkqwvl +3-4 l: llll +4-5 f: ffzffftld +7-9 d: ddddddddgd +6-7 t: ttthptttqxlfddstsq +5-16 c: clhwccvlnmttjqcc +4-5 k: pkkkk +7-11 m: xwmmmmchmmt +16-17 n: nnnnnnnnnnhnnnnrm +5-8 b: bbbbbbbbb +1-4 s: jsss +3-4 h: rhhhtjwfvdhz +9-10 r: rrrprlrwrrw +1-6 n: nnnnnkn +18-19 p: ppppppppppppppppppp +4-5 l: ljlrcl +3-7 m: mmmmmjmdmtm +12-13 b: bbbbbbbbbbbvf +6-11 g: hcghdwfpcqk +4-6 q: krpfvw +10-13 j: jsjkvjjjjjzjjfj +5-6 n: lcnnnnzndqkfnsq +2-4 j: nvdj +2-5 p: hppnpmpq +2-4 w: wnwbw +2-7 f: fwfxfmfszmcxf +6-8 d: dqrdbsnjds +1-3 f: ffffffmff +5-8 s: lnbwqnkxws +10-12 n: nnnnnnjnnnnnjcn +9-12 c: pccvnbccxrncrcclccc +14-18 s: ssssssssslsssstsssss +3-6 l: lldllczl +6-11 g: gggggwgggghg +11-12 h: chhhmjhzhqfh +5-6 n: qhnvcw +6-7 k: nckkkkmnkkkzkkk +6-8 d: wddgbdpdzdqxrwddjlz +1-3 h: qghp +3-5 j: mnjjjxjkgnrdzjbtdr +1-9 g: gfgcgggxgjggggggf +8-20 b: vptprmjbwwtnbhwjtnjb +7-8 j: jjjjjjjj +3-4 t: tqtt +5-10 f: fffzbxxszjjvjfhn +3-4 t: tttttttbtt +4-7 p: wjrgpnj +1-9 g: pgzllxgfg +14-15 c: cccccccccccccqm +11-12 b: btmcbzbnzcbbxr +5-6 h: hhhhhhh +1-6 s: nssmsssss +11-12 d: ddddddbddthfdddd +11-13 j: jtjjjjjjpjjjjwfjj +2-4 j: gjjj +3-9 v: vvgvvvvvrv +1-2 l: tqjjljxcsl +5-6 q: nqqqqr +12-16 h: hkhhhhhjhhhhqxhhhhhh +2-6 p: lpppkpbpzg +2-7 v: vzvvvvfv +13-16 g: ggggggggggggwggb +3-14 j: ghsjjcgmkwsdchlslpf +1-3 s: ssplw +7-8 x: xxxnxxxxxxx +3-4 h: zghhvtwtmlplvxxhsbf +4-5 g: sqgsnf +14-17 z: zzzzzzzzzzzzzwczc +1-2 z: cpzzzzk +16-17 s: ssssssssssfsqssss +3-9 j: jvjjfjdjjjjjh +1-6 v: vtvrvvj +4-8 c: clzcccccccf +4-5 d: dwldw +2-4 l: lwlrllllllll +6-11 s: zxgcsdxkrcns +14-17 r: vrhvhrprrfrsrrrrr +3-6 p: mrcztppnl +4-6 w: wwwwwwwwww +1-6 w: zwjccrqpwmnthz +2-7 t: mnjntdcq +1-5 b: bbjbbbbb +10-11 w: wwwwwtwwwwww +4-6 d: dddxdfd +2-4 f: fjfff +13-15 b: vbbbbbbbbbbbbbb +8-9 n: ncbnnnnnn +2-6 d: hdfphnnmbbdt +1-4 f: wffz +7-15 f: ffsffffffffffvzff +8-10 c: zchrckkcqcr +2-6 h: thvbvh diff --git a/2020/day2/pwcountcheck.pl b/2020/day2/pwcountcheck.pl new file mode 100644 index 0000000..636a5d0 --- /dev/null +++ b/2020/day2/pwcountcheck.pl @@ -0,0 +1,22 @@ +use strict; +use warnings; + +open my $fh, '<', "input" or die "no input present, $!"; + +my $valid = 0; + +while (my $line = <$fh>) { + chomp $line; + if ($line =~ m/(?'first'\d+)-(?'second'\d+) (?'char'\w): (?'rest'\w+)/) { + + my $first = $+{first}; + my $second = $+{second}; + + # https://www.effectiveperlprogramming.com/2010/12/count-the-number-of-things-in-a-string/ + my $count = () = $+{rest} =~ /$+{char}/g; + + $valid++ if $count >= $first and $count <= $second; + } +} + +print("$valid"); diff --git a/2020/day2/pwindexcheck.pl b/2020/day2/pwindexcheck.pl new file mode 100644 index 0000000..69a26b5 --- /dev/null +++ b/2020/day2/pwindexcheck.pl @@ -0,0 +1,19 @@ +use strict; +use warnings; + +open my $fh, '<', "input" or die "no input present, $!"; + +my $valid = 0; + +while (my $line = <$fh>) { + chomp $line; + if ($line =~ m/(?\d+)-(?\d+) (?\w): (?\w+)/) { + + my $first = substr( $+{rest}, $+{idx_1} - 1 , 1 ); + my $second = substr( $+{rest}, $+{idx_2} - 1 , 1 ); + + $valid++ if $first eq $+{char} xor $second eq $+{char}; + } +} + +print("$valid"); diff --git a/2020/day3/README.md b/2020/day3/README.md new file mode 100644 index 0000000..75737af --- /dev/null +++ b/2020/day3/README.md @@ -0,0 +1,11 @@ +# day 3 + +## first part + +32 places per row, right 3 and down 1 is + +``` +idx = (idx + 3) % 32 +``` + +per line but this will _probably_ change for the part 2. diff --git a/2020/day3/input b/2020/day3/input new file mode 100644 index 0000000..831458f --- /dev/null +++ b/2020/day3/input @@ -0,0 +1,323 @@ +.....#.........#...#..##....#.. +.#........#...#........#....... +......#......#..#...#....#.#..# +...#.#####.#.......##.#........ +...........#......#..#.....#... +#.#..#...#.#...#.##.....#.....# +....#..#....#...#.#...#.##..... +##...#..........##..######..... +.....#...#......#.............# +........##....#...##..#....#... +...#...#.........#.#..........# +..#.#.....##..........#........ +##.......................#..... +#..#...##...##.#.........##.... +.#....#.#####....#...#...#..... +#......#......###..#........#.# +.#....##..##.###.#.......#..... +.#..#.........##....#.#....#... +........#..................#... +.......#..#..#............#.... +........#...................##. +.#......#......#.####......#... +..###.#..#..#.........#........ +..#...........###..#.....#.##.. +...#.##.#....#................# +#.....#.............#.#........ +.#..............#.........#.... +##.................#..........# +.#..#....#.###....##..#..#...#. +##........#......##.....#....## +#......#..#........#......#.#.. +....#.##.#.............#...##.. +.#...#...#..#............##...# +.#..#...#..#..#....##..#.#.#... +#....#...##.#.#......#........# +#..#..#...#.#.....#..##.#...... +.....#..#.#..#.##.......#..###. +#......#......#...#............ +.....#......#......#..#.##..#.# +......#..##..#.....#....#...... +..#..#...#..#...#....###.#.#... +.................#..#.......... +......#...##..#.....#...##..... +..#...............#...#.#.....# +.#....#.##.##..#.........##.... +...###....##...#......#......## +....#...#.....#.........#..##.. +..###.........#..#..#...#...... +...##.....#.........#.......#.. +.....#.................#.#..... +.#.###.#..#...#..##....#....##. +....#.....##.........#.#....... +.#.#....#..#................#.. +..#.#......#......#........#... +#........#....#..#..#..#....#.# +#...........##..#....#..####... +.....#.......#.#...#.#....###.. +.......#....#.......#.......... +.............#.....#........... +#....#......#...#..##.#........ +....#.......#.#.......#....###. +.####.#...........#.#.#...#.#.. +#..##....##.#......#........... +...##...#.#.....#.....#........ +...#.............#.....#...#... +...#.....#..#.....##...###..#.# +....##..#..##..#..#...#.....#.. +........#...................##. +....#.......#.....#.......#.... +....##.........#.#............. +......#..#........#.#...#...... +.#..#...#...........#......#..# +.#....#.#........#............# +......#...................#...# +##...#.......................#. +........###.......#.......#..#. +...........##.............#.... +..##...#.....#....#......#....# +................###...##...#.#. +..#.#.....#....##...#..##...... +.....................#.#......# +.......#....##.#..#........##.. +.##....#......#....#.........#. +#............#.........#..#.#.. +....#...........#..#....#....## +.......#..#.....##.........#... +.##..........#.#.#....#..#..... +........#....##.##.#......#.... +....##..##......##.....#.###... +......##.#....##.#.#....#...... +..#..#..........#.....##.....## +#........#.##...#.#....#....### +........##............#........ +##.##..##.#..#...##............ +....#..#....#...........#....#. +..#.......#.#.......#...#...... +.#..........##.....#..#...#...# +.................##.#...#...##. +##.............#......#....#... +..........#.#....#............. +...##..#.#.....#.....#.#....... +...##...##.#......#.#...#...... +..#..#.....##..##..........##.. +......##........##.......#....# +....#..####..#...##........#... +#.......#....#.......##.......# +........#..........#.........#. +.....#....#.........#.#.#.....# +..##.....#....#....#..#......#. +....#..#.##...#..#.....#......# +........###.........#..###...#. +.....#.......#.....#.#.#....... +...##.....#....##.....#.#.#...# +#.##....#.##.....#.#.#........# +.##..#.......#...#.#.......#... +.#..........#.............#.... +.#...#...#......#..##.......... +.......................#.#....# +............###....#..##.#..#.. +...#.#......##....#..#......... +..#...#....#....#.#............ +..#.#..###...............##.... +.....##...#.....#........#..#.# +...........#......#..#...#.##.# +#...##......##...#..#...#..#... +..##....#............#......#.# +.#.#..#...#...#.#...#...##..##. +..#.#....#.......#.#.#.#.#.##.. +....###.##..#...##....#........ +.#...............#........#.... +...#..#........##...#.##....... +........#..#..#......##........ +##....#....#............#...... +#....#...#.###.#.###.......#... +...#.###.##....#.........#...## +..#......##.#.....#..#.......#. +##.............#..#..##....#.#. +#...#...##........#.#.......#.. +........#..#.....#.#..#..#.#... +#..##.........#.#.#.##...#....# +............#...#....#..#....#. +.....#.......#......##..#...... +.#.....................#......# +...................#....#.#.... +.....#....#.....##............. +#....##.#....##..#....##....#.. +....#..........#..........#.... +.....#.#...............#..##... +...#......###.......#..##...... +#.#.#....##..#......#.##.#..... +.#...###..#.....##.........#.#. +..#...#.............#....#..... +#..#.............#.....#.....#. +.#.........#.#...#..#....#...#. +#....#......#....#.#..........# +.........................#..... +...................#........... +#.#...#......#....#............ +.#..#........#...##....#....#.. +..#......#..#..........##...... +#.#....#....##....#.........#.. +...#.#.#.#..#....##..#....#..#. +..#..............#.....##...... +....#.........#...#.....#..#... +..#..................#.#....... +.....##.##........#.#....#..### +..#.#...#.....#..##..##.#.#.#.. +.....#......#............#..... +.#.......#....##............... +...#.................#.....#... +...#.#..#.#...##........#....## +..........##................... +#........#..........#.#........ +................#..##.##.#....# +....##..#.#.#...#...#....#.#.#. +..#.........#......##....#..... +.##.........#.....#.#.......... +...##...###...........#......## +..#........#......#.....##.#... +###.....#.#.#...#.......#....#. +..##...#....###..##.#.#..##.... +..###...##.......#.#..#....#..# +..#...............###....#..#.. +...........#....#.##..#........ +.#...#..#.#...##..#....#...#..# +..#............#......#.....#.. +.#...#...#.#...#.#............. +...####.........#....##....#.#. +.....##...#........#.#......#.. +...####...#.#..#.#.#.#......... +........#.##.#..#.......#...... +......##......#.........#.#.... +..#.#...#....#.....###.....##.. +#.#.##..........#...##..#..#.#. +.....#................#.#..#..# +.........#........#.....#..#..# +......#...........#...........# +..#........#.#.........#...##.. +.....####.....#....##.#........ +....#...#........#.......#...#. +...#..#....#.....##....###..... +........#..#..#.#.#............ +#..#......#..#....#....#.#.#..# +.........#...#......##......... +..#....#............#..#.....#. +#............#.#...#......#...# +..#..##...#........#.........## +.#...#....##...#.......#..##... +#..#.##......#........##...#... +...#..........#...#..#..#....#. +##..#........##..##...#..###.#. +............##...............#. +#......#...#....#.........#...# +................#..#.#......... +.....#...#...#...##.......#...# +..##.###...#...#.#..##.#.#...#. +#...##..........#....##.#.#.#.. +.#.........#..........#........ +.......#.#...............#..... +...#...#............#.......... +.........#..#..........#....... +.........#..#...#....#.##....#. +..#............#......#....#.## +...#...#.#........#......#..#.# +........#......##...##...#..#.# +.......###......#............#. +#.....#...##.#.#...#.......#.#. +..#......#..............##....# +..#............##.......#.#.#.# +...#.#.....#.#.#........####... +...#................#.......... +..#...#....#....#......#..#...# +.###......#..............#.#..# +......#......#..........##..#.. +...##.#...........#.#.....##.#. +.#...#......#..........#....... +....#...#....#..........#.#.... +..................##..#.....#.# +###.................#......##.. +.....#.....#............#.#..#. +.....#........#...#....#.#..... +#.#...#........................ +.#...#.......#..#.......#...... +.......#.#.....###.#...#.#..... +#...#.#...........##...#....... +.#.......#.....#..#..#....#.... +...#..##.....#..#..#.....#..... +...#................###......#. +#..#...##.###..#..##.......#... +.#.#.#........#.#.............# +#.......#..#.......#.....##...# +.#.#.#............#..#....#.#.. +...#.#.##.#......##.....#....## +#............###...#....#...... +.....#..#..#.#.........##.#.... +.#.##........#.#.#...#.......#. +..###..#..#.#...#.##...###..... +#............#.............#... +.#.##.....#..#.......#...#...#. +.#...#........###...####....... +.#.#..##..#.....#.#..#......... +....#.#.#............##..#...#. +###.##......#.#.....#.....#.... +.........#...##.....##....#.... +..#................#.........#. +#.......###..##..##............ +.....#...#.............#..#..#. +..........#...................# +....#....#...........#......... +.##.......##.##.........##..... +#......#.#....#....#...#.#.#... +..#.##..#.###.#.##....#..#..... +#....##.#...#.................. +.......#...#...........#...#... +....###.#...#..#............... +##.#.#..#.#......#.#......#...# +.............#.....#.##....#... +#.............###....#...#.##.# +#..#.##.............#.##...#... +.#.#......#.........#...#...... +.#.........#.#.#.....##.#.#.... +.................#........#.... +....##.#.#..#.........#........ +#...##......##....#.#..#......# +..........##...##..#......##... +..........#..#.#..##..#..#..... +..#..#.....##........#...#.#... +#..........#.#.#..............# +#..........##.....#.#...##....# +.....#...#..#..#...##.#.......# +.##.#...............#.#...#.... +..........#.....#......#....... +.....#.#......##...#.......#... +...........#.#...#.....#....#.# +.###.#........##....#.##...#... +#....#.##....#.###..##.#....... +##...........#..##.........#... +....#.##...#...#.....#.#..#.... +........#.#.#..#.#...........## +..........#.##...#....#......#. +.##.....#.#.....##.#.......#.#. +.#..#....#.#.....#.##.#....#..# +#.......#..#..........##....#.. +.#........#...#..#.#...#....#.. +#......##...#...##..#.#.......# +.#......#.##.#............##.#. +.#....#.....##..##..........#.. +..###..#..#...#...#.#.#..##.... +.#.#.##...#..#...........#....# +....#......#.......##...#.#.#.. +.......#..#...##..#.........#.. +....#..#.#.......##........#..# +........#.#....#.##..#.......#. +.....#.......#.#...#.#......... +........#...#....#.#....###..#. +......#..#.##..##..#...#.#..... +.#.#.....#.....#....#...#...#.. +...#..#...#..#......#..#.#..... +...##...#...........#..#......# +..#...#####..#.#.##....##...... +...........#......#.#..#....... +..#....##..#.##.......#.#.#..#. +..#..#........#...#.......#.... diff --git a/2020/day3/toboggan.pl b/2020/day3/toboggan.pl new file mode 100644 index 0000000..d424a83 --- /dev/null +++ b/2020/day3/toboggan.pl @@ -0,0 +1,30 @@ +use strict; +use warnings; +# use Smart::Comments; + +open my $fh, '<', "input" or die "no input present, $!"; + +my $right_m = 3; +my $toboggan = 0; + +my $trees = 0; + +while (my $line = <$fh>) { + chomp $line; + + ### $line + my $curr = substr($line, $toboggan, 1); + ### $curr + + if ($curr eq "#") { + $trees++; + } + + ### $toboggan + + $toboggan = ($toboggan + $right_m) % 31; + +} + +print($trees); + diff --git a/2020/day3/toboggans.pl b/2020/day3/toboggans.pl new file mode 100644 index 0000000..ebf7ae4 --- /dev/null +++ b/2020/day3/toboggans.pl @@ -0,0 +1,40 @@ +use strict; +use warnings; +# use Smart::Comments; +use DDP; + +open my $fh, '<', "input" or die "no input present, $!"; +chomp(my @forest = <$fh>); +close $fh; +my $len = scalar @forest; + +my @right_ms = qw/1 3 5 7 1/; +my @down_ms = qw/ 1 1 1 1 2/; +my $runs = $#right_ms; + +my $all_trees = 1; + +foreach my $run (0..$runs) { + + my $toboggan = 0; + my $trees = 0; + my $down_mov = $down_ms[$run]; + my $right_mov = $right_ms[$run]; + + for (my $line = 0; $line < $len; $line += $down_mov) { + my $curr = substr($forest[$line], $toboggan, 1); + if ($curr eq "#") { + $trees++; + } + $toboggan = ($toboggan + $right_mov) % 31; + } + $trees ||= 1; + $all_trees *= $trees; + ### this run is + ### $right_mov + ### $down_mov + ### got: $trees + ### so far: $all_trees +} + +print("$all_trees"); diff --git a/2020/day4/input b/2020/day4/input new file mode 100644 index 0000000..734e50b --- /dev/null +++ b/2020/day4/input @@ -0,0 +1,1000 @@ +pid:827837505 byr:1976 +hgt:187cm +iyr:2016 +hcl:#fffffd +eyr:2024 + +hgt:189cm byr:1987 pid:572028668 iyr:2014 hcl:#623a2f +eyr:2028 ecl:amb + +pid:#e9bf38 hcl:z iyr:2029 byr:2028 ecl:#18f71a hgt:174in eyr:2036 + +hcl:#cfa07d byr:1982 pid:573165334 ecl:gry eyr:2022 iyr:2012 hgt:180cm + +cid:151 hcl:#c0946f +ecl:brn hgt:66cm iyr:2013 pid:694421369 +byr:1980 eyr:2029 + +ecl:brn +pid:9337568136 eyr:2026 +hcl:#6b5442 +hgt:69cm iyr:2019 byr:2025 + +cid:66 hcl:#efcc98 pid:791118269 iyr:2013 +eyr:2020 ecl:grn hgt:183cm byr:1993 + +eyr:2022 +hgt:160cm iyr:2016 byr:1969 pid:767606888 ecl:gry hcl:#6b5442 + +hgt:157cm eyr:2026 ecl:oth hcl:#efcc98 byr:1938 iyr:2014 + +byr:1931 iyr:2015 +ecl:gry +hgt:76in +cid:227 hcl:#09592c eyr:2024 pid:276365391 + +ecl:gry hgt:170cm iyr:2014 cid:285 pid:870052514 +hcl:#866857 byr:1925 eyr:2025 + +eyr:2021 +byr:1960 pid:569950896 +iyr:2010 hgt:179cm hcl:#888785 cid:167 + +hgt:154in cid:194 +pid:8142023665 byr:2010 hcl:7d22ff ecl:utc iyr:2026 eyr:1976 + +ecl:blu eyr:2030 hgt:192cm +pid:363860866 iyr:2019 hcl:#ceb3a1 byr:1963 + +byr:1947 hgt:167cm hcl:#7d3b0c ecl:amb +cid:70 eyr:2022 iyr:2019 pid:756932371 + +hgt:185cm pid:871945454 +iyr:2020 +hcl:#866857 ecl:amb +byr:1989 cid:184 eyr:2030 + +byr:1935 pid:322117407 +hgt:153cm iyr:2011 +cid:244 eyr:2022 hcl:#efcc98 ecl:hzl + +ecl:blu hcl:#5e6c12 +eyr:2029 iyr:2011 hgt:191cm byr:1992 + +hcl:#7d3b0c eyr:2029 +hgt:163cm +pid:625292172 byr:1932 ecl:brn +iyr:2020 + +hgt:158cm +eyr:2030 iyr:2016 byr:1969 +cid:173 pid:092921211 hcl:#602927 ecl:grn + +hcl:#733820 +iyr:2016 eyr:2029 +ecl:hzl hgt:180cm pid:292904469 byr:1984 + +ecl:amb pid:901224456 hgt:190cm +iyr:2013 +hcl:#733820 +byr:1922 + +pid:262285164 iyr:2010 +byr:2018 eyr:2026 hcl:#602927 hgt:179cm ecl:gmt cid:349 + +byr:1956 eyr:2027 pid:351551997 hgt:71in cid:277 hcl:#cfa07d iyr:2010 ecl:grn + +eyr:2027 hcl:#602927 hgt:157cm ecl:gry +cid:128 byr:1953 +pid:231551549 iyr:2012 + +iyr:2011 pid:771266976 +cid:264 byr:1955 hcl:#b6652a +hgt:189cm ecl:blu +eyr:2030 + +eyr:2026 pid:698455242 +byr:1949 ecl:gry hgt:190cm +iyr:2013 hcl:#efcc98 cid:139 + +ecl:blu hgt:181cm byr:1977 iyr:2011 eyr:2022 +pid:454163967 hcl:#b6652a + +pid:534506872 hgt:155cm iyr:2012 +byr:1968 +cid:333 eyr:2024 hcl:#623a2f +ecl:amb + +hgt:162cm +iyr:2020 +hcl:#733820 eyr:2027 byr:1995 ecl:gry pid:084994685 + +iyr:2016 byr:1990 +ecl:amb pid:185689022 eyr:2025 +hgt:184cm hcl:#866857 + +byr:2016 hcl:z iyr:2022 hgt:166in +eyr:2040 + +byr:1943 hgt:152cm hcl:#cfa07d ecl:hzl iyr:2016 cid:300 pid:376088014 + +iyr:2020 eyr:2026 hcl:#602927 ecl:gry byr:1962 pid:453907789 hgt:172cm + +eyr:2023 hgt:185cm +hcl:#623a2f pid:963767258 byr:1977 +iyr:2019 ecl:oth + +hgt:159cm byr:1965 cid:349 ecl:blu pid:962908167 +iyr:2013 eyr:2024 +hcl:#fffffd + +eyr:2026 +pid:912822238 hgt:66in byr:1985 iyr:2018 hcl:#c0946f ecl:hzl + +hgt:167cm hcl:#ceb3a1 +byr:1990 eyr:2027 ecl:grn +iyr:2011 pid:642877667 + +hcl:#7d3b0c byr:1921 pid:976412756 hgt:192cm +iyr:2013 ecl:gry + +iyr:2030 pid:283599139 +eyr:2039 cid:203 +hcl:f943cb +hgt:111 + +hgt:190cm +iyr:2027 ecl:blu hcl:z +byr:2004 eyr:2039 +pid:734570034 + +hcl:#6b5442 hgt:191cm +ecl:oth byr:1989 pid:669414669 cid:196 iyr:2016 eyr:2023 + +ecl:brn eyr:2028 byr:1965 pid:630674502 hcl:#602927 iyr:2020 hgt:61in + +iyr:2016 eyr:2022 cid:225 +hcl:#733820 ecl:hzl hgt:166cm +byr:1934 +pid:232742206 + +ecl:amb hcl:#602927 eyr:2029 +pid:897535300 +hgt:189cm byr:1952 +iyr:2017 + +pid:853604345 +hgt:161cm cid:269 +hcl:#fffffd eyr:2030 iyr:2011 ecl:grn byr:1966 + +hgt:151cm hcl:#18171d eyr:2026 ecl:grn iyr:2016 pid:176cm +byr:2000 + +hcl:#341e13 +eyr:2022 +pid:536989527 cid:73 byr:1971 +ecl:hzl + +pid:739005658 hcl:#b6652a +eyr:2026 hgt:154cm ecl:hzl +iyr:2019 byr:1935 + +pid:373465835 ecl:oth byr:1932 cid:333 hgt:165cm +hcl:#b6652a eyr:2021 iyr:2014 + +byr:1967 pid:486658617 hcl:#18171d hgt:174cm +eyr:2021 iyr:2015 ecl:gry cid:53 + +eyr:2024 +cid:124 iyr:2017 hgt:152cm pid:095649305 hcl:#341e13 +byr:1920 ecl:oth + +hcl:#623a2f +byr:1951 pid:993284548 +cid:106 +hgt:186cm +ecl:amb iyr:2017 eyr:2029 + +cid:308 pid:080673934 +hgt:193cm +byr:1967 hcl:#623a2f iyr:2016 ecl:hzl +eyr:2021 + +iyr:2010 eyr:2024 byr:1946 hgt:156cm +cid:199 +ecl:blu hcl:#866857 + +ecl:blu byr:1955 eyr:2022 cid:95 pid:139391569 +iyr:2019 hgt:180cm +hcl:#efcc98 + +ecl:brn pid:579889368 +eyr:2023 hgt:158cm byr:1935 +iyr:2018 hcl:#cfa07d + +byr:1920 pid:90919899 hcl:#18171d +hgt:152cm +eyr:2029 ecl:oth iyr:2014 + +byr:1961 eyr:2024 +ecl:#d401e3 iyr:2011 hgt:172cm pid:919145070 +cid:100 +hcl:#efcc98 + +ecl:gry +hgt:168cm +hcl:#888785 byr:1942 pid:731032830 iyr:2014 +eyr:2028 + +hcl:#6b5442 pid:265747619 hgt:191cm +cid:217 +eyr:2028 +iyr:2019 ecl:amb +byr:1948 + +iyr:2011 ecl:brn +hgt:183cm hcl:#fffffd cid:258 byr:1983 +pid:835909246 + +byr:2030 +iyr:2024 ecl:#f66808 +hcl:fd548d cid:183 +pid:#fced33 +hgt:160in + +ecl:utc hgt:183in hcl:a92c31 pid:0394222041 +iyr:2008 +eyr:1976 byr:2020 + +pid:126195650 iyr:2019 hcl:#341e13 +ecl:blu +hgt:150cm +eyr:2025 +byr:1964 + +cid:71 iyr:2016 hgt:157 ecl:grt +hcl:#18171d pid:#1ab5ea eyr:2027 + +eyr:2026 hcl:#b5266f +byr:1971 +cid:269 hgt:192cm iyr:2012 +pid:736578840 ecl:amb + +pid:152109472 hcl:#ceb3a1 ecl:grn hgt:188cm eyr:2027 +byr:1923 + +hcl:#341e13 pid:535175953 hgt:63in eyr:2028 iyr:2015 byr:1999 ecl:gry + +hgt:183cm pid:611738968 byr:2001 +eyr:2020 hcl:#a97842 iyr:2014 +ecl:gry + +eyr:2038 ecl:gmt pid:113210210 iyr:2012 byr:2011 +hcl:z +hgt:157cm + +hgt:157cm +pid:699449127 +iyr:2014 ecl:gry byr:1980 hcl:#fffffd eyr:2029 + +iyr:2028 hcl:z pid:152cm +eyr:2039 +ecl:#4760fb hgt:177in +byr:2017 + +eyr:2026 hcl:#efcc98 +iyr:2020 hgt:180cm ecl:hzl pid:747449965 byr:2016 + +byr:1974 iyr:2019 +cid:89 eyr:2023 pid:421418405 +hcl:#fffffd hgt:192cm +ecl:gry + +hcl:26c2ef eyr:2029 cid:309 byr:1931 ecl:grn pid:#4eb099 iyr:2024 +hgt:174cm + +ecl:gry +hgt:183cm +cid:281 +eyr:2022 pid:050492569 +byr:1968 hcl:c88145 +iyr:2015 + +eyr:2028 +iyr:2014 pid:712984515 hgt:187cm cid:206 hcl:#866857 byr:1927 +ecl:brn + +byr:1936 hgt:61in ecl:oth iyr:2012 pid:447813841 +hcl:#c0946f +cid:126 eyr:2021 + +ecl:gry pid:791970272 +eyr:2020 +byr:1932 hcl:#623a2f hgt:161cm +iyr:2015 + +hcl:#c0946f +byr:1935 pid:721144576 eyr:2025 hgt:162cm +iyr:2017 ecl:oth + +byr:1959 +pid:551109135 +ecl:hzl hgt:68in +eyr:1977 hcl:#888785 +iyr:1955 cid:100 + +hgt:190in eyr:1993 pid:8358180772 iyr:1975 +ecl:oth +byr:2024 +hcl:3de172 + +eyr:2030 hgt:190cm hcl:#a40ef3 byr:1935 pid:484932501 +ecl:amb iyr:2016 + +iyr:2015 +byr:1964 +hgt:176cm +pid:819552732 hcl:#c0946f ecl:amb cid:263 +eyr:2024 + +hgt:65cm cid:59 eyr:2027 pid:074880819 ecl:utc iyr:2023 +byr:1954 hcl:#623a2f + +byr:1954 hgt:167cm iyr:2020 +eyr:2023 hcl:#602927 +pid:280295309 +ecl:hzl cid:168 + +hgt:168cm pid:311043701 iyr:2017 byr:1965 +ecl:hzl +eyr:2026 hcl:#fffffd + +hcl:#fffffd ecl:grn pid:672987232 iyr:2012 eyr:2022 hgt:66in + +iyr:2012 ecl:#6f4f9f +hgt:133 byr:1937 +eyr:1953 pid:7177768428 hcl:#602927 + +iyr:2010 +byr:1922 hcl:#c0946f +eyr:2029 ecl:gry +hgt:165cm +pid:893045052 + +iyr:2013 eyr:2028 hcl:#866857 pid:137143403 +ecl:brn hgt:170cm byr:1940 cid:194 + +hgt:161cm +eyr:2027 pid:3966920279 ecl:gry iyr:2015 byr:1997 hcl:#cfa07d + +ecl:amb +hgt:157cm byr:1971 +pid:562746894 cid:305 hcl:#0b0e1a eyr:2021 iyr:2016 + +hcl:8b821d hgt:157cm pid:187cm cid:298 eyr:1926 iyr:2019 +ecl:amb +byr:2030 + +hgt:155cm hcl:#341e13 byr:1924 pid:779847670 +ecl:hzl iyr:2015 +eyr:2024 + +pid:768590475 hcl:#a97842 iyr:2014 cid:128 eyr:2029 +ecl:oth hgt:164cm byr:1990 + +iyr:2019 hgt:181cm cid:342 +eyr:2020 ecl:gry byr:2001 +hcl:#623a2f +pid:473165431 + +byr:1928 eyr:2026 hcl:#42a9cb iyr:2010 +ecl:grn hgt:157cm pid:638074984 + +eyr:2028 +byr:1951 +pid:239781647 iyr:2020 hgt:156cm +ecl:hzl cid:215 hcl:#efcc98 + +pid:636605355 ecl:hzl +iyr:2017 cid:323 eyr:2025 +byr:1995 +hcl:#18171d hgt:187cm + +byr:1933 hcl:#866857 hgt:152cm ecl:oth iyr:2014 pid:900790914 eyr:2030 cid:267 + +ecl:brn byr:1999 eyr:2027 hcl:#623a2f iyr:2017 +pid:853165955 +hgt:152cm + +eyr:2030 pid:316704688 hcl:#c0946f ecl:brn iyr:2014 hgt:193cm + +iyr:2012 byr:1928 +hgt:154cm pid:570535769 hcl:#623a2f eyr:2026 ecl:hzl + +iyr:2016 cid:252 eyr:2030 hcl:#888785 +hgt:177cm ecl:grn byr:2002 pid:568715162 + +pid:570999226 iyr:2012 hgt:150cm +byr:2024 +ecl:brn hcl:z eyr:2029 + +pid:174002299 iyr:2019 hcl:#cfa07d ecl:brn byr:1927 +cid:77 hgt:159cm eyr:2027 + +ecl:#d16191 eyr:2022 pid:166cm hgt:165cm hcl:#18171d iyr:2015 + +pid:112585759 +hcl:#341e13 eyr:2025 byr:1962 hgt:164cm ecl:hzl iyr:2018 + +pid:478415905 eyr:2025 cid:315 +ecl:amb hgt:91 +iyr:2014 hcl:#cc9d80 +byr:1985 + +pid:561885837 hcl:#7d3b0c +hgt:169cm +byr:1921 iyr:2014 cid:178 +eyr:2022 ecl:gry + +ecl:#c87497 hcl:5321a2 eyr:2020 hgt:74in +pid:#7a62c6 iyr:1976 + +eyr:2037 +pid:858202391 hgt:162cm +ecl:grn byr:2003 +cid:278 +iyr:2010 hcl:cbf662 + +ecl:blu iyr:2012 hgt:183cm hcl:#623a2f pid:848200472 byr:1997 eyr:2027 + +byr:1942 +hgt:164cm +pid:464257339 +iyr:2016 +hcl:#7d3b0c ecl:gry + +iyr:2012 hcl:#ceb3a1 +hgt:193cm ecl:amb +pid:667987561 eyr:2024 byr:1960 + +hgt:187cm +pid:222340640 +iyr:2018 eyr:2022 +ecl:oth +byr:1957 +hcl:#336667 cid:83 + +eyr:2025 iyr:2015 hcl:#733820 +ecl:brn +pid:131195653 + +hgt:185cm eyr:2026 +ecl:amb byr:1998 pid:938587659 hcl:#733820 +iyr:2016 + +ecl:oth pid:300949722 +eyr:2028 iyr:2016 +byr:1933 +hgt:179cm +hcl:#cfa07d + +byr:1974 iyr:2019 +ecl:hzl hcl:#c0946f eyr:2024 pid:484547079 +cid:112 +hgt:185cm + +eyr:2022 iyr:2018 hcl:#fffffd pid:118568279 +hgt:153cm ecl:gry byr:1941 cid:341 + +iyr:2018 +eyr:2027 hcl:#888785 +byr:1970 hgt:165cm pid:773715893 +ecl:amb + +hcl:#623a2f hgt:156cm byr:1938 iyr:2012 pid:745046822 +ecl:amb +eyr:2030 + +iyr:2012 +pid:097961857 +eyr:2023 hgt:66in hcl:#fffffd byr:1962 ecl:utc + +byr:1943 hgt:150cm +iyr:2012 +pid:740693353 eyr:2023 +hcl:#18171d cid:101 ecl:blu + +iyr:2018 pid:183728523 byr:1924 hgt:154cm eyr:2030 +cid:167 ecl:blu hcl:#ceb3a1 + +hgt:69cm +eyr:2025 hcl:z ecl:brn byr:1982 pid:250782159 +iyr:2011 + +byr:1998 iyr:2018 hcl:#341e13 eyr:2022 hgt:157cm pid:497100444 cid:266 ecl:gry + +eyr:2027 iyr:2011 hcl:#6b5442 hgt:156cm pid:494073085 +byr:1998 +ecl:hzl + +byr:1947 hcl:#b6652a +iyr:2011 pid:228986686 eyr:2030 hgt:175cm cid:70 ecl:brn + +eyr:2026 hgt:159cm +byr:1946 pid:534291476 +iyr:2018 ecl:gry cid:225 +hcl:#18171d + +pid:439665905 +cid:311 ecl:amb iyr:2018 +eyr:2030 +hgt:186cm byr:1950 +hcl:#cfa07d + +pid:250175056 hcl:#efcc98 +byr:1981 cid:262 hgt:154cm ecl:gry iyr:2020 eyr:2027 + +pid:461335515 iyr:2014 hcl:#f1cf00 hgt:180cm ecl:amb eyr:2027 +byr:1956 + +iyr:2014 eyr:2030 cid:194 +pid:234623720 hcl:#733820 +hgt:164cm byr:1929 +ecl:blu + +byr:1992 +eyr:2024 hcl:#ef8161 cid:216 +ecl:brn hgt:177cm iyr:2018 +pid:101726770 + +hcl:#341e13 hgt:178cm iyr:2016 eyr:2029 byr:1945 pid:045325957 ecl:grn cid:99 + +ecl:gry +iyr:2012 +cid:52 hgt:168cm byr:1943 +hcl:#cfa07d +pid:899608935 eyr:2030 + +cid:241 +byr:1934 hgt:161cm eyr:2027 iyr:2011 hcl:#c0946f ecl:amb pid:346857644 + +iyr:2019 hgt:178cm +hcl:#c0946f byr:1957 +eyr:2026 +ecl:brn pid:222885240 + +ecl:blu +eyr:2021 cid:312 hcl:#733820 hgt:186cm iyr:2012 byr:1969 +pid:821704316 + +hcl:#6b5442 cid:159 +hgt:180cm +iyr:2018 +eyr:2028 +ecl:hzl byr:1966 +pid:#e0238e + +pid:622400994 eyr:2022 hcl:#5b6635 iyr:2012 byr:1980 +hgt:190cm ecl:oth + +byr:1976 ecl:gry eyr:2020 iyr:2020 hgt:171cm pid:219878671 hcl:#6b5442 + +hgt:163cm byr:1968 +pid:003521394 ecl:oth +iyr:2010 +cid:61 hcl:#888785 + +cid:115 pid:810722029 hgt:166cm byr:1955 +ecl:blu eyr:2030 iyr:2018 + +hgt:176cm +eyr:2025 +pid:617393532 hcl:#733820 byr:1975 iyr:2018 ecl:grn + +hcl:#733820 byr:1979 pid:838168666 +hgt:190cm ecl:oth cid:330 +eyr:2029 iyr:2018 + +eyr:1940 hgt:67cm iyr:2009 ecl:gry pid:#e76a62 byr:2020 hcl:z + +hgt:190cm ecl:brn pid:396113351 +byr:1956 iyr:2010 +hcl:#6b5442 eyr:2024 +cid:256 + +hcl:#efcc98 +hgt:178cm byr:1984 iyr:2013 pid:752620212 eyr:2021 ecl:gry + +iyr:2014 hcl:#a97842 +hgt:166cm ecl:blu eyr:2024 +byr:1935 +pid:836748873 + +cid:236 ecl:amb hgt:168cm iyr:2010 hcl:#602927 byr:1950 eyr:2026 pid:404810674 + +eyr:2030 ecl:grn +byr:1975 pid:064596263 hgt:193cm +iyr:2019 cid:71 hcl:#a97842 + +iyr:2014 +pid:298386733 hcl:#c0946f +hgt:180cm ecl:hzl cid:115 byr:1940 eyr:2023 + +iyr:1960 hgt:139 ecl:#9db7b8 byr:1980 pid:#ef597b cid:54 eyr:2028 hcl:fdcda3 + +iyr:2015 byr:1954 ecl:blu hgt:62in hcl:#ceb3a1 pid:253593755 eyr:2028 + +eyr:2025 ecl:blu pid:216388098 iyr:2017 byr:1968 hgt:151cm hcl:#602927 + +eyr:2022 hcl:#a97842 +pid:606979543 iyr:2013 ecl:grn cid:63 +hgt:186cm byr:1992 + +ecl:gry +hgt:168cm hcl:#18171d iyr:2017 pid:670898814 byr:1983 +eyr:2022 + +hgt:155cm ecl:grn iyr:2012 pid:837979074 eyr:2024 hcl:#888785 byr:1972 + +iyr:2015 pid:970743533 hcl:#866857 eyr:2027 +byr:1921 ecl:brn + +eyr:2022 +hgt:160cm +byr:1964 hcl:#efcc98 iyr:2019 ecl:oth pid:141923637 + +byr:2029 pid:3313111652 ecl:brn eyr:2034 +iyr:2013 hgt:193cm hcl:z + +pid:853890227 eyr:2029 +hcl:#efcc98 iyr:2021 byr:2003 ecl:#037c39 hgt:160cm + +iyr:1927 +byr:1992 +eyr:2030 +hcl:#efcc98 +ecl:amb hgt:152cm pid:436765906 + +iyr:2014 +hcl:#c0946f pid:207052381 +eyr:2024 ecl:hzl +hgt:177cm +byr:1923 + +ecl:blu +iyr:2014 +eyr:2025 hgt:165cm +hcl:#733820 pid:343011857 byr:1967 + +ecl:xry +eyr:2028 +iyr:2011 hgt:166in hcl:#c0946f +pid:805297331 +cid:167 byr:1926 + +byr:1947 +pid:468012954 eyr:2026 ecl:oth iyr:2018 hgt:170cm hcl:#b6652a + +hcl:#6b5442 ecl:brn +hgt:180cm cid:233 +pid:029789713 +byr:1920 iyr:2010 eyr:2024 + +iyr:2010 eyr:2027 +hgt:156cm +hcl:#c0946f +byr:1960 pid:312723130 ecl:hzl + +eyr:2023 byr:1959 iyr:2010 hgt:186cm pid:066768932 ecl:grn hcl:#602927 cid:310 + +eyr:2030 pid:460535178 hgt:171cm ecl:gry iyr:2020 byr:1934 hcl:#888785 + +hgt:64cm eyr:2021 byr:1995 cid:336 +ecl:gmt pid:926714223 iyr:2017 hcl:#18171d + +eyr:2022 iyr:2010 +ecl:grn pid:285994301 cid:215 +hgt:186cm byr:1978 + +hgt:63in hcl:#866857 +pid:386128445 iyr:2020 byr:1971 eyr:2021 ecl:gry + +hgt:183cm hcl:#733820 iyr:2015 +ecl:blu pid:216205626 eyr:2022 byr:1941 + +cid:150 ecl:amb pid:872515243 byr:1926 +eyr:1996 +hcl:#dedc39 hgt:67in iyr:2020 + +byr:1927 ecl:brn cid:153 iyr:2011 +pid:165190810 hcl:#fffffd +eyr:2028 hgt:64in + +pid:502603734 +byr:1966 iyr:2015 hgt:176cm cid:205 ecl:brn hcl:#fffffd eyr:2021 + +hcl:#18171d hgt:158cm byr:1943 iyr:2019 +pid:058840094 +eyr:2023 + +byr:1962 hcl:#b6652a ecl:grn +cid:297 +iyr:2010 pid:990422650 +hgt:154cm eyr:2020 + +eyr:1934 iyr:2011 +ecl:gry +hcl:z byr:2004 hgt:63cm pid:6173356201 + +pid:329432364 eyr:2029 +ecl:grn hcl:#18171d iyr:2013 +hgt:158cm byr:1960 + +hcl:#efcc98 iyr:2016 hgt:186cm cid:215 +pid:852781253 eyr:2027 ecl:blu byr:1937 + +hcl:#623a2f ecl:gry iyr:2020 byr:1972 hgt:182cm pid:073426952 eyr:2027 + +hcl:#3317b9 byr:1950 pid:304511418 hgt:177cm cid:124 eyr:2020 ecl:hzl iyr:2014 + +eyr:2029 +pid:034754507 byr:1936 +cid:265 ecl:#b50997 hgt:183cm +hcl:#623a2f iyr:1924 + +eyr:2024 byr:1927 cid:243 ecl:gry hcl:#6b5442 pid:714355627 hgt:160cm +iyr:2016 + +hgt:152cm +ecl:gry hcl:#a97842 +eyr:2029 byr:1952 +pid:555308923 iyr:2010 + +byr:2008 +pid:19681314 hgt:180in iyr:2030 ecl:gry cid:272 +eyr:2023 +hcl:#b6652a + +cid:234 +iyr:2014 byr:1940 ecl:hzl pid:042231105 hcl:#3bf69c hgt:172cm eyr:2029 + +hcl:#efcc98 pid:831567586 hgt:190cm iyr:2017 +byr:1966 eyr:2024 ecl:blu + +hcl:#341e13 ecl:blu +eyr:2022 cid:161 pid:197839646 iyr:2014 + +hcl:#cfa07d +byr:1957 +iyr:2019 hgt:181cm +pid:543775141 ecl:oth eyr:2021 + +hcl:z +pid:#596c41 eyr:2035 +byr:2008 iyr:1975 +ecl:#c66ee6 +hgt:150in + +ecl:grn +hcl:#7d3b0c iyr:2016 +pid:804255369 eyr:2028 byr:1983 hgt:69in cid:82 + +eyr:2022 +iyr:2013 hgt:191cm ecl:gry +hcl:#a97842 pid:186827268 byr:1969 + +pid:871672398 eyr:2026 byr:1946 ecl:oth +iyr:2015 +hcl:#866857 hgt:185cm + +byr:1973 +hgt:150cm +pid:905076707 +iyr:2017 +hcl:#2edf01 ecl:oth cid:221 eyr:2026 + +eyr:2024 ecl:grn pid:955444191 hcl:z iyr:2015 byr:2008 hgt:151cm + +byr:1958 hcl:#fffffd pid:218986541 cid:203 ecl:brn hgt:154cm +iyr:2014 +eyr:2026 + +hcl:#623a2f byr:1964 ecl:oth iyr:2010 pid:525843363 hgt:164cm eyr:2025 + +ecl:blu iyr:2013 hgt:193cm byr:1990 pid:612387132 hcl:#18171d cid:280 eyr:2028 + +ecl:oth eyr:2022 +pid:110447037 hgt:187cm byr:1967 hcl:#efcc98 + +byr:1930 +eyr:2026 hgt:159cm +iyr:2011 +ecl:hzl hcl:#6b5442 pid:923471212 + +cid:350 +eyr:2029 pid:823592758 iyr:2018 +ecl:grn byr:1972 hgt:167cm hcl:#18171d + +cid:76 eyr:2027 hcl:#6b5442 pid:099579798 byr:1930 +iyr:2020 +ecl:gry hgt:153cm + +byr:1957 ecl:brn +hcl:z iyr:2016 pid:352677969 hgt:189cm +eyr:2029 + +cid:143 eyr:2035 pid:602952079 +ecl:#9b73f0 hcl:#602927 +iyr:2022 byr:1975 +hgt:174cm + +byr:1971 pid:741305897 hgt:192cm +ecl:amb hcl:#888785 eyr:2028 iyr:2011 + +ecl:oth iyr:2016 +byr:1942 hgt:189cm hcl:#888785 eyr:2024 pid:054290182 + +hcl:#a97842 +byr:1945 +ecl:amb pid:370849304 +eyr:2028 +iyr:2016 hgt:168cm + +hgt:154cm iyr:2015 eyr:2030 byr:1952 ecl:hzl hcl:#341e13 pid:996518075 + +byr:1941 ecl:amb iyr:2014 +hcl:#fffffd pid:560990286 eyr:2022 hgt:173cm + +ecl:blu byr:1974 +hgt:150cm hcl:#ceb3a1 eyr:2020 iyr:2013 +pid:827415351 + +hcl:#623a2f eyr:2027 iyr:2011 pid:913199234 ecl:oth +byr:1990 hgt:178cm + +ecl:blu byr:1989 hcl:#b6652a +eyr:2026 pid:724881482 hgt:185cm iyr:2014 + +cid:115 pid:255002731 eyr:2025 ecl:amb +byr:1934 iyr:2020 hcl:#7d3b0c + +hgt:150cm byr:1969 ecl:blu iyr:2023 +hcl:#866857 pid:754288625 eyr:2029 + +iyr:2011 hcl:#7d3b0c ecl:hzl +byr:1930 +hgt:188cm +eyr:2023 +pid:256556076 cid:136 + +iyr:2025 byr:1978 +ecl:#fe30a9 hcl:#efcc98 eyr:2029 +pid:392032459 hgt:178cm + +eyr:2027 iyr:2017 hgt:160in +byr:1990 pid:131099122 hcl:#623a2f ecl:amb + +ecl:grn +byr:1978 +eyr:2029 hcl:#18171d +hgt:165cm pid:172369888 +cid:93 +iyr:2011 + +ecl:hzl +hcl:#733820 iyr:2010 eyr:2029 pid:127253449 +hgt:156cm +byr:1963 + +hcl:#6c8530 +iyr:2020 +byr:1929 eyr:2021 hgt:177cm ecl:oth pid:347925482 + +eyr:2037 iyr:2026 +pid:163cm +hgt:174in byr:2007 hcl:c1305f cid:134 +ecl:#0cf85c + +iyr:2011 pid:033811215 +hcl:#a97842 byr:2002 eyr:2021 hgt:186cm +ecl:brn + +hcl:#a97842 +iyr:2020 eyr:2029 byr:1972 pid:535511110 hgt:160cm ecl:oth + +ecl:grn cid:89 hgt:193cm pid:73793987 iyr:2021 eyr:2027 byr:1939 hcl:z + +hcl:#623a2f +hgt:182cm cid:154 +pid:873863966 iyr:2018 byr:1999 ecl:brn eyr:2031 + +iyr:2014 eyr:2029 +cid:71 hcl:#fffffd byr:1924 hgt:63in +ecl:gry pid:897972798 + +hgt:76cm +hcl:z eyr:1955 +iyr:2012 byr:2001 pid:9425090 ecl:hzl + +eyr:2021 +pid:501861442 +ecl:grn hcl:#d71ae9 +byr:1977 +hgt:167cm iyr:2015 + +iyr:2014 +hgt:170cm ecl:gry byr:1928 cid:314 hcl:#602927 eyr:2029 +pid:836710987 + +eyr:2027 hcl:#efcc98 ecl:amb iyr:2016 byr:1995 pid:603705616 hgt:179cm + +eyr:2030 hcl:#602927 cid:105 byr:1943 ecl:hzl +pid:381601507 +hgt:188cm iyr:2020 + +iyr:2011 +byr:1993 hcl:#c0946f pid:292649640 hgt:139 ecl:hzl cid:268 +eyr:1999 + +cid:339 byr:1928 +ecl:brn eyr:2022 hcl:#733820 hgt:191cm pid:282733347 iyr:2019 + +hgt:176cm +byr:1935 ecl:brn cid:252 eyr:2023 pid:105060622 iyr:2020 hcl:#18171d + +ecl:hzl eyr:2029 +hgt:193cm pid:770254253 +hcl:#efcc98 iyr:2020 byr:1926 + +pid:977785261 eyr:2022 iyr:2015 byr:1978 +hcl:#733820 hgt:172cm +ecl:brn + +byr:2021 +hgt:160in +ecl:gmt +eyr:2032 cid:345 pid:179cm +hcl:8f5c13 iyr:2029 + +iyr:2018 hgt:182cm ecl:gry +pid:897076789 eyr:2023 hcl:#866857 +byr:1980 + +hgt:88 eyr:2039 cid:99 byr:2007 hcl:a1bb42 ecl:#a2f6bb +pid:2264966188 +iyr:2022 + +iyr:2012 cid:59 ecl:gry eyr:2021 +byr:1931 +hgt:172cm hcl:#7d3b0c pid:862416147 + +byr:1962 eyr:2025 +ecl:grn +hcl:#866857 hgt:180cm iyr:2014 pid:313647071 + +eyr:2030 hgt:157cm byr:1985 +iyr:2020 +hcl:#7d3b0c pid:911544768 +ecl:grn + +hgt:175cm +byr:1938 +iyr:2020 ecl:amb hcl:#602927 eyr:2026 pid:144411560 + +iyr:2019 ecl:amb hcl:#888785 eyr:2025 hgt:187cm +pid:942054361 byr:1939 + +cid:168 pid:722146139 byr:1952 ecl:grn +iyr:2014 hgt:97 +hcl:z +eyr:2023 + +eyr:2024 pid:567528498 ecl:gry iyr:2012 byr:1990 +hcl:#733820 hgt:193cm +cid:293 + +hcl:#bc352c pid:321838059 byr:1930 hgt:178cm cid:213 eyr:2023 ecl:amb +iyr:2017 + +hgt:173cm byr:1925 pid:070222017 iyr:2013 hcl:#ceb3a1 ecl:gry eyr:2024 + diff --git a/2020/day4/passport.pl b/2020/day4/passport.pl new file mode 100644 index 0000000..26c6e32 --- /dev/null +++ b/2020/day4/passport.pl @@ -0,0 +1,68 @@ +use strict; +use warnings; +use Smart::Comments; +use DDP; + +my $batch; +{ + local $/; + open my $fh, '<', "input" or die "no input present, $!"; + $batch = <$fh>; +} + +my $valid = 0; + +# the file has to end with a empty line... +while ($batch =~ m/((?:[^\n][\n]?)+)/gm ) { + my $person_passport = $1; + my %passport; + + if ($person_passport =~ m/byr:(?\d{4})\s/) { + if ($+{byr} >= 1920 and $+{byr} <= 2002) { + $passport{"byr"} = $+{byr}; + } + } + + if ($person_passport =~ m/iyr:(?\d{4})\s/) { + if ($+{iyr} >= 2010 and $+{iyr} <= 2020) { + $passport{"iyr"} = $+{iyr}; + } + } + + if ($person_passport =~ m/eyr:(?\d{4})\s/) { + if ($+{eyr} >= 2020 and $+{eyr} <= 2030) { + $passport{"eyr"} = $+{eyr}; + } + } + + if ($person_passport =~ m/hgt:(?\d+)(?\w{2})\s/) { + if ($+{unit} eq "cm") { + if ($+{hgt} >= 150 and $+{hgt} <= 193) { + $passport{"hgt"} = "$+{hgt}" . $+{unit}; + } + } elsif ($+{unit} eq "in") { + if ($+{hgt} >= 59 and $+{hgt} <= 76) { + $passport{"hgt"} = "$+{hgt}" . $+{unit}; + } + } + } + + if ($person_passport =~ m/hcl:(?#[a-f0-9]{6})\s/) { + $passport{"hcl"} = $+{hcl}; + } + + if ($person_passport =~ m/ecl:(?amb|blu|brn|gry|grn|hzl|oth)\s/) { + $passport{"ecl"} = $+{ecl}; + } + + if ($person_passport =~ m/pid:(?[0-9]{9})\s/) { + $passport{"pid"} = $+{pid}; + } + + if (keys %passport == 7) { + $valid++; + $valids{$passport{"pid"}} = \%passport; + } +} + +print("$valid"); diff --git a/2020/day5/boarding.py b/2020/day5/boarding.py new file mode 100644 index 0000000..336cd63 --- /dev/null +++ b/2020/day5/boarding.py @@ -0,0 +1,52 @@ +import math + +seat_ids = list() + +with open("input", "r") as passes: + + for seat in passes: + front = 0 + back = 127 + + left = 0 + right = 7 + + for i in seat: + if i == "F": + back = math.floor((front + back) / 2) + elif i == "B": + front = math.ceil((front + back) / 2) + elif i == "L": + right = math.floor((right + left) / 2) + else: + left = math.ceil((right + left) / 2) + + assert front == back + assert left == right + + row = front + col = left + + seat_id = row * 8 + col + + seat_ids.append(seat_id) + +seat_ids.sort() + +# answer to the first part +print(seat_ids[-1]) + +# answer to the second part +lent = len(seat_ids) +left = 0 +right = lent - 1 +cursor = 0 + +while right - left > 1: + cursor = math.ceil((left + right) / 2) + if (seat_ids[left] - left) != (seat_ids[cursor] - cursor): + right = cursor + elif (seat_ids[right] - right) != (seat_ids[cursor] - cursor): + left = cursor + +print(seat_ids[cursor] + 1) diff --git a/2020/day5/input b/2020/day5/input new file mode 100644 index 0000000..6ef4cd6 --- /dev/null +++ b/2020/day5/input @@ -0,0 +1,824 @@ +FFBBBFBLRL +BFFFBFBRRR +BFFFBFBLRL +BFFBFBBLRR +BBFFBFFRLL +BFFFBFBRLR +FFFFBBBRLR +BBFFFBBRRR +BBFBFBBRRR +BFFBBBFLRR +FFBBFBBRLR +BBFFBFFLLL +BFFFBFBLLR +FBBFFBFLRR +FBBFBBFRRL +BFFBBBBRRR +BFBBBBFLLL +BFFBFBFLRR +FBBFFBFRRR +FFBFBFBLRL +BFFFFBFLRR +FBBFFFFLRR +BFFFBBBLLL +BFBFFFBRLL +FFBBBBBRLL +FFBBFFBLLR +FBFFBBFLRL +FFBFFBBRRL +BFBBBBFLLR +BFFFFBFRRL +BFFBFFFLLL +FBFFFBFLRL +FBBBFFFLLL +FFBFBBFRLR +FBBBFBFRRL +BFBBBFBLLL +FBFFFBFLRR +FBFBFFBLRR +BFFFFBFLRL +FBFBFFFRRL +FBBFBFBLRL +FBBFFBFLLL +FBFBBBBRRR +FBBBBBFLRR +FBBBFBBLLR +FFFBFBFRLL +FFFBBFFLRR +BFBBFFBRRL +FFBFBFBRRL +FBFBBBBLRR +BFFBBFFLLL +FFFBFBBRRL +BFBBFFFLRR +FBFBFBFLRL +BFBFFBFLLL +FBBBFBFRLR +FBBBFBFLLL +BFBFFFBLRR +BFFBFBFLRL +BFBBFFFRRR +FFFBFFFRLR +FFFBBBBRLL +FFBBBBBLLL +BFBBBFBRLL +FFFBBBFLLR +BBFFFFFRRL +FBFBBFFRLL +BFFBFBFRLR +FBFBBFFRRL +FBFBBFFLLL +FBFBBBBRLL +FBBFFBFLRL +BFFBFBBRRL +FBBFBFBRRL +FFFBBFBLRR +BFFBBBFRLL +FBFFFFFRRR +BFFFFBBLRR +FBBFFFBRRL +FBBBBBBRRR +FFFBBFFLLR +BBFBFFFRRL +BBFFFFBRRL +FBBBFBFLRL +FFBFBBFRRR +FFBBBFFLRL +BFFBFFFLRL +BFBFBFBRRR +BFBBFFBRLL +BFFFFBBLLR +FBBBFBBLRR +BFFBFFFLRR +BFFFBFBLLL +FBBBBBFRRR +BFFBFBFLLL +FBFFBFFRRL +BFBBFBBRRR +FBFFFBFRRL +BFBBBFBLLR +BFBBBBBRRR +FFFBFBFRRL +BFFFBFFLLL +BFFFFFFLRR +FFBBFFFRLL +BFFBFFFRRR +BBFFBBFLRL +FBFBBBBLLR +FFFBFFBLRL +FFBBBBBRLR +FBFFBFFRRR +BFBBFBBRLR +FBFBBBBLRL +BFBBFFFLLR +FBBBFBBLRL +BFFBBBFLLR +FFFBBBBRRR +BBFBFFFLRL +FBFBBFFLLR +BBFFFFBLRR +FFBBFFBRRR +FFBBBFBRLL +BFFFFBFLLL +BBFFBFBRLR +FBFBBFBRRL +FFFBBBFRRR +FBBBFBBRRL +FFFBFBBRRR +FBFFBBBRLL +FFBFBBBRLR +BFFFBBBRLL +FBBFBBBRLL +FBBBBBBLLR +FBFBBFBLRR +BFBFBFBLRL +FFFBFFBRLR +BFFFFFFRLL +BFFBFBBLRL +FBFFBFFLRR +FBFBBBBRLR +BBFFFBBLRL +FBBBFBBRRR +BBFBFBFRRR +FBFBFFFLRR +BBFBFFBLLL +FBBBFFFLLR +BFBFFBFRRL +BFBBBBFRLL +FFBFBFFLRL +FBBBBFBLRR +FBBBBFFLLR +FFBBFFBLLL +FBFFFBBRRR +FFBBBBFLLR +BFBFBFFRRL +FFBBBBBLRR +BFFFFFFRRL +BBFBFFFLRR +BFFBFBFRRL +BBFFBBBRRR +BBFFBFFLRL +FFFBFFBRRR +BFBFBBFRLR +BBFBFBBLRR +BFBBBBBRLL +FBBBFFBRRL +FBBBBBBRLL +FBBFBBFRLR +FBBFFFFRRL +BFBFFBFRRR +BFBBFFFLLL +FBFFBFFLLR +BFBBBFBLRR +BFFBBBBRLL +FBBBBBBLRR +FFBFFBFRRL +BBFFFBBRLL +FBFFFBBRLL +FFBBFFFLRL +BFBBBBFRRL +FFBFFBBRRR +BFFBBFBRLL +FFBFFFBLLR +FFBFFFFLLL +FBBBBBFLLR +FBFBFBBLLR +FBFBBFBRRR +BFBFFFFLRR +BFBBFFBRRR +FBFBFFFRRR +FFBFBBBRLL +BFBBBFBRRL +BFFBBBFLRL +BBFBFFFRLR +BBFBBFFLRR +FBBFFBBRRL +FBFBBBFLRL +FFBFBBFRRL +BFBFFBFLRL +BFFFBFFRLR +BBFBBFFRLR +FFBFBFBLLL +BFBFFBBRRR +BBFFBBBRRL +FBBBFBBLLL +FFFBFFFLRL +BBFFBFBLLL +BFBBFFFRLR +FBBBBFBLRL +BFBFBBBLRL +FFFBFBFRLR +FBFFFFBRRL +BFFBBFFLLR +FBFFFFFRRL +FBBFFBFRLR +FBBBFBBRLL +FBFFFFFLLR +BFBFBBBLLR +FFBBBBBRRR +BFFFBBFLLR +FBFBBFBLLL +FBBFFFFLLR +FBFFFFBLRL +FBBBFBBRLR +FBBFBBFLRR +FBBBBBBRRL +BBFBFBFLRL +FFBBBBFRRL +BFBBFBFLRL +BFFFFFFRRR +BBFBFBBLRL +BFBFFFFRLL +BBFFBFBRRR +BFBFFBBLLR +FBFBFFBRRL +FFBBFBFLLL +BFBFBBBRLR +FFBBFBFLRL +BBFFFFFRRR +FBFFFFFLRL +FFBFBFBRLL +BBFFFFFLRR +BBFFFBBRLR +FBFBBFBRLR +FBBBBBFLRL +FBBFFFBLRR +FFFBBFBLLL +BBFBFFBRLL +FFBFBFBLLR +BFBBFBBRRL +BFFBFFBLLL +BBFFBFFRLR +BBFFBBFLLR +BFFFFFBLRL +FBBFFFBLLL +FBFFFFBLLR +FBBFBFFRRL +BFBBBFFRRL +BBFFFBFLRL +FBFBFBFLLR +FBFFFBBRLR +BBFFBFBRLL +BBFFBFFRRL +BBFFBBFRLR +FBFFBFBRLL +BFBFBBFRRR +BFBBFBBLRL +FFBBFFBRLL +FBFFBFBRLR +BBFBFBBLLR +BFBBBFFRLL +FFBFFBFLLL +BFBFFBFRLR +BFFFBBFLRL +BFFFBBBLRL +BFBBBFFLLR +FBBFBBFRRR +BFFBFFBRRL +BFBFFBBRRL +BFBBFBFRLL +FBBFFBFRLL +FFBBBBFRLL +FBBBFFBRLL +BBFFBFBLRL +BBFFFFFLLL +BBFFFFBRRR +FBBBBFBRLR +BFFBFFBRRR +FFBFBFFRLL +FFFFBBFRRR +BBFBBFFLRL +FFFBBBFLRR +BFFBFBBLLL +BFBBFFFLRL +BFFBFFFRLL +BFBFFBBRLL +FFBBBBFLLL +BFFBFBBRRR +BFBBBBFRRR +FFBFFFFRLR +BFBFBFFRRR +BFBFBBBLRR +FBBBFFFLRR +FFBFFFBRRL +FBBFFFBRLR +FFFBFFBRLL +BFBBFFBLLR +FFBBFBBLRL +FFBFFFBRLR +BFBBFFFRLL +FBBFBBBLLL +FBBFFFFLLL +FFBFBBBRRR +FFFBBBFLRL +BBFFBBFLRR +FFFBFFFRLL +FFBBFBFRRR +FBFFBFBRRR +BFFBBFBLRL +FFFBBBFRLL +FBBBFFBRRR +FFBBBBFLRL +FFBFBBBRRL +FBFBFFBRRR +FBFFFBBLLL +FBBFFFFLRL +BFFFFBBRLR +BFBBBBBRLR +BBFFFBBRRL +BBFBFBFRLR +FBFFFFFLLL +FBFBBBBRRL +BFBFFFBLRL +FFFFBBBLLR +FFBBBFBRLR +FBBFFFFRRR +BBFBFFBLRL +BBFFFFBLRL +BFBFFBFLRR +FFFBBBBLRR +FBBBBBBLRL +FBBFFBFRRL +FBFFBBBRRL +FBFFBBFRRL +FFFBFBFLLR +BBFFFFFRLL +FFFBBBBLLR +BBFFBBBLRR +FBFBFFBLLR +BFBBFBBRLL +BFFFFFBRLR +FFFBFBBLRR +BFFBBBBLLL +BFFBBFBLLR +FBBBBBFRLR +BBFBFFBRLR +FBFFBFFLLL +FBBFBBBLLR +FFFFBBBRRL +FBBFBBFRLL +BFBFFFFRLR +FFFFBBBRLL +BFBBBFFLLL +BFBFBFFRLR +FBFBFFBRLL +FBBBFFFRLL +FBFBFFBRLR +FBBBBFFRLR +BBFBFFFRLL +BFFBBBBRLR +BFBFFFFRRL +FBBBFFFRRR +FFBFFBBRLR +FFBBBBFLRR +BBFBBFBRRL +BFFBFFBLLR +BBFBBFBRLL +FBFFBFBLLR +BBFBFBFLLR +FBFBFBBRLR +BBFBBFFRRL +BFBFFFBLLR +BFBFFBBLLL +FBFFBFBLRR +BFBBBBBLLL +BFFFBFFRRL +BFBBBFBRLR +BBFFFBFRLL +BFFBFFBRLL +BBFBBFFLLL +BFBBBBBLRR +FFFBFFBLLL +BBFFBBBRLL +FFFBBBBLRL +FFBBBFBLLR +FFBBFFBLRL +FFBBFFBLRR +FBBBBBBRLR +BFFFBBBLLR +FBBFBFBLRR +FBFBFBFRLR +FFBFBBBLRR +FFFFBBBLRL +FFFBBFFRLL +FFFBFFFLRR +BBFFFFBLLR +BFBFBFFLLL +FFBBBFFRLR +FBBFBFBRLL +FFBBBFBLLL +FBBFFFBLLR +BBFBFFBLRR +BFFFFBBLLL +FBBBFBFLLR +FFBBBFFLRR +BFFBBBFRRR +FFBFFFBLRR +FBBFFBBRLR +BFBBFBFLRR +FFFBBFFRRR +FFBFFFFRLL +FFFBFBFRRR +FFBFFFFRRR +FBBFBBBLRL +FFFBFBBRLR +FBBFFFBRLL +FFBFBFFRLR +FBBBBFFRRR +BFBFFBBLRR +FBFFBBBLRL +FBBFBBFLLR +BBFFFFFLRL +BFBBFBFRLR +BFFBFFBLRR +FFBFFFBRLL +FBFBFFBLLL +BFFFFFBLLL +FBFFBBFLLL +BFBFFBBRLR +FBFBBFBRLL +FFBBFBBRLL +BFFFBBBRLR +BFFFFFFLRL +BBFFFBBLLR +BFBFBBFLRL +FFBBBFFRRL +BBFFFBFLLL +BBFFBBBLLL +BBFFBFBLLR +FBFBBBFRLL +FFBBBBBRRL +FFBBBFFLLR +FFBFBBBLRL +BFFBFFBLRL +BFFFBFFRRR +BFBFFFBRRR +FFFBBBFRLR +FFBBFBBLLR +BFFFBBFLRR +FFBBBBFRRR +BFBFBBFLRR +FFFBBBBRRL +BFBFFBFRLL +FBFFBFFRLR +FBBFFFFRLR +BFBBBBBLRL +FFBBFBBLLL +FFBFBBFLLR +BFFBBBBLRL +BFBFFFFLRL +BBFFFBFRRL +FFBFFBBLRR +FBFBFBFRRR +BBFFFBFRLR +BFBBBFFLRR +BBFBFFBLLR +BBFBBFBLLR +FBFFFBFRLL +BFBFBBBLLL +FBBFBFFLRL +BFFFBBBLRR +BBFBFFBRRR +FBBFFFFRLL +BFFFBBBRRL +FBBFBBBRRR +FBBFFBFLLR +BFFFFFBRRL +FBFFFFBRLR +FBFBFBBRRR +FBFBFBFRLL +BFFBFFFRRL +FFFBBFFRRL +BFBFFFBRLR +FBBFBFFLRR +BFFFBFBRRL +FBFBBBFLLR +FBFBBBFRRR +FBFFBFBLRL +FFFFBBBRRR +FFBBBFFRRR +FFFBFBFLLL +BFBBFFBLRR +FBBFBFBRRR +BBFFBBFRRL +BBFFBFFRRR +BBFFBFFLRR +FBBFFBBLRR +BFBFFFFRRR +BFFBFBBRLR +BFFFBBFRLL +BFBFBBBRLL +BBFFFBBLRR +FFBBFBFLRR +FBFBBBFLLL +BBFFBBBLLR +FFBBFFFLRR +FBFFFBFRRR +BFBBFBBLLR +FFBBFBFRLR +BFBFFFFLLR +FBBBFBFRRR +BFBBFBFRRR +BFFBFBFRRR +FFBFBBBLLR +FBFBFFFRLR +FBBFBFBLLL +BFFBBFFRLL +FBBBBFBLLR +FFFBBBFLLL +BFBFBBFRLL +FFFBFBFLRR +FBBBBFBLLL +FFBBFBFRLL +BBFFBBFRRR +FFBFFBFRLL +FBFBFBBLLL +FBFFBBBLLR +FFFBFBBLRL +FFFBBFBRRR +FBFFBFFLRL +FBBFBFBLLR +BFBBBBFRLR +FBBFBFBRLR +FFFBFFBRRL +FBFBBFBLLR +BFFBFFFRLR +FFBFBFBLRR +BFBFBBBRRL +FBFFFFFLRR +FFFBBFFLLL +BFFFBBFRLR +FFBFFBFRLR +BBFFFFBRLR +BFFBFFBRLR +BFBFBFBRLR +FFBFFBBRLL +FBBBFFBLLL +BFBBBBBLLR +BFFFFBFRLL +FBBFFFBRRR +FFFFBBBLLL +FBFBFBBRRL +FBFFFFFRLR +FBFFBBFRRR +BFFBBFFLRL +BFBFBBBRRR +FBBFBFFRLR +BFFBBFBRRL +BFBBFBFRRL +FBFFFBBRRL +FBBFFBBLLL +FBFBFBBRLL +BFFFFBFRRR +FBBBFFBLLR +FBBFBBBLRR +FFBFBFFLLR +FBFFBFFRLL +FBBBFFBRLR +FBFFBBBLLL +FBFBFBFRRL +BBFBBFBLLL +FFBFBFFRRL +FBBBFFFRRL +FBFFBBFLRR +FBFBFFFLLR +BFFFFBBLRL +BFBFBFFLRL +FBFFFFBLLL +FBBBFFFLRL +BFFBBBBLLR +BFFBBBFLLL +BFFBBFBRRR +FBBBFBFRLL +BBFBFFFRRR +BFBBBFFRLR +FFBFBFBRRR +FBFFBBFRLL +FFFBBBBLLL +FBFFBFBRRL +BFFFFFBLLR +BFBFFFBLLL +FBFBBBBLLL +BFFBBFFRRL +BBFFBFBRRL +FBBFBFFRRR +BFBBFFBLLL +BFBFFBBLRL +BBFFFFFLLR +FFBFBBFRLL +FFBFFBFLLR +FBBFFBBLRL +BBFFFFBLLL +BFFFBFFLLR +FBFFFBFLLL +BBFBFBFLLL +FFBFFBBLRL +FBFFBBBRLR +BFFFFBBRRL +FFBBBBBLLR +FFBBFBFRRL +FFBFBBFLRL +FFBFBFFLRR +FFFBFFBLLR +BBFBFBBRLL +BFBBBBBRRL +FBFBBBFRLR +FBFBFFFRLL +BFFFFFFLLR +FBBBBFFLLL +FBBBFFBLRR +BFFFBFBLRR +FBBBFFFRLR +BFFFFFBRLL +FBBBBFBRRL +BFBBBFBLRL +FFBBFBBLRR +BFFBBFBLLL +BFBBFFFRRL +FBBBBFFRRL +BFFFBBFRRR +FFFBFFFRRR +FBFBBFBLRL +BFBBFFBLRL +BBFBBFBRLR +BBFBBFBLRL +FFBFBFFRRR +BBFFBBFLLL +FBBBFFBLRL +FBBFFBBRRR +BFFBFBFLLR +FBFBFBBLRR +BFFFBBBRRR +FBBFBFFLLL +FBFBBFFLRR +FFBBFFBRLR +FFBBBBBLRL +FFBBBFBRRL +BFBFBFBLRR +FBFFFFFRLL +BFBFBBFLLL +BBFBFBBRRL +FBFBFBFLLL +FFBFFBBLLR +FFFBFFFLLR +BFFFBFBRLL +FBBFFBBRLL +FBBFBFFLLR +BFFFFBFLLR +BFFFFFBLRR +BBFFFBFLRR +FBFBBFFRLR +BFBBFBFLLL +BFFBBBFRLR +BBFBFBBRLR +FFBBFBFLLR +BBFBFBFRRL +FBFBFBBLRL +FBFFFBBLRR +FBFBBFFRRR +BFFFFBFRLR +FBFFFBFLLR +FFBBBFFRLL +FBFBFFFLRL +BFFFBBFLLL +FFFBBFBRLL +FFBBBFFLLL +BFBBFBFLLR +FFBFBBFLLL +BFFBBBBRRL +BBFFBBBLRL +FBFFFFBLRR +BFBBFBBLRR +BFBBBFBRRR +BBFBFFFLLL +BFFBBFFRLR +BFFFBFFLRL +FBBBBFFRLL +FBFFBBFLLR +FBFBFFFLLL +BFFBBFFLRR +FFBBFBBRRL +BFBFBBFLLR +FFFBBFBLRL +FFBBFFFRRR +BBFFFBFRRR +FBBBBFFLRL +FFFBFBBLLL +FFFBBFFRLR +FBFFFBBLRL +BBFBFBFRLL +BBFFBBBRLR +FFFBBFBRLR +BBFBBFFRLL +BBFFFFFRLR +BFBFBFBLLL +BBFBFFFLLR +FBFFBFBLLL +BBFFFBBLLL +FBFFFFBRLL +BBFFFFBRLL +FFBFFFBRRR +BFFFFFFRLR +BBFFBBFRLL +BFBFFFBRRL +FFBBBBFRLR +FFBFFBFRRR +BBFBFBFLRR +FFBFFBFLRL +BFBFBFFLLR +FBBBBBFLLL +FFBFFFBLLL +FFBBBFBLRR +FFFFBBFRRL +FBFBBBFLRR +BFFBBFFRRR +FBFBBBFRRL +BFFFFFBRRR +BFBFBBFRRL +BFBFBFBRLL +BFBFFFFLLL +FBBBBBFRRL +BFBBBBFLRR +BBFBBFFRRR +BFFBFFFLLR +BFBBFBBLLL +FBFFFFBRRR +FBFFFBFRLR +BFFBFBBRLL +FFBBBFBRRR +FFBBFFFLLR +BBFBBFFLLR +BFBBFFBRLR +FFFBBFFLRL +BFFFFFFLLL +FFBBFFFRLR +BFFBFBFRLL +FFBFFBBLLL +BFFFBFFLRR +FFBFFFFLRR +FBBBBFBRLL +BFBFFBFLLR +FFBBFFBRRL +BFFBBFBLRR +FFBFFBFLRR +BFFBFBBLLR +FBBFBBFLLL +FBFFBBBLRR +BBFFBFFLLR +BFBBBFFRRR +FFFBFFFRRL +FBBFBBBRRL +FFFBFBBLLR +BFFFBFFRLL +BBFBFFBRRL +FFBFFFFRRL +FFBFBFBRLR +FBBFBFFRLL +FFFBBFBLLR +FFFBBBFRRL +FBBBBBFRLL +BFFFBBFRRL +BFBFBFBRRL +FBBBBFFLRR +FFFBBFBRRL +BFFBBFBRLR +BBFBFBBLLL +FFBFFFFLLR +FFBFFFFLRL +FFFFBBBLRR +BBFBBFBLRR +FBBBFBFLRR +FFFBFBBRLL +FBFFBBFRLR +FFBFBBFLRR +FFFBFBFLRL +FFFBBBBRLR +FBBFBBBRLR +FBFBFFBLRL +BFBBBBFLRL +BFFFFBBRRR +BFFBBBFRRL +BFFFFBBRLL +BFBFBFFLRR +BBFFBFBLRR +FBBFBBFLRL +FFFBFFFLLL +FBBBBFBRRR +FBFFFBBLLR +FBBFFBBLLR +FFBBFFFLLL +FFBFBFFLLL +FBFBFBFLRR +BBFFFBFLLR +BFFBBBBLRR +FBBFFFBLRL +FFFBFFBLRR +BFBFBFBLLR +FBFBBFFLRL +BFBFBFFRLL +FFBFBBBLLL +FBFFBBBRRR +FFBBFFFRRL +FFBBFBBRRR +FFBFFFBLRL +BFBBBFFLRL diff --git a/2020/day6/declaration.pl b/2020/day6/declaration.pl new file mode 100644 index 0000000..7c87461 --- /dev/null +++ b/2020/day6/declaration.pl @@ -0,0 +1,30 @@ +use strict; +use warnings; +use Smart::Comments; +use DDP; +use List::Util 'sum'; + +my $batch; +{ + local $/; + open my $fh, '<', "input" or die "no input present, $!"; + $batch = <$fh>; +} + +my $total_yes = 0; + +while ($batch =~ m/((?:[^\n][\n]?)+)/gm ) { + my $group_answers = $1; + chomp $group_answers; + + my %counts; + while ($group_answers =~ m/^(\w+)$/mg) { + my $person_answers = $1; + $counts{$_} = 1 for split(//, $person_answers); + } + # p %counts; + + $total_yes += sum values %counts +} + +print $total_yes; diff --git a/2020/day6/group_declaration.pl b/2020/day6/group_declaration.pl new file mode 100644 index 0000000..6370e2f --- /dev/null +++ b/2020/day6/group_declaration.pl @@ -0,0 +1,32 @@ +use strict; +use warnings; +use Smart::Comments; +use DDP; + +my $batch; +{ + local $/; + open my $fh, '<', "input" or die "no input present, $!"; + $batch = <$fh>; +} + +my $all_yeses = 0; + +while ($batch =~ m/((?:[^\n][\n]?)+)/gm ) { + my $group_answers = $1; + + # count the newlines = number of people + my $peeps = $1 =~ tr/\n//; + + chomp $group_answers; + + my %counts; + while ($group_answers =~ m/^(\w+)$/mg) { + my $person_answers = $1; + ++$counts{$_} for split(//, $person_answers); + } + + $all_yeses += scalar grep { $_ == $peeps } values %counts; +} + +print $all_yeses; diff --git a/2020/day6/input b/2020/day6/input new file mode 100644 index 0000000..6a9f009 --- /dev/null +++ b/2020/day6/input @@ -0,0 +1,2190 @@ +vmzodatscnrfek +epjkrabmiusofzclt + +qfvg +vnduc +mab +krxowtje + +jitvf +fbrl +guazkfqy +fehw +efosi + +n +ipsl +k + +wgzjxectsfbuqkyihpvrml +uzgtkwvicqymshjpbxeflr +kplwuvtcbhjqsyfgzexrim + +kuibxgzwpaqvlny +dblsifnutpkzyxqg +qpeijbyzgxmklnrc +ipkbgylznhqx +qlzpbigwynxk + +xyvdorhgskfczpl +qzaodbmxytiu + +fxdogrbqmu +xdqocgjbrm +rbdmoqcg +qemgdtorbhpz +mbklgqosdr + +bpgoqryv +ajlsknwmdufc + +smj +sjmh +mjs + +qvkxiesuczwm +gdncrjpaz +rtfdabhczg +dozycln + +fulhpr +hubwrp +wlhpqztu +jydgcpanuh +huwzp + +sncd +slydx + +a +la +a +a +a + +qtlcnozhbivwjrmsa +xzinjehdyslbtpkmfrowvuqac +whbocitrlnvjzgamqs +mclshazqiotbrwnjv + +mhndikourgvjplsa +dlmxwopuzenvyg + +l +l +l + +mgsocef +oecgfm +xiamjfecuvl + +cgjvewai +dcoxwzeaqgvi +svkwcmagieb +vclpufwgarhtnyei +azeigcvw + +pnfwujv +jvuwpg +mpknvwgtsju +uglwvspo +pudvweqb + +cjunkibsfzmgry +mchpuejwitb +xjacdmvioqbutl + +r +r +rkd + +vuwnpmytzojdh +gynrhmdozjtuwv + +pmugoknftl +qncisjodve +boyhwnm + +v +v +v + +awrd +acl +oiapejknusvh +zabfytl + +ouyvwh +huwo + +djweohkzratfqug +rukgaezdwhoqfjt +tzqhdyfokgjruwcea +rhqtauzkjoefwygd +gprwsfqzuaeodjhkmt + +lmrxedynzjhouaqpki +dnylahikjzomp +inlgykhmjptofza + +nhukeywbxpjg +kyxngujbeph +kesxijuhpqgnby +nbkjuyhxpezg +ehpxbnkzgujy + +xipcz +wcvap + +jczryhid +iehucld +dhci +ihldtogncq + +uevrf +qbvrpefa +rfev + +rws +qsji +spy +swrb +mzaoxdgvs + +aysor +zhlvaw +jekdmqbip + +wqtzsk +qkwtzs +qwstzk +qtkzws + +joph +dnhopiwkt +gomqhpv +zhqypso + +zplmswug +mklgjpsf +dmltrxgs +wlmgs + +finvhsdy +tjkinh + +hzteqfmdsarbng +qnszgbefmahdtr + +dihptjsucv +tupvsecjdh + +gcspdaqnlwmj +jqpagnmscelw +gneclwpamvjsq +njamswlgqpc +zqylsxpjwcnarmg + +pykcaoqfizng +fpqokzgni +nigzfopkq +fzungkqoip +nufgkzipoq + +pisnjflxcwqvrdko +fdazpbxermuh + +e +e +e +e +e + +mgtze +jgmz +gmz +vgmbz +gmjz + +tjg +uyprlxbzqi + +yicftxgpnsakoumbhejzlrw +swukeibgmflrjocayxzpnth +izpjolebrafgkytwnmsuxcvdh +taueopgncshzwfrjlbmyxki +ghousnkaxjczylpwbirfmet + +wqie +qe +pmrdgzco +yws + +rltvm +vrlmt + +smanxywjp +mipuxysawtj +xawomsjlpy +msyajxwp + +bmyjdokqvea +jmyqlbufvkare +aefuqmbnzojykv +qckgjyevpbam + +xkoengaq +gqxnoeak +oqaekxgn +akxnoqge +aenqoxkg + +gkszoexurnca +fdomckulz + +p +spu + +ixa +xai +iax +xai + +ujm +mj +mj + +fevxazmtcuy +mfguzyaetx +yaueifzmndt +huafmgytzec + +ugzi +kiuzg + +gjfrzisuyml +bmgedhzfwynir +fgrcxami + +ulaqyxjmes +hejkqlxp + +dwmes +edw +wde +iwgqdye +dew + +hcsolbi +boz +bo + +cjmuofeaxzbkv +bejcfxmouvzka +uavkemoyfjxzbc + +gyu +lyuhg + +s +nvdg +ju +jsb + +bxacvrgknlihpfudteoqmys +asryxlvneomqfuikpbcd +qyolmuxknsvarfpbzcide +dcyaspmzqerokvnlfxuib +kunsaxmbfoqiecyrpldv + +bskjodwgaqplftvzxncruyh +wyqdvutskafrnzxhbcgplj + +k +k +k +k +h + +dbv +b +b +bp +b + +htardyuoexn +eniadrhyu +eagnhpurdy +haygndure +ndehlsaburzkfywm + +d +d +d +d + +ztawekhv +khwazre +xdfwzsmkep + +wbq +wqb +wbvqc +qwb +wqb + +yqzctgrli +cqrtiglwz +gctzirkql +qigrzltco +qgitlbnrcz + +zrtvjqxyshowbfkecidnpmu +qujemalvbfytwpikozsnxrd + +svokapl +plsoakvm +qxhpavlos +pnaovsl + +tswmgeorcqudnfbijxyk +jmrfozxnyqwbictudks +bhsuwpoxtnkmirfycjaq +xobfyqcwijlrmutskn +tbjusyixfcrmhdoqpnkw + +xfmgwboyuqihv +rpifewmgcbduohty + +kp +pk +pk +pkfz +kp + +gaitb +mbavq + +cbevphgyoznqlrui +ovidcqreumpgnb +yqciomufrpgknveb +cuepbnvrsioxqtg + +trngydpvcquwlh +pbgotihdelkru +dalzhgmsrtkeupo + +htnq +et +tv +lt + +csfzparoyimutn +ytoinamcpsfr +pmsnfywcortaiv +qirmtoncspyfa +tnycmsfiordapu + +jtauexdnhkclpi +deinucbapqtljkx +ckeipjstluabndzx +knjpiadculewxbt +nlxtdeaiukjcp + +gezsvid +zivdegs +edsgizv +sevidgz +vszeidg + +gtpbmuyahd +fqtelauodx +azdtmsgkyu + +knys +vuir + +ywn +nyw +gynw + +dgz +cahdgz + +qhpavgeijfckozu +xzclkfgsbtu + +xphfmcniugqlwdbe +nwfqiezambylhxouvpc +nfqchsibumexpwrl +xbnehqjkgulmfwicpr +ftmbnlcwixeqhup + +uncjehvmps +ohjmcpu +cyfupmhij + +jmdtsfe +jetfd +jftde +edtjf +tfdje + +pqtrac +capltq + +scvlufnkadzj +txbygih +rempgqotw + +kf +kf + +apbdsw +fdluwhjcxesvi + +xgpcrtjydbkoa +aqpjiyuodt +oatydpuej +adpoymjzt +modhtpyja + +kigvcfjuyzbldtrwo +rtqvlkgyohiafbecpm + +vlcesthidg +yhetdvzcgl +civxtdghela +wivlcghted + +zemvtkbjg +ogizbjlvekcqatu +pxgktbzjevrnm +kjzbtvge + +mpyrclkes +fqobuzjvxtgi + +aeobkgs +emajsklgod +efkiapqycsog +oegakls + +dfhruzlm +mcuhdrzs +zdumgrh + +c +cj +c + +funok +nofukg +fbkmunho + +ejxvl +lehmvg +kwvlie +elkv +livqrde + +filvuoxy +lyixfovhu +viflexycu +hluvifyx + +vwprofci +ovfrcwpi + +dbsy +bsyd +sdyb +bysd + +brizpvscfmqletj +gnwyaxkuohd + +axbgortewjkdcn +cgdsnxbeavwhkrtj +adupxwcgkrzeibtjnm +cnbatrwjexgqkd + +soeq +cq + +klguybtdir +gkdtalriysub +rlutbkdiyvg +dgyrutbilk +gyblktviudr + +wkfmlsexbvqojpzr +gixblkseprvjqfmzwo +okpfmezjxvrslbwq +kfwxbvojmpszlqre +qorsvljkmezbpfwx + +knol +lkn +lkn +liwnkp + +jqceghowuid +uwaeiqdbjg +gqawxdejui +wiudegpjqv + +tfjocaivykunqrm +nyiqtacvjfkmu +tuaqfivcjykmn + +ixvecpwrsbfkqaozj +scbwftzaeyqumhvpdn + +sytdlcibnkqgfjuavxhwz +taxqbudsnhwgcfz +xudmatnbwcfpghzsoq + +ptielykb +byiwekl +blieyk + +auwxpqlifktnvdjczog +wvdkpfujaolxictz +zmrecfyiwsxdhjouabkv + +rmhdlqgwajy +gwylamhqrdj +hlgywrdmjaq + +tkmxv +itxhkgv +tvxkfwz +atxkhv +qxvtkau + +vaezqdxfbumylrg +tbdenuxmflzsvihoragqy +gdxmerzvalufyqb +ezxfdmlgabquvyr + +dvgfzkti +dizfkv +kjbahfvdiqn + +tdpkb +jtadq +tsbj +unevhcwlfrtog +tyzx + +wt +t + +ytuxlndcm +yutgdxlncm +nlxcdtmyu +dcmunylxet + +t +t +t +tr + +zpagqd +dqpgnzla +dgpqaz + +bwdzsuaogitrqpknj +sworntpqgkdujia +agiwurdpotknjsq +gwpdanqotijkurfs + +sp +ps +pjs +ps +sp + +owfixjnlu +owxinufjl +oaniuflwx +qfiulnoxwcg +onjfiwuxl + +bogejcmqwkz +qgcwmobk +zqmtkbocgw +owgcbqmkrp + +kui +niuw + +gskrcqufjaybtxiwpv +xgdmryvlpjsbiktcwafqu +rpkcnxysuwatfvbqgij +rpyqgfbexujcitkasovw +twvjfgqupskycibarx + +oxkzbnjtydic +lgzave +vrhsqwz +uvzafsl + +wvhn +inxwkvj +jnpfv +dvazmtcn + +fsvghzlanejckiyptuwo +lofwqkpiaegsvujnhmxdztb + +vdocn +vdcon +dovcn + +xftpok +pkoftx +pkftxo +pktxof + +hulqzd +ludhqaz +kuhlwqzd +dqhzul + +oavcie +ajsntbxry + +lfycorabtwqzi +rbwflaqoizmyt +atbifylqzoruw +fwlboztarqy +fltyopwnaqbdhzr + +zosualjhpwdxitknrgyemq +rgtailouxmnehsykwdjqz +ouskwmrgjxnzdaeyiqlht +jrzmihdsuneayqkglxwot + +dm +j +e +ej + +cbsjvmudeywt +mutdwcsjbvey +tuvdscybmjew + +tleckmrn +tnlscekm +hzcnmkltes + +xkqlsahnfvureowit +resufihltvxqnowak +uhtskfoxqrvnwaile +fuxyvntwsiqlkzreoah + +gvcwo +hpgyinve +lgxv + +zkrl +lvi +vilb + +ghtud +hgdut +utdgh +tghud +dhugt + +yx +gwyxuzlb +vxy + +fhcwtskbpa +kbwhpstcaf + +zqjm +jmz +zjm + +clwysmfkoxvjqhazupd +fyadtvouswqklpmxzch +kxzlpmhfqdcoyuawnsv +spaqvyokzclufhwdxmj + +fvpjlahmdgk +lujafdmhg + +uyki +uvk + +funtydwobxhjmapl +lsqdexyjmptgv +idltxszmkjpy + +gwidnshycjtka +bzdwlq +rmwedpuo + +ygvurmkxaw +vrmakgwyxu +wcmuxvayonrskg + +jnvtubeqwhxd +bfemdwl +fdiekwbl + +ulxjdiw +szc + +osxyfdljchivgtqua +ldsgitzjywavf + +i +g + +tk +kt +tk + +cnldkubrhoagfmwej +xiarjsqkfcmlnuhp + +g +q +e +e +e + +pxayhgoqv +oyqvgwa +yqvxgeiaom +vgyjnrlqsoad + +hfalndysgpqcbjtwkmzre +fakebsrlzwcjdpqgtmhyn +kpwzsjtyedlafncmbrqgh + +stcefhmkxydwv +wxhtomkdyfsprcev +hswqagvzkcmbtdjyef + +ms +m +jzm +m +m + +dhm +mghpd +dhym +mdyh +hmd + +cbxnyfijlvthdqo +ybqcdkxjpinh +wiphqnbjgcyxmd +bdhcxyenjiq +drbyqjcpxnih + +yjvg +habgzy +jgy +gyj +ygj + +vdmfwnszkjhobtre +gyfduoqihlcxar + +rbqounyt +yuqrnobt + +k +k + +ocjtaxknh +nqteajo + +mbexguhtnzq +sjuqedxflbpvzo +nywuzeqxcabik + +rdyhsljnabg +uzkqofaps + +bzsvylh +dzfywv +zyjvb + +avzxqltie +extbiqyzva +zivxaeqt +zqxetiva +iztveaxq + +xvz +nqca +khspzi +e +b + +m +z +z +m +ilnk + +kyl +ky +kya +ktlyin +yrske + +z +ry +y +r +r + +eqlkwoyxcsvhfdp +xhscvjwugyfmlab +ihfntwzslcryvx + +xvcegjr +yxcksge +jegxc +ecgxj +xfecg + +rlatcvg +tzcqfjvkxaoh +auteyvnipc + +emdvwukslifrgp +ifrgleawspdvuk +gsdcrvwiepukftl +vdfiprsglwkue + +sde +ew +s +kcmi + +ubcp +b +bih +fb + +rglwpmbhey +lbxwc + +jvhglanmwfcbeyuridkzpsoq +gvyunocmjqhdzlpwakeftsirb +yjahowdgivxzblekqnsucfmpr + +rpyxbztoadcl +tauh +at +tavg +sta + +idajwuk +akiuwdj +jyiwseaud + +vuqhyftonbges +qnhogtbeyafs +ysengbxqthfo + +ukcnqeomjdbw +ndxkywtmquo +hfaogsvrwlpdzim + +v +vt + +c +c + +ampurkeiqtycn +pbfdlwytasquizmckrjneg +teqickhuanvmrxpy + +qj +qj +bqj + +neswkv +vwsjkfen +spneawkvo +swkenv + +jmazyqxftgphuden +gnjhxbmdypafrqut +xmqupntayfdhjg + +azwqbhd +aquhbwye +wqab +lbqa +astrombcvq + +pzqaouvrtyjbwih +jptrhoyvqgxn + +uxseftzharjvncib +hrntbaxiczkusfejv +zbaxvnsfjcuither +xutaensvjhbizcfr + +eydbqwkxsczjrfmihnlpuga +syutawiqgnkjxclrmzdeph +jemwauzrsliknqxpghycd +cjnrvhusizxleqpkdgmyaw + +jcsuwtbivrpdzm +pdmcrwjzbivsu +cdmjsibpwfhuvrlqz +ebipvtjdsmrcuwz +rpwvmuiscbejdz + +crxuwedjbspizlf +tiryzsjlcnbmd +qrlcudwisjzb +rihjsoclzbdaf + +mekcbdihzg +ysqvcgzbwjrxak +obzmlgtkchfdn + +wpklreqngztdojsba +nkeopazqlbrdsgjt +nplgqsbdjkewarzot +qkcplisxonbjdhgferzavt + +fljxziya +kylijfo + +ido +qhd +rdqh + +wqxjvlgpfabszoidunceryhmt +zvsweftdrmyhcqjonxligkapbu +acjzlfsmdvixbqgetrpuhwyno +uornshfajyqcxzvmbigpwltde +ncwrdstvjpuoebihyzgxmlafq + +i +i + +w +iynw +w +w +dw + +ir +ir +ri + +rcqlpuoyh +yqrjapu +yraupq +qyupar + +uwxarmftshpj +umwtzjshre +bwjehtrmsu + +bzkuxwqy +kuwbqyzx + +mnrhlsvcbaq +qcrhxljasbn +hcduzaplsnotyrq +ashclqrn + +edxqbszjiyhongfklm +eilqxykjzhnbdgms +jlxmseihqzkndybg +knlyzhsbdimqxgje +mykglhqenizdjsbx + +dqxvzlbnyjetiwfo +esdbjtnqclfyphowaz + +zlmbhvi +hvbzi +zbvih +esaugpzbwivnh + +qfjgzbpthodilcm +jcmizkgdftpqoblh +rgjbiqamhlzofdtpc + +onayebrqpz +rqyebpzoan +onbyrqpeza + +lyrciegthpvfajzn +sgjkzuxoqbw + +ahibusqrotmndvezkpwy +mqnhywikxzoavdgprlfu + +qrcax +xracq +lxqdrcza + +kap +awr +adu +a +a + +hridasxejplzwvm +kutnoyqf + +htl +whtl +hlt + +enkqgxc +xqcegnk +kmxecqgn +exnkqgc +kxqgnce + +ncqublgdxpht +lszcxigoertjbaqmdn +oclbtgdnimxq + +uhcmyri +mr +mrd + +qjxnkbcprlm +pcqjsmkrlx +rclqfjkxaum + +cz +fcz + +yl +y +y +y +y + +onciyxtgbrlvhwfakdsum +qkcnozhegvmbajyixr + +ifjhxqgekcbd +jfhkuc +jcuhfk +hfcjk +chjkfo + +vdwfpzqtlkeixu +fwqidktuevxplz +kewvtdlixquzfp + +ntyvelizqfbxcmdgj +qnakiemyfrpshx +ernwxyoqmfi +xhafqyemniku + +smwqlhndtupokcriyxfegvjazb +oecdjyuhizxrnmbwatflvp +rfbaxzwcnvomeljdpytihu + +vjegptfqsowax +tdaczwbfvjqrsmyknliuxoh + +v +x +i +w +i + +sh +hp +h + +udzqvrcbafosknlpjihwtexg +vlbieudchtxjozrfpkwansgq +tjozawesdbqpkhnuixrcgfvl +gabtdlehijurnxczvwskoqpf + +rjyekxacdqfmgis +zjoqhpvmebdiu + +vdnsbauglczjrtiqow +ongavlsbtrczjuwqdi +soncjdutlgraibwvqz +btavciudrslgznwjoq +aczitldqwgsvbjnuro + +rhlvuwyadgpiscqf +yqsgpikfevlrh +hqyrszltpgfiv +gvhlqirfspy + +hecgmbaytsdf +rqjwahzx +pkuinhazovxwl + +rdjtxphaefwunkgsziv +nswdxriztjakpfeg +pkaxgiwdzhvfestnruj +hgitjdrkznpywasfex +awmkrctzgjldoneipfxs + +meyvhqusdpxrfboikwztagj +haeibuptyomjfqdwrvxsgk + +dagcsljo +xwpvs + +uqs +fs +sp +cpqsnu + +gyxksbqjfmnviopcetw +acvgqhblrewst + +pinxmhofarzqbkgd +bihpraxmgondfkq + +zxeqvpwnchbs +dqpvebgshoczn +hdvnkqcbzspwe +vhqcpzesab +vnqcbghzsep + +kqc +ucjwmk + +n +fwn +gne + +stekfuxoqjwzy +jfdmcxaltvsi + +c +dcs +c +c +hc + +audck +iukc +zkcuif + +wj +f +fr + +c +c +c +c +c + +lhgx +eivdlnaxhborg +xghl +xhglc +xlgh + +mqase +amnbqo +mlqa + +q +q +q +hq + +crqlexg +pjxbgryi +grxlq + +leoh +scohae +oeh +hero + +bzdke +dktze +zdek +kzevd +kdzet + +zsinhduclpj +slznhjvupicw +uchnjizfspl +pnlhrzugjsekciy +jnfscphuzil + +vthmsnuxpwycladirgokz +psnhcoxykrgzumidwvalt +otunzwpymgvlhisdrcxka +yuoxlcsadznwihktmgvpr + +uyidejc +fueaijdpcyb + +nwczduye +ncwudzye +unzdewcy +hydznwcuge + +cyiprjdkln +poey +hypabt +gpsomy +fphy + +gypwus +jrsmqf +awkv +ctihxodn + +n +qen +n + +rn +sq +z + +cvuzahfgy +cnfyazbxe + +ygznbrfaxdmiovujsl +zyogvxrbmjdainluf +lfgdjxozuyarvimbn +yfjgnlmvurziaxbod +odbqumjvnafgrxiylz + +vmkxe +vefdtxk +eqvckoxy +exlkv + +ubvpqaire +rhvjugpem +wkcfeyxuznsv + +elipaymtoxjrcq +clukfmnreihzqtobsy + +nt +nt +tvnx + +azebispg +ziaybsgde +guzeblnishka +axosibgzjfec +ewztgasmib + +pm +pm + +ahmcfneqypg +mnhgkapyef +yenhpbdalfgmju + +xorshpayckgmjlqbvd +ficvhyxogzarjqdspklmb + +z +m +ulyhw + +rcpvaoeg +vpzidxojarbe +egzblrpaov +wrqkoympauh + +bqf +yhqsb +pbqw +bpq +bfqu + +afxblgjyrudnmvekqh +nxhbjcpidfsal +gjnbtdwzyxlfrhak + +mhbocqir +hmibocqr +oqrmhibc +oricqmhb +qombchir + +ky +yk +hyk +yk + +niogxwzmjbvufs +fxnujgwaoivm +kgsueanxotfvijw +lrgfxuocvihpjwnq +vjkafxgiuyndotw + +anfizhcmgoe +keicrfnzvmhoa +czvfmhianeo + +trovy +ugzybvinq +jpvfey + +htek +dncuk + +ueqjpgkn +tidywmxzcnr +osan +onjb + +ofwsujk +kwiq +wkb +qwk +kwebi + +orpui +proiu +uoipr + +trkigzfwaodmeqybu +sayuogrzbwdefkitmq +dzrqgoeyifuawmtsbk +dwfpeybktuomizargq + +tqo +tq +qt +qt + +sjtuezvbin +evzsnutijb +ieujnbtvzs +tuzvensjbi + +ervjluczbfwk +rlbvfkocuwzej +frluvwkejzcb +cjzkflruwvetb +xzlvfgukjwbhrscnde + +lrfe +irlf +wfrl +ulfir +rfl + +yadwotpf + +qtkljhmpfwnsdzvubaye +zoyekplhdbwunmvjqsa +whklqjndsmyvbauczpe +wjeyzcbhuanplsqrkdmv + +ismaohz +nozehyvwg + +sfabkpigc +plcgk + +hmuqgc +ucksg +cgum +fcug +gmchu + +yisfpmvdjunwzeghq +phfeqnxjszmvdgwiu +wgejshvzpqymidfun + +dirlfjqzvx +vxrqjtfznd +qwojxszdrfvp +qdxzvrlfj +rxzqfvdj + +sbkupemaqojhz +beuamjhokqzsp +eopqubmskzjah +pyhvjabuzkemscoq + +pmgsxjzbcvdhetiun +fvopxtuhydsjzgencbi +nvzxajpgcihutsdbe +egxiczqusbdhjnktrpv + +osbjan +n +rmn +nz + +eskfqymcnxa +ibusymlt +yljmpsvz +ybmds + +vrluacpomgdkitefzyb +gexfpiyzaruvloktm +frtmeakylvuogpcziq +avsfeikgohzyutrmlpj + +fhojbavzqmxilgyt +yqbhadmopgxvrljti + +w +kcvwe +g +suzj +b + +qwj +j +je + +lxauzr +dxblctarf + +txfuwvimnc +rhegosdzpk + +ruonip +nvaiw +bneiq +rikzn +zqni + +myzfxcw +xfyczmw +cfmyxozw +fzxcwmy +zfcywmx + +jzcd +jcd + +sk +sk +ks + +pkgwmcqisxoh +knrwcpxishmtgoyj + +uigypkbmcqaxen +drjcofvswhlzt + +kijsex +jpdaut +juczf + +trsneafvcgwxzkbp +xpscqrhtfeywlg + +qjrtgakfxpdbvey +vixbeopgmsurwykfa + +iylbjpzqdgmewus +dlbmruyipsejzg + +vmdpynczjs +cpjuvdnyzsam +vypjdcnmsz +dncypzvmswj +edmynczsjvp + +isafzcqtvrdywkhojxpmgube +wqbhkvpdnjgxzulferit + +hcnodru +klizonvbdh +sndmhaxyo +ngjfpohd +djpshuno + +hvjsbf +mqdvs +nmlvxf +tcvkguweoziayrp + +ykdnuqhoavrzefw +nisabfeokzhwvgqryu +nyahvqfruzkwoe + +u +u +u +u + +urpk +clfbgy + +kcvjspimowhxzqt +fvkarmpwiqsxzbc +qkswczxivpylgdm +pqezykcvimxsw +ioyqclvkuwxhpmzs + +vebntwira +ejwpifavm +yqzhascoweuvil +wpiegfmtajv + +rqajtfoyighbulvwcenx +xwovyidkzpljmngcers + +frimhksougxjq +stfjkqoigrnxhlmu +jucrqonfihxkg +rkfouqihgapjezdbx +yrwjoxvqusghkcimf + +hrnt +rntd +dtnr + +a +nceproam +ka + +z +zo +z +z +z + +wh +jb + +rnjewh +rhjew +hrjwe +rjhwe +jhwre + +fnyplqztgaiskmcox +xnckyoqmigzf +gnymkocqizxf +gxzmnfiqkcyo +xcyhfnozqmikg + +ckafxul +fujakg +dkwtuafp +ufcakvj + +jochwluqemtnxydbikasgfprvz +xnwkerzpibgthmvajqydfcluos + +spe +kv + +kr +c +c +c + +ohfrjpcqniblv +njbflvhiocqrp +nqbifhvjclrpo + +mgjcfpktz +jpfgktmc +cpfgjkmt +mkjfgpctu + +vjcyr +rsmv +vcyrk +vrj + +nqsvlgr +tlgnrsb + +jhi +kjih +jhi + +pthfdwzagysjerux +keulitwrbnxfpah + +rsqjn +sfqeurtn +qnrs +qsnr +snqr + +mfjhwyrxzgcbed +dzgewjcyqmbrnfhx +zxyrjfecbgwdhm + +npew +eznr +neli +ngfe +nke + +ljmbfe +jmflbe +ebmflj +fjbmle +bjefml + +hvql +kdpthm +oeiuyhsfan + +wohrc +hz +glxqb +rkpd + +aivbqfdghlk +zvlidkqbafg +qflagivzdkb +akqtvecldgbmfi + +lpgdm +pgmd +pfcmg + +aodivlrsneqxbpz +furbcxiqdgysnlao + +g +g +g +g + +aglritbeompn +rmcianbe +crmanbei + +hds +sdh +shd +dsh + +optduxeybrfgs +ufxhyqeodspztgw +pdgkxemulicfstn +dtuxjfeahpvgs + +sdyljvnmrf +vknwydlrm +upmtelixygradozcvqh +bmyslrvd + +xnhbglkwe +mysaxfckbqi +wbhkzpxv +ktjnduoxbrv + +ixgtsb +ajizbgvt +ktbxlgcip + +gt +tg +tg +txg +tg + +woy +wop + +qglnhukax +ohluktegqan + +nrwfazobyievthjpdgklx +pceqaghbty +tuyqgbmahcpse + +afpyvbxkedmwj +emwnxjipdfkvy +vbyekdxfwapmj + +cinaloh +hlonic +ilnhsco +colhin +lncihso + +ugxdniwa +dnwubgaix + +bxopkm +xkob +obkx +bkox +xokb + +lqcrsnvijt +ylrekmaiq +dlohriuwfxpzbg + +dmcilpebrxnkagzqtswhvf +gxrahicelqdfskynzptmbw +criamhnkxolpzsqdbwfgte +rpkfnvhclmqdbixzweastg + +t +r +d +r +j + +xptge +gpxet +gxtpej +xctgzyeup +eproxtg + +iodwuh +uwdnoih +ouhwid +hwuodi + +lzgpeimjysnhafudtbv +zktnlrfjxgmybcwosve + +bqk +xlfjopzwc +by +dvi + +chj +jch +hacjqtnx + +fgiqkwbe +gfbzw +cnauygpjrvdxsm + +o +o +ro +o +o + +cy +c +tc +ecy + +ewfqylsaun +tgdrpibxzkoj + +reagywmqpoltx +mcefsvzrbgx +xgemrfkb +hgexrmui + +zwgnfqsblcm +mqbzylegfns + +k +o +h + +ics +ics + +ufanbvkotzlmegchdiw +ufdkaoyczigbelnqmh +nmhekbuzlpcqfioagd +inmcgldboekafzuh +ogzfkuencqhibldma + +tevp +tlevp +eptv + +wjxurkon +qxjrdnokw +jxkwnrto + +zuibqrjvkteapdo +oapeizjrdlu +edupjihorz +pidnecurzoj +jeuidrzshpok + +jdo +dj + +x +x +x + +cbikoyuwlvnhe +kbuheoclyivnw +ickhnlovuwyeb +ehkbwocvyiuln +cenhibokulwyv + +caumpvyok +uogrthvplq +excunpoksv + +kxlijpgmwaqhfbo +pfgkzrmljxnhoa + +trmisbo +sbjimr +rmbqgndysi +boimlrs +hmouiarsb + +fwbyqo +tevn +vxjmp +ugdrz +ijcgzm + +dkai +ikd +widk +dwki +driukz + +nzmvyqba +amnqzubv + +iwhvx +tivhkx +vidzshr +vqbighpf + +qlnygosbhdtp +qldotfgyhpmsn +bngosyqltdhp +dptynlgoqsh +glohqntysdp + +kgbls +nigwxk +mgtz + +wzrh +aupdeo +ghbu +ntiqmkj +dw + +tmjibcky +tbcijkmy +bcjyimtk + +pyqtlkrzwjmbxfohaiegv +tzoglunifwscdk + +x +x +x +x + +qupnkiwvbzetyh +wenzmifsxdgtkqly + +ozmqecv +mrcnazqbhdg +mcqzot +fljkxsioqcmz +kzqxcm + +ideu +udeic +idu +widu +diytboujqa + +y +p +e +y +vrij + +wmacjrfvtb +puvgcxkhafwt +vbwfdtca + +xlhzeay +flnukvws + +r +r +r +r +r + +s +s +s +s + +pivre +eipvr +iepvr + +wzn +nwfz +wnz + +djeoxq +dxogjhq +neqpudxo +cqwtobaxklyrd + +gpvlrtdbucyjawizfxonh +ydhcvapgiubonrwjztxfl +wpuxocaiyfgkznlbvthdjr +zwrfivtmldpxoaucbjhnyg + +xagpvdzioyctqwufkb +tvybxakouwgcpizdq +gkcwelrthupjdaoqxvzyi +qagctokpxvzwudiy + +oalnbjdmwhsvciupxzykqf +hdlmxiyqjfboncvzpkuaws +nfizbdcyxsahwrjkuvpmgqlo +icnsbmvkyqxfhopzwudjal + +qhmz +qb + +nfqcoajmkugrpiltbv +lkqecpjrfgamvutbno +mraglyfonukvbpctjq +luvjnikfqtcorpbmga + +rkbnldoxjgiazucpmvetq +wmskhaqudrynlocfb + +lxahfjpyctwinesgk +haknfcespyilxvwjb +nhwsxlikfapjecy +hnfwpkylstjxieuac +entfjilhypxsckaw + +rqbsjgpn +sjkhbxdmvnw + +sq +zw +ia +z + +wyfugxnakdheivlmjsct +hnrjgivusekfwycdmtaqz +yjtpvgxmdukwiahcsenf +ahicfumtesjowykgdvn + +xhgdiekv +vxehgkdi +edkhgvix +kdhtixevg + +evctsliwqjbhuzrxpof +cqlbxtgpwjfvorehumi + +cvdsatreguklb +gtuecdarlkvsb +udgvcrlabeskt +dkueatcrbslvg +asudctgkbvlre + +xgfp +px +pizxa +epx + +cbgfhiqrwupxtsklmva +mgsxtfbpurawiclkqhv +fapxbtuqlkgwcivsmhr +spqmlwitcufhkvrgbax + +xsvtwcrfi +wvexcfrti +wfviacretbx + +shgbpv +sbpgh +gpbzfixush + +t +t +ukt + +duapw +fw +w +w +xmw + +iudtnpfgv +igfdnutv +gndtuvif +ivgundft +gdifteuvn + +nypodhsjctw +dmygicjhq + +bpdrxj +jevxbr +itarxblm +bxrv +bxeyrv + +cgns +gcsn +cdsgn +snbcg +cydngs + +oqz +oz +noz +omvhzs +odz + +ufetwbosghqarzc +abjklnqhgfosci + +toi +tcio + +uwlpanmdzceqb +buthjwzgmsrqxa +ikofjbmvtquzhawx + +fyri +iry +iyr +irgvhy + +cyednmbkljaut +caktfjmludegy +tmuakczjpldiyqe + +rpowcxneyfalvuzh +rlwzuahoxncvpefy +chzvfenaprsxiyouwl + +wftiyuj +nsetw + +w +xi +lq + +exow +u +i + +nujelpthdrkbq +sxkmzacgfyouw + +ebzsafxvp +fmrgzp +wyzfp +pgijzfm + +gmqavtzb +baqztmvgr +mbtsgvaquzxd +bakmvqzgt +tqzarmgvb + +qyedxmc +iaexmw + +cm +cm +mc +mc +cm + +zruilkg +rligzku +uilkrgxqz +lgikzhur + +r +tr +or + +fts +fts +fst +tsfay +fst + +wcbyd +qfdyeptm + +fiyzwouejgbh +jawuezocykpvsmg + +tpskydl +sklpdty + +kjm +aik +auk +ki + +wsxfctnqrijgh +wgicndsebfqzktrx + +djlgp +djgvepuw +jgpfd + +xhgzakdpfurm +gzdsomeky +kidgyzms + +w +jc +e + +kyigvc +gybvtcpik +ygvkic +kicvgy + +rqywfmcisa +oabmcj + +po +hop +oph +pe + +mozselrxb +sfjomkzl +stlomz +mlsjoqz +amoszl diff --git a/2020/day7/haversacks.py b/2020/day7/haversacks.py new file mode 100644 index 0000000..4f7292d --- /dev/null +++ b/2020/day7/haversacks.py @@ -0,0 +1,35 @@ +import networkx as nx +import re + +bagtree = nx.DiGraph() +bagremover = re.compile(r" bags?\.?$") +numremover = re.compile(r"^\d+ ") + +with open("input", "r") as baglines: + for line in baglines: + (miniroot, child_str) = list(map(str.strip, line.split("contain"))) + + miniroot = miniroot.replace(" bags", "") + + children = list( + map( + lambda b: re.sub(numremover, "", b), + list( + map( + lambda a: re.sub(bagremover, "", a), + list(map(str.strip, child_str.split(","))), + ) + ), + ) + ) + + if "no other" in children: + continue + + for kid in children: + bagtree.add_edge(kid, miniroot) + +lengths = dict(nx.all_pairs_shortest_path(bagtree)) + +# we don't count the shiny gold itself +print(len(lengths["shiny gold"]) - 1) diff --git a/2020/day7/input b/2020/day7/input new file mode 100644 index 0000000..820cca0 --- /dev/null +++ b/2020/day7/input @@ -0,0 +1,594 @@ +muted lavender bags contain 5 dull brown bags, 4 pale maroon bags, 2 drab orange bags. +plaid aqua bags contain 1 posh violet bag, 5 pale yellow bags, 4 bright salmon bags. +wavy lime bags contain 3 vibrant indigo bags, 1 posh gray bag. +pale coral bags contain 5 mirrored olive bags, 2 posh salmon bags. +faded chartreuse bags contain 1 plaid blue bag, 4 clear salmon bags, 5 muted teal bags. +vibrant indigo bags contain 4 pale red bags, 1 vibrant violet bag. +vibrant salmon bags contain 1 dull crimson bag, 5 dim coral bags, 4 pale salmon bags, 3 pale fuchsia bags. +light yellow bags contain 5 clear beige bags, 3 dotted beige bags. +muted plum bags contain 5 posh silver bags, 3 pale turquoise bags, 3 faded chartreuse bags. +mirrored indigo bags contain 4 pale tan bags, 1 posh indigo bag, 3 shiny salmon bags, 4 wavy indigo bags. +pale indigo bags contain 3 dark white bags. +plaid indigo bags contain 4 mirrored teal bags. +shiny brown bags contain 1 striped gold bag. +drab violet bags contain 1 drab magenta bag, 5 posh orange bags, 1 mirrored brown bag, 4 wavy salmon bags. +pale olive bags contain 2 light black bags, 2 faded tomato bags. +dark teal bags contain 3 striped fuchsia bags. +plaid white bags contain 4 shiny salmon bags. +muted gold bags contain 5 faded lavender bags, 3 striped aqua bags. +pale cyan bags contain 3 muted tan bags, 5 bright purple bags, 1 posh blue bag. +pale tan bags contain 3 bright teal bags. +bright aqua bags contain 5 plaid magenta bags, 5 muted lavender bags, 4 dim turquoise bags, 1 shiny turquoise bag. +dark gold bags contain 4 dull indigo bags, 5 mirrored orange bags, 5 bright teal bags, 1 dim gold bag. +muted salmon bags contain 3 muted gray bags, 4 pale salmon bags. +striped plum bags contain 1 dark indigo bag, 1 vibrant violet bag. +posh yellow bags contain 3 shiny tan bags, 4 dull lavender bags, 5 pale yellow bags. +plaid lime bags contain 2 bright brown bags, 4 dull lavender bags. +mirrored gray bags contain 4 mirrored teal bags, 3 muted indigo bags. +muted olive bags contain 3 dim fuchsia bags, 2 dim salmon bags, 4 shiny maroon bags. +dotted blue bags contain 4 plaid orange bags, 5 faded black bags, 2 muted black bags, 5 mirrored lime bags. +wavy beige bags contain 5 dark aqua bags, 3 mirrored lavender bags, 3 drab fuchsia bags. +shiny indigo bags contain 3 wavy black bags, 2 dull plum bags. +drab lavender bags contain 4 mirrored chartreuse bags. +vibrant tomato bags contain 3 wavy white bags, 1 dull plum bag. +plaid teal bags contain 3 mirrored bronze bags. +pale chartreuse bags contain no other bags. +muted coral bags contain 1 striped lavender bag, 5 dotted crimson bags, 2 faded tomato bags. +faded aqua bags contain 2 bright plum bags, 3 faded gold bags, 1 mirrored bronze bag, 2 dull lavender bags. +pale brown bags contain 1 clear salmon bag, 4 drab tan bags, 1 light orange bag, 1 light silver bag. +drab orange bags contain 3 faded beige bags. +pale blue bags contain 3 pale plum bags, 3 dotted green bags, 4 dark lime bags, 5 clear beige bags. +dull purple bags contain 5 posh aqua bags, 1 muted blue bag, 1 bright gray bag, 1 muted chartreuse bag. +bright silver bags contain 5 dark turquoise bags, 2 dark teal bags, 1 muted tan bag, 3 vibrant tan bags. +dim silver bags contain 4 plaid black bags. +faded violet bags contain 5 dark maroon bags. +pale maroon bags contain 5 dark maroon bags, 4 drab chartreuse bags. +shiny green bags contain 1 bright chartreuse bag. +vibrant crimson bags contain 3 dotted red bags, 2 striped violet bags, 1 light bronze bag. +clear lavender bags contain 1 faded teal bag, 5 clear cyan bags. +mirrored red bags contain 2 dim gray bags, 2 drab orange bags, 4 muted purple bags, 3 muted white bags. +striped green bags contain 2 light purple bags, 4 light gold bags, 3 posh magenta bags. +dim yellow bags contain 1 light crimson bag, 2 muted indigo bags. +dotted orange bags contain 3 wavy salmon bags, 1 dim fuchsia bag. +vibrant gray bags contain 1 plaid brown bag, 5 mirrored black bags, 4 plaid olive bags. +mirrored silver bags contain 2 striped magenta bags, 3 striped coral bags. +pale magenta bags contain 4 posh tomato bags, 4 plaid blue bags, 2 shiny gold bags, 3 faded beige bags. +vibrant black bags contain 4 dotted brown bags. +muted violet bags contain 1 clear tomato bag, 1 striped beige bag. +clear salmon bags contain 1 drab chartreuse bag, 4 dotted beige bags, 5 light crimson bags, 3 dotted orange bags. +posh indigo bags contain 3 mirrored teal bags, 5 drab gold bags. +wavy black bags contain 5 dotted purple bags, 5 plaid chartreuse bags, 3 striped gold bags. +mirrored lavender bags contain 2 dim black bags. +shiny maroon bags contain 2 dotted beige bags. +drab magenta bags contain 2 dim yellow bags. +pale orange bags contain 1 shiny purple bag, 5 striped turquoise bags, 2 light crimson bags. +shiny beige bags contain 5 clear white bags, 2 striped turquoise bags, 4 pale yellow bags, 1 muted black bag. +striped cyan bags contain 2 plaid yellow bags, 2 clear teal bags, 3 wavy olive bags, 4 posh violet bags. +dull cyan bags contain 1 striped salmon bag. +vibrant green bags contain 4 dull coral bags, 4 drab yellow bags, 4 dark cyan bags. +wavy cyan bags contain 5 light salmon bags, 5 dim blue bags, 2 pale green bags, 1 faded indigo bag. +drab plum bags contain 3 dark magenta bags. +light aqua bags contain 4 bright bronze bags, 3 wavy lavender bags, 3 dull cyan bags, 2 bright green bags. +pale plum bags contain 5 clear plum bags. +vibrant silver bags contain 1 dim lavender bag, 4 bright teal bags. +wavy white bags contain 1 light crimson bag, 4 wavy salmon bags. +shiny chartreuse bags contain 2 plaid gray bags, 5 mirrored white bags. +dull chartreuse bags contain 1 dull cyan bag, 3 striped white bags, 4 posh indigo bags. +clear magenta bags contain 1 plaid coral bag, 5 light plum bags, 1 bright yellow bag. +muted white bags contain 2 dull salmon bags, 5 bright turquoise bags, 3 wavy gray bags, 1 plaid black bag. +dull brown bags contain 3 faded lavender bags. +muted turquoise bags contain 4 mirrored plum bags, 4 mirrored brown bags, 4 drab salmon bags, 4 mirrored tomato bags. +posh tomato bags contain 2 drab orange bags, 4 dim lavender bags. +shiny fuchsia bags contain 3 dull black bags, 5 wavy coral bags. +dim gray bags contain 3 drab gray bags. +striped olive bags contain 5 light purple bags, 5 wavy yellow bags, 1 striped fuchsia bag. +muted maroon bags contain 2 bright white bags. +light tomato bags contain 1 striped indigo bag, 5 plaid plum bags, 4 clear indigo bags, 4 drab tan bags. +plaid violet bags contain 2 dim coral bags. +striped chartreuse bags contain 2 shiny gray bags. +mirrored white bags contain 4 striped beige bags. +dim beige bags contain 3 wavy bronze bags, 4 vibrant silver bags, 1 striped white bag, 2 dark plum bags. +striped violet bags contain 5 dull teal bags, 2 vibrant red bags. +drab green bags contain 1 striped olive bag, 2 light salmon bags, 1 faded cyan bag, 3 vibrant fuchsia bags. +clear lime bags contain 2 plaid coral bags, 1 light lavender bag, 4 posh salmon bags. +striped indigo bags contain 2 pale maroon bags, 5 dotted aqua bags, 3 drab gray bags. +dim blue bags contain 5 faded bronze bags, 4 dark blue bags. +faded fuchsia bags contain 3 muted fuchsia bags, 1 light orange bag, 2 striped beige bags, 1 dotted red bag. +plaid red bags contain 5 pale maroon bags, 3 dark beige bags, 2 striped fuchsia bags. +drab silver bags contain 1 dim salmon bag, 2 shiny salmon bags. +dark chartreuse bags contain 1 dull aqua bag. +clear chartreuse bags contain 5 faded brown bags, 3 dotted aqua bags. +plaid silver bags contain 5 pale red bags. +wavy chartreuse bags contain 5 mirrored red bags, 1 dull teal bag. +clear gray bags contain 5 striped salmon bags, 5 plaid silver bags, 1 clear black bag. +shiny white bags contain 1 shiny gray bag, 5 vibrant gray bags. +posh coral bags contain 2 muted white bags. +light red bags contain 5 muted indigo bags, 1 wavy fuchsia bag. +dull fuchsia bags contain 4 light plum bags, 4 faded red bags. +dotted gold bags contain 1 plaid brown bag, 4 dotted aqua bags, 2 pale purple bags. +faded orange bags contain 3 dotted beige bags. +bright coral bags contain 2 dark cyan bags, 1 wavy tan bag, 1 vibrant yellow bag. +striped brown bags contain 5 light yellow bags, 4 dull indigo bags, 4 clear maroon bags. +light fuchsia bags contain 3 dotted gray bags, 1 striped orange bag, 1 mirrored olive bag, 2 wavy fuchsia bags. +dotted bronze bags contain 2 dull salmon bags. +faded red bags contain 2 posh indigo bags, 5 dotted aqua bags. +wavy teal bags contain 3 faded tomato bags, 4 dark silver bags, 3 shiny cyan bags. +dim tomato bags contain 4 wavy silver bags, 3 drab red bags. +muted beige bags contain 1 bright gray bag, 1 dark red bag. +shiny yellow bags contain 2 light plum bags. +wavy indigo bags contain 1 faded red bag, 1 plaid yellow bag, 2 dull aqua bags. +plaid maroon bags contain 5 vibrant beige bags. +wavy tan bags contain 5 plaid maroon bags. +striped coral bags contain 1 pale silver bag, 4 clear beige bags, 3 dotted aqua bags, 3 striped turquoise bags. +shiny black bags contain 1 clear silver bag, 1 mirrored blue bag. +muted silver bags contain 1 posh teal bag, 4 faded teal bags, 4 plaid aqua bags, 2 striped olive bags. +pale gray bags contain 4 dotted silver bags. +light white bags contain 2 dull salmon bags, 5 vibrant violet bags, 1 dull black bag. +mirrored beige bags contain 3 dark teal bags, 3 wavy coral bags, 3 plaid black bags. +mirrored tomato bags contain 5 muted bronze bags, 2 drab gold bags, 4 dark plum bags. +dull magenta bags contain 1 wavy black bag, 5 dull gray bags. +pale crimson bags contain 3 wavy brown bags, 5 dark green bags, 3 pale fuchsia bags. +pale beige bags contain 3 posh black bags, 4 dotted gold bags, 1 plaid blue bag. +dull red bags contain 2 light chartreuse bags, 1 striped tomato bag, 4 plaid green bags, 3 dull chartreuse bags. +dotted violet bags contain 4 dark plum bags, 3 dull plum bags, 4 pale red bags. +muted bronze bags contain 2 muted teal bags, 5 shiny purple bags, 4 pale chartreuse bags, 4 wavy salmon bags. +dark coral bags contain 5 dull indigo bags, 1 vibrant plum bag, 2 mirrored black bags, 4 drab gold bags. +shiny magenta bags contain 5 light turquoise bags, 4 striped olive bags. +faded olive bags contain 2 clear white bags. +pale aqua bags contain 2 vibrant fuchsia bags. +vibrant yellow bags contain 4 muted teal bags, 1 mirrored teal bag. +dotted lime bags contain 5 dotted white bags, 2 wavy aqua bags, 3 pale salmon bags. +dark bronze bags contain 1 clear beige bag, 1 muted olive bag. +dim lavender bags contain 1 dull indigo bag, 2 shiny purple bags, 4 dull teal bags. +wavy gold bags contain 5 dull black bags, 1 muted fuchsia bag, 4 dark red bags, 1 light crimson bag. +striped crimson bags contain 5 shiny gray bags, 3 mirrored crimson bags, 2 drab chartreuse bags, 4 dull aqua bags. +dark aqua bags contain 1 bright indigo bag, 5 muted white bags, 2 shiny crimson bags, 3 mirrored orange bags. +posh black bags contain 3 pale tan bags, 1 dim brown bag, 5 clear green bags. +bright beige bags contain 4 dotted black bags. +dull maroon bags contain 1 drab red bag, 4 faded turquoise bags, 1 pale olive bag. +dull salmon bags contain 3 mirrored olive bags, 3 dull indigo bags, 1 dim brown bag, 4 shiny lime bags. +faded purple bags contain 4 faded indigo bags. +light beige bags contain 1 posh gray bag, 3 dotted white bags, 1 striped silver bag. +vibrant magenta bags contain 4 drab red bags, 1 dotted white bag, 5 striped aqua bags. +light maroon bags contain 1 dull black bag. +light olive bags contain 3 dull tan bags. +vibrant lime bags contain 2 dim lavender bags. +muted aqua bags contain 3 bright olive bags, 1 muted teal bag, 3 dull crimson bags. +dotted beige bags contain no other bags. +dotted indigo bags contain 2 light lavender bags, 5 dark white bags, 3 wavy gray bags, 4 plaid chartreuse bags. +drab yellow bags contain 4 mirrored aqua bags, 5 plaid olive bags, 5 dull black bags, 4 striped turquoise bags. +light lime bags contain 3 striped turquoise bags, 4 muted coral bags, 5 muted yellow bags, 4 mirrored silver bags. +dark crimson bags contain 2 light bronze bags, 1 vibrant chartreuse bag. +clear plum bags contain 1 muted indigo bag, 5 dim red bags, 2 pale orange bags, 5 light black bags. +mirrored violet bags contain 3 wavy salmon bags. +striped silver bags contain 5 bright olive bags, 5 dim brown bags, 2 posh blue bags, 1 posh purple bag. +posh gold bags contain 5 faded lavender bags. +striped lime bags contain 4 striped coral bags. +plaid tomato bags contain 2 dull white bags, 1 wavy white bag, 5 drab red bags. +drab tan bags contain 1 mirrored bronze bag, 1 mirrored tomato bag, 2 mirrored green bags. +posh purple bags contain 4 dull cyan bags. +plaid blue bags contain 2 muted fuchsia bags, 1 bright teal bag, 2 pale chartreuse bags. +dim lime bags contain 4 drab gold bags, 1 muted fuchsia bag, 1 posh tomato bag. +dark white bags contain 2 wavy gold bags. +bright red bags contain 4 light fuchsia bags, 1 plaid orange bag, 1 pale red bag. +wavy blue bags contain 4 striped red bags, 1 mirrored black bag. +light teal bags contain 1 faded orange bag, 5 muted white bags. +shiny blue bags contain 1 drab red bag, 3 shiny brown bags, 2 dark teal bags, 2 dotted silver bags. +bright gray bags contain 3 muted teal bags, 2 clear plum bags, 5 light olive bags, 5 dark red bags. +bright black bags contain 5 posh yellow bags, 1 striped maroon bag. +shiny gold bags contain 3 wavy gold bags, 2 plaid chartreuse bags, 2 shiny lime bags, 5 dull indigo bags. +striped teal bags contain 4 dark lime bags, 4 light yellow bags, 2 dull brown bags. +wavy coral bags contain 3 dim yellow bags, 1 clear red bag, 4 pale chartreuse bags. +plaid chartreuse bags contain 1 striped maroon bag, 5 dotted yellow bags. +pale turquoise bags contain 3 clear yellow bags, 2 dim coral bags. +vibrant plum bags contain 3 dotted yellow bags. +drab cyan bags contain 5 vibrant green bags. +wavy crimson bags contain 1 mirrored gray bag, 2 dim teal bags. +wavy maroon bags contain 3 pale tan bags. +light orange bags contain 4 vibrant silver bags, 2 dim olive bags, 2 drab red bags. +plaid brown bags contain 2 bright turquoise bags, 4 shiny tan bags, 2 dull indigo bags, 3 plaid olive bags. +posh silver bags contain 5 wavy coral bags. +wavy bronze bags contain 1 plaid yellow bag, 1 dim gold bag. +shiny violet bags contain 5 plaid coral bags, 2 mirrored brown bags. +posh lime bags contain 3 wavy bronze bags, 2 striped tomato bags, 2 pale tan bags. +dim salmon bags contain 3 dim brown bags, 5 drab chartreuse bags. +faded beige bags contain no other bags. +dotted gray bags contain 5 dark lime bags, 2 posh black bags, 3 muted fuchsia bags. +dull crimson bags contain 5 vibrant fuchsia bags. +drab brown bags contain 5 pale maroon bags, 5 light crimson bags. +bright blue bags contain 5 vibrant brown bags. +bright violet bags contain 1 light white bag, 5 clear beige bags, 2 dull crimson bags. +plaid magenta bags contain 2 light plum bags, 1 wavy white bag, 5 pale green bags, 1 bright tomato bag. +faded silver bags contain 5 light black bags, 5 mirrored teal bags, 5 vibrant plum bags. +wavy brown bags contain 4 faded gray bags, 3 dotted olive bags, 1 light silver bag. +clear teal bags contain 2 mirrored black bags, 2 wavy gold bags, 2 striped red bags, 5 light silver bags. +posh crimson bags contain 5 drab tan bags. +clear fuchsia bags contain 4 faded tomato bags, 1 dotted beige bag. +bright maroon bags contain 2 wavy teal bags, 2 shiny gray bags, 5 dull gray bags, 3 dull teal bags. +drab gray bags contain 3 dark white bags, 2 pale salmon bags, 4 bright teal bags. +vibrant brown bags contain 4 wavy salmon bags. +bright green bags contain 2 clear cyan bags, 3 wavy lavender bags, 2 plaid blue bags, 2 faded gold bags. +light salmon bags contain 1 muted tan bag, 5 plaid plum bags. +plaid bronze bags contain 4 mirrored chartreuse bags, 3 plaid turquoise bags, 2 wavy orange bags, 5 dotted yellow bags. +dull bronze bags contain 2 vibrant lime bags, 2 muted purple bags, 2 dark magenta bags. +bright orange bags contain 4 pale violet bags, 2 light fuchsia bags, 3 dull purple bags. +wavy fuchsia bags contain 4 dotted olive bags, 1 dull brown bag. +mirrored olive bags contain 4 muted fuchsia bags, 4 striped turquoise bags. +shiny salmon bags contain 2 dark white bags. +striped tan bags contain 4 mirrored purple bags. +dull coral bags contain 3 posh coral bags, 1 dotted green bag. +drab teal bags contain 4 wavy yellow bags, 5 mirrored aqua bags. +shiny tan bags contain 5 striped maroon bags, 5 vibrant red bags. +bright crimson bags contain 1 muted magenta bag. +shiny lime bags contain 1 faded teal bag, 1 light crimson bag. +posh white bags contain 3 posh orange bags, 4 pale gray bags, 5 dull maroon bags, 5 plaid plum bags. +dotted brown bags contain 1 vibrant indigo bag, 1 plaid olive bag. +faded coral bags contain 5 muted bronze bags, 3 mirrored lavender bags. +faded brown bags contain 1 bright turquoise bag, 3 posh indigo bags, 2 pale fuchsia bags, 3 dark indigo bags. +vibrant aqua bags contain 2 clear beige bags, 3 posh olive bags, 3 dark turquoise bags, 2 posh magenta bags. +dark turquoise bags contain 1 striped gold bag, 1 mirrored red bag. +drab gold bags contain 2 clear beige bags, 4 striped turquoise bags, 1 pale orange bag, 1 clear salmon bag. +mirrored green bags contain 4 dotted beige bags, 3 pale chartreuse bags, 3 light crimson bags. +clear violet bags contain 3 posh orange bags, 4 faded beige bags, 3 drab red bags, 4 shiny salmon bags. +posh plum bags contain 1 shiny white bag, 1 striped lavender bag. +vibrant purple bags contain 5 bright teal bags. +dark salmon bags contain 4 striped olive bags, 5 mirrored crimson bags, 5 plaid lime bags, 3 dark tomato bags. +shiny silver bags contain 2 vibrant red bags. +dull turquoise bags contain 3 faded crimson bags, 1 drab maroon bag, 5 drab gold bags. +dull orange bags contain 1 dark yellow bag, 3 bright beige bags. +bright bronze bags contain 3 posh salmon bags, 1 mirrored violet bag, 2 muted white bags, 3 dotted orange bags. +bright teal bags contain 4 dim fuchsia bags. +clear turquoise bags contain 1 faded teal bag, 2 dull teal bags. +wavy magenta bags contain 4 dim teal bags, 3 mirrored bronze bags, 3 plaid plum bags, 5 wavy lavender bags. +faded bronze bags contain 2 striped salmon bags, 3 dark red bags, 1 dark indigo bag. +faded plum bags contain 1 clear green bag. +faded maroon bags contain 1 striped maroon bag, 5 dim black bags, 1 vibrant indigo bag. +muted teal bags contain 4 light crimson bags, 5 drab chartreuse bags. +vibrant maroon bags contain 3 dark fuchsia bags, 3 plaid turquoise bags, 1 pale silver bag, 4 shiny cyan bags. +plaid crimson bags contain 3 mirrored olive bags. +clear tan bags contain 1 vibrant purple bag, 1 wavy aqua bag. +clear aqua bags contain 4 bright white bags. +striped red bags contain 3 wavy coral bags, 3 dark white bags, 4 muted fuchsia bags, 4 posh tomato bags. +posh violet bags contain 1 muted fuchsia bag, 3 dim coral bags, 2 drab orange bags. +plaid cyan bags contain 2 shiny indigo bags. +light chartreuse bags contain 5 wavy tan bags, 4 clear indigo bags. +vibrant lavender bags contain 3 light gray bags, 4 striped beige bags, 5 dark maroon bags, 3 drab fuchsia bags. +dim red bags contain 4 pale orange bags, 3 drab chartreuse bags. +vibrant turquoise bags contain 3 clear tomato bags, 4 posh blue bags. +muted green bags contain 4 clear bronze bags, 3 dotted black bags, 3 dull beige bags. +faded salmon bags contain 2 drab gold bags, 2 clear red bags, 2 dark indigo bags, 5 plaid teal bags. +posh chartreuse bags contain 4 dotted orange bags. +dotted turquoise bags contain 5 shiny fuchsia bags, 2 vibrant indigo bags, 3 vibrant fuchsia bags, 5 muted green bags. +wavy turquoise bags contain 1 dark white bag, 4 posh tan bags. +clear purple bags contain 2 vibrant gray bags, 3 dark plum bags, 1 shiny fuchsia bag, 4 plaid indigo bags. +pale tomato bags contain 2 striped silver bags, 1 mirrored aqua bag. +pale salmon bags contain 4 muted indigo bags, 4 faded teal bags. +dark maroon bags contain 5 dotted orange bags, 5 faded beige bags, 3 wavy salmon bags, 5 dim lavender bags. +faded green bags contain 3 wavy coral bags, 5 dull indigo bags, 4 dim salmon bags, 1 pale gray bag. +bright gold bags contain 4 drab lavender bags. +dull white bags contain 4 clear salmon bags, 2 shiny gold bags. +drab olive bags contain 3 pale lime bags, 3 striped crimson bags, 5 plaid gray bags, 2 posh magenta bags. +bright cyan bags contain 4 dotted black bags. +drab beige bags contain 4 shiny yellow bags. +dotted salmon bags contain 5 light maroon bags, 5 dotted gray bags. +posh gray bags contain 3 dark red bags, 2 mirrored gray bags, 2 dim brown bags, 4 dotted aqua bags. +dull gray bags contain 2 shiny beige bags, 5 posh silver bags. +light blue bags contain 1 dim coral bag, 5 vibrant plum bags, 1 clear salmon bag, 1 clear yellow bag. +striped gray bags contain 5 striped indigo bags, 1 faded lime bag, 2 light tomato bags. +dark violet bags contain 1 posh gray bag, 5 shiny cyan bags, 2 pale indigo bags, 4 light coral bags. +striped black bags contain 5 dotted maroon bags, 1 drab blue bag. +shiny coral bags contain 1 clear yellow bag, 5 striped plum bags, 4 dull tomato bags. +faded tan bags contain 5 vibrant bronze bags, 5 muted fuchsia bags, 1 pale coral bag, 4 dull indigo bags. +pale white bags contain 4 clear cyan bags, 2 bright yellow bags, 4 vibrant tomato bags. +plaid plum bags contain 5 pale violet bags, 3 posh yellow bags, 3 faded silver bags. +bright fuchsia bags contain 5 clear black bags. +dotted red bags contain 3 dark magenta bags, 5 clear indigo bags, 1 faded bronze bag, 4 dotted gray bags. +plaid turquoise bags contain 2 dark indigo bags. +pale lavender bags contain 4 posh fuchsia bags, 1 clear black bag, 4 wavy lime bags. +bright lavender bags contain 2 wavy magenta bags, 5 plaid blue bags, 1 drab yellow bag, 1 muted gray bag. +bright white bags contain 4 light gray bags. +dull black bags contain 2 shiny lime bags, 3 muted indigo bags, 5 faded beige bags. +muted tomato bags contain 2 dark yellow bags. +plaid fuchsia bags contain 2 dull lavender bags. +dark indigo bags contain 2 dim lavender bags, 3 shiny maroon bags. +mirrored magenta bags contain 1 mirrored chartreuse bag. +vibrant violet bags contain 5 dotted beige bags, 5 plaid olive bags. +pale lime bags contain 1 vibrant silver bag, 4 shiny white bags, 2 wavy orange bags, 3 plaid coral bags. +mirrored aqua bags contain 5 light yellow bags, 3 plaid silver bags, 2 dark white bags, 2 dull teal bags. +striped turquoise bags contain 1 bright turquoise bag, 2 faded beige bags. +faded indigo bags contain 2 dotted purple bags. +plaid green bags contain 3 dim orange bags. +dotted lavender bags contain 5 dotted crimson bags, 5 bright turquoise bags, 3 muted lavender bags, 4 mirrored olive bags. +muted tan bags contain 2 faded orange bags, 5 mirrored gray bags, 1 faded green bag. +dark plum bags contain 2 mirrored olive bags, 4 muted fuchsia bags, 2 shiny maroon bags, 1 dim fuchsia bag. +light cyan bags contain 4 dotted gray bags, 4 wavy red bags, 1 dull white bag. +striped gold bags contain 2 wavy silver bags, 2 muted purple bags, 3 wavy coral bags. +striped white bags contain 4 wavy coral bags, 4 pale plum bags, 2 wavy black bags, 5 dim olive bags. +mirrored yellow bags contain 3 plaid chartreuse bags, 4 muted gold bags, 1 mirrored bronze bag. +clear tomato bags contain 3 striped indigo bags, 3 dim fuchsia bags, 2 wavy gray bags. +faded teal bags contain no other bags. +faded lavender bags contain 2 clear bronze bags, 3 muted teal bags, 2 dotted yellow bags, 5 shiny purple bags. +posh lavender bags contain 5 posh gray bags. +bright brown bags contain 2 dull crimson bags, 5 muted bronze bags, 4 dark indigo bags, 5 mirrored orange bags. +faded crimson bags contain 3 dotted crimson bags. +mirrored teal bags contain 1 plaid blue bag, 1 clear red bag, 5 striped turquoise bags, 4 dotted beige bags. +dark fuchsia bags contain 1 faded green bag. +dim coral bags contain 5 clear salmon bags, 4 dotted beige bags, 1 pale salmon bag, 2 plaid chartreuse bags. +posh blue bags contain 3 pale maroon bags, 5 dim coral bags. +light indigo bags contain 1 vibrant silver bag, 1 bright chartreuse bag, 1 light black bag. +shiny lavender bags contain 4 dotted olive bags, 5 faded brown bags, 1 plaid tomato bag. +dotted white bags contain 4 dim olive bags. +dotted chartreuse bags contain 4 striped turquoise bags, 1 dotted silver bag. +faded black bags contain 2 muted white bags, 3 drab teal bags, 3 wavy gray bags. +vibrant white bags contain 4 dark white bags, 4 clear violet bags, 3 plaid magenta bags, 5 dark green bags. +faded magenta bags contain 3 faded green bags, 4 plaid olive bags, 5 plaid brown bags, 1 wavy salmon bag. +dull plum bags contain 3 muted purple bags. +dim indigo bags contain 5 dotted fuchsia bags, 5 drab red bags, 1 dull green bag, 5 dim fuchsia bags. +pale yellow bags contain 4 mirrored bronze bags. +light violet bags contain 5 dull black bags. +posh green bags contain 1 plaid plum bag, 3 pale violet bags, 5 muted salmon bags. +mirrored purple bags contain 3 mirrored aqua bags, 1 plaid blue bag. +clear orange bags contain 3 light beige bags. +striped tomato bags contain 4 dark orange bags, 1 bright aqua bag. +dark gray bags contain 1 posh violet bag. +plaid beige bags contain 5 pale beige bags. +plaid gray bags contain 3 mirrored bronze bags, 3 clear green bags, 5 dark chartreuse bags. +mirrored coral bags contain 1 pale tan bag, 2 plaid coral bags, 5 striped bronze bags. +dull silver bags contain 1 vibrant purple bag, 3 drab lavender bags, 2 mirrored salmon bags. +clear yellow bags contain 1 shiny gold bag, 4 dotted beige bags, 4 dark lime bags. +light gold bags contain 3 shiny white bags, 4 dim violet bags, 1 light olive bag. +drab white bags contain 5 shiny lavender bags, 4 dotted lavender bags. +faded yellow bags contain 2 dull crimson bags, 3 muted indigo bags, 2 plaid crimson bags, 3 clear green bags. +light gray bags contain 2 plaid orange bags, 5 plaid lavender bags. +dim bronze bags contain 1 vibrant coral bag, 1 wavy teal bag, 1 pale crimson bag. +shiny gray bags contain 5 light lavender bags, 3 drab red bags, 1 plaid chartreuse bag. +striped beige bags contain 3 light black bags, 1 dull teal bag. +dotted fuchsia bags contain 3 faded indigo bags, 2 dim gray bags. +plaid yellow bags contain 4 pale maroon bags, 5 dull black bags, 1 plaid chartreuse bag, 3 drab orange bags. +muted orange bags contain 3 muted lavender bags. +muted crimson bags contain 4 muted cyan bags, 1 dull plum bag. +muted red bags contain 5 faded turquoise bags, 5 light silver bags, 5 dotted aqua bags. +vibrant chartreuse bags contain 4 wavy violet bags, 1 plaid beige bag, 2 clear cyan bags, 2 dull lavender bags. +pale fuchsia bags contain 3 plaid blue bags, 3 muted bronze bags, 4 faded blue bags. +dotted tomato bags contain 4 dark tomato bags, 3 plaid orange bags, 5 posh teal bags. +dim green bags contain 1 dull white bag. +dim aqua bags contain 2 light silver bags, 3 faded silver bags, 3 dotted orange bags, 4 vibrant salmon bags. +dim brown bags contain no other bags. +muted chartreuse bags contain 2 dark coral bags, 5 striped plum bags. +drab indigo bags contain 2 posh brown bags. +dark orange bags contain 4 plaid blue bags, 1 dark brown bag, 2 striped indigo bags, 1 dark magenta bag. +bright yellow bags contain 3 clear tomato bags. +clear bronze bags contain 4 wavy salmon bags. +dotted olive bags contain 4 striped beige bags, 3 drab orange bags, 3 bright teal bags. +dull violet bags contain 4 plaid salmon bags, 5 faded olive bags. +clear white bags contain 2 plaid coral bags, 1 muted indigo bag, 1 striped beige bag. +dull tan bags contain 5 dim red bags, 5 posh gold bags, 2 clear red bags. +mirrored plum bags contain 4 dim beige bags. +wavy purple bags contain 2 posh silver bags, 5 shiny tan bags, 3 pale red bags, 3 dull salmon bags. +dim black bags contain 3 light yellow bags. +dotted coral bags contain 3 pale violet bags. +posh bronze bags contain 1 posh tomato bag, 1 drab purple bag, 3 dim fuchsia bags, 2 bright brown bags. +wavy salmon bags contain no other bags. +dull blue bags contain 5 dark plum bags, 4 light yellow bags. +faded lime bags contain 2 dim red bags, 3 drab lavender bags, 5 muted black bags, 2 light coral bags. +vibrant coral bags contain 4 muted purple bags, 5 pale chartreuse bags, 5 dotted black bags. +mirrored chartreuse bags contain 5 muted olive bags. +dark lime bags contain 1 dark magenta bag. +light coral bags contain 2 dull lavender bags. +bright lime bags contain 2 wavy bronze bags. +mirrored orange bags contain 1 pale salmon bag, 1 light orange bag. +muted brown bags contain 3 clear beige bags, 1 faded salmon bag, 2 vibrant cyan bags, 4 clear white bags. +posh orange bags contain 2 dark lime bags, 3 wavy purple bags. +posh magenta bags contain 2 dark teal bags. +drab salmon bags contain 5 drab tomato bags. +muted fuchsia bags contain no other bags. +wavy tomato bags contain 4 wavy black bags, 4 faded teal bags. +dim chartreuse bags contain 5 drab green bags, 4 drab magenta bags. +dotted crimson bags contain 2 dark white bags, 5 wavy black bags, 4 dull crimson bags. +posh maroon bags contain 4 plaid silver bags, 4 vibrant lime bags, 4 posh gray bags, 3 dull maroon bags. +dull green bags contain 5 muted tan bags, 5 drab red bags. +clear maroon bags contain 3 faded brown bags. +striped yellow bags contain 4 faded lavender bags, 1 wavy coral bag, 5 clear maroon bags. +dull tomato bags contain 2 shiny white bags, 2 light silver bags, 4 dotted chartreuse bags, 4 dark brown bags. +drab chartreuse bags contain 3 dotted beige bags, 3 pale chartreuse bags, 2 muted fuchsia bags, 5 light crimson bags. +plaid purple bags contain 3 drab yellow bags. +light plum bags contain 1 dotted aqua bag, 2 dark white bags. +mirrored brown bags contain 3 mirrored teal bags, 2 dull cyan bags. +mirrored crimson bags contain 3 dull chartreuse bags, 2 dark silver bags, 5 bright cyan bags, 4 dark tomato bags. +dull gold bags contain 4 muted salmon bags. +wavy olive bags contain 3 mirrored brown bags, 5 clear indigo bags. +faded turquoise bags contain 2 clear salmon bags, 2 mirrored gray bags, 1 dark lime bag. +bright indigo bags contain 2 faded lavender bags, 1 shiny gray bag, 4 mirrored indigo bags. +pale teal bags contain 3 dark violet bags, 5 shiny salmon bags. +plaid orange bags contain 5 faded green bags, 5 pale magenta bags. +shiny crimson bags contain 5 shiny green bags, 1 bright tomato bag, 3 vibrant lime bags, 3 clear purple bags. +muted indigo bags contain 4 dim brown bags, 1 dotted beige bag. +dark cyan bags contain 2 striped yellow bags. +dull teal bags contain 1 muted indigo bag, 2 drab chartreuse bags, 5 faded beige bags. +striped fuchsia bags contain 1 mirrored teal bag, 3 dull black bags, 2 dim salmon bags, 5 wavy salmon bags. +drab crimson bags contain 5 dim teal bags, 2 wavy red bags, 3 dark brown bags. +dull olive bags contain 1 clear yellow bag, 4 plaid indigo bags, 4 posh tomato bags, 1 dotted orange bag. +muted lime bags contain 2 light white bags, 5 dotted violet bags, 5 posh gold bags, 2 bright cyan bags. +dark purple bags contain 1 light lavender bag, 2 plaid olive bags, 5 striped maroon bags, 1 dotted gold bag. +dull yellow bags contain 5 mirrored beige bags. +dotted maroon bags contain 3 clear salmon bags, 1 light salmon bag. +dull beige bags contain 5 shiny fuchsia bags. +clear green bags contain 4 muted lavender bags, 5 faded orange bags, 4 faded silver bags, 4 clear red bags. +striped magenta bags contain 2 dotted plum bags. +posh beige bags contain 5 vibrant maroon bags, 1 dim lavender bag. +striped blue bags contain 3 clear turquoise bags, 3 dark purple bags, 3 shiny yellow bags, 5 clear teal bags. +muted magenta bags contain 3 striped orange bags, 5 dim brown bags. +vibrant orange bags contain 1 bright teal bag, 1 drab salmon bag, 5 dull silver bags. +pale violet bags contain 4 shiny tan bags, 2 clear turquoise bags, 2 pale salmon bags, 2 dotted aqua bags. +dotted aqua bags contain 2 striped turquoise bags, 1 dim fuchsia bag, 2 pale chartreuse bags, 2 bright turquoise bags. +clear black bags contain 4 dotted beige bags, 1 dull brown bag, 2 dull teal bags. +light tan bags contain 3 dotted red bags, 1 dark red bag. +pale green bags contain 4 dull salmon bags, 4 dim brown bags. +dim tan bags contain 2 posh silver bags, 2 dark fuchsia bags. +plaid coral bags contain 2 vibrant plum bags, 5 vibrant red bags, 3 dim salmon bags. +wavy lavender bags contain 2 dark gold bags, 5 plaid blue bags, 1 dim yellow bag. +dim violet bags contain 2 clear tan bags, 5 pale magenta bags. +dotted black bags contain 4 dark magenta bags. +mirrored salmon bags contain 3 vibrant beige bags, 3 vibrant purple bags. +dark green bags contain 4 dotted yellow bags, 1 faded green bag, 3 muted lavender bags. +faded blue bags contain 4 clear turquoise bags, 1 posh indigo bag, 2 faded green bags. +pale black bags contain 2 pale coral bags, 3 faded black bags, 3 mirrored teal bags, 4 muted chartreuse bags. +plaid black bags contain 3 posh brown bags, 3 dark maroon bags, 1 mirrored black bag. +dim olive bags contain 5 posh indigo bags. +dark lavender bags contain 3 light gold bags, 5 dim purple bags. +shiny turquoise bags contain 3 dim fuchsia bags, 4 faded silver bags, 4 dim salmon bags. +light green bags contain 1 drab red bag. +wavy plum bags contain 2 wavy gold bags, 5 bright tan bags. +vibrant tan bags contain 3 drab gray bags. +shiny orange bags contain 2 clear plum bags, 1 posh red bag. +dull lime bags contain 3 pale silver bags. +shiny cyan bags contain 3 shiny purple bags. +posh brown bags contain 1 striped salmon bag, 2 dotted beige bags. +mirrored blue bags contain 2 muted olive bags, 5 mirrored aqua bags. +dark red bags contain 2 shiny purple bags, 4 dim salmon bags, 2 wavy salmon bags. +wavy gray bags contain 4 striped fuchsia bags, 2 wavy salmon bags, 4 faded silver bags. +clear gold bags contain 2 vibrant plum bags. +dark silver bags contain 4 striped gold bags, 4 plaid teal bags, 1 pale yellow bag. +dim cyan bags contain 4 mirrored blue bags, 1 vibrant red bag, 5 shiny indigo bags, 5 muted gray bags. +bright chartreuse bags contain 4 light yellow bags, 3 faded lavender bags. +dotted green bags contain 3 pale indigo bags, 3 drab gray bags, 2 dark white bags, 4 light yellow bags. +vibrant bronze bags contain 5 light white bags, 1 dim lime bag, 5 dim brown bags, 5 plaid coral bags. +muted purple bags contain 3 dark maroon bags. +bright salmon bags contain 3 clear beige bags. +mirrored lime bags contain 1 wavy coral bag, 1 mirrored gray bag. +faded cyan bags contain 2 pale bronze bags, 3 vibrant plum bags. +dull aqua bags contain 2 dark coral bags, 3 clear turquoise bags. +posh aqua bags contain 1 pale teal bag, 2 dim coral bags. +wavy aqua bags contain 2 posh indigo bags, 4 shiny cyan bags, 3 muted tan bags. +dark magenta bags contain 1 pale red bag, 1 dull brown bag, 3 faded lavender bags. +striped lavender bags contain 4 striped gold bags, 3 mirrored olive bags, 2 dim lime bags, 1 muted indigo bag. +bright turquoise bags contain no other bags. +dim teal bags contain 5 dark white bags, 2 faded chartreuse bags, 1 striped beige bag, 4 muted gold bags. +wavy yellow bags contain 4 pale fuchsia bags. +muted black bags contain 1 striped salmon bag, 1 shiny gold bag, 3 plaid gray bags. +dark beige bags contain 3 wavy gray bags, 5 dim red bags. +mirrored tan bags contain 2 faded purple bags, 4 faded lime bags, 5 dull lavender bags, 4 dark plum bags. +vibrant teal bags contain 1 dark teal bag, 4 dotted chartreuse bags. +bright plum bags contain 1 vibrant silver bag. +dotted purple bags contain 3 faded beige bags, 3 muted lavender bags. +faded tomato bags contain 1 muted olive bag, 5 faded orange bags, 5 light yellow bags. +light crimson bags contain no other bags. +drab fuchsia bags contain 2 vibrant silver bags, 1 dim fuchsia bag, 3 clear plum bags, 1 drab gold bag. +muted blue bags contain 1 dotted silver bag, 5 dull beige bags, 3 posh silver bags. +dark brown bags contain 1 clear red bag, 2 light yellow bags, 1 wavy gold bag, 2 plaid olive bags. +dim gold bags contain 4 dotted purple bags, 3 plaid blue bags. +dim crimson bags contain 5 muted magenta bags. +shiny teal bags contain 1 dotted bronze bag, 4 vibrant teal bags, 4 pale blue bags. +drab blue bags contain 3 dark salmon bags. +bright olive bags contain 5 pale fuchsia bags. +mirrored gold bags contain 2 posh brown bags, 2 bright purple bags, 5 shiny cyan bags. +dim turquoise bags contain 4 pale cyan bags, 2 mirrored violet bags. +clear silver bags contain 4 dark plum bags, 4 pale gray bags, 5 mirrored bronze bags. +clear olive bags contain 4 muted green bags. +drab lime bags contain 3 dotted aqua bags, 2 faded blue bags, 3 faded salmon bags, 3 dim yellow bags. +dim fuchsia bags contain no other bags. +mirrored black bags contain 1 dark white bag. +clear cyan bags contain 3 plaid chartreuse bags, 3 plaid teal bags, 5 dark gold bags, 5 dim lime bags. +bright tomato bags contain 4 dark green bags. +dim white bags contain 2 shiny yellow bags, 1 pale maroon bag. +light turquoise bags contain 5 posh blue bags, 2 light fuchsia bags. +shiny olive bags contain 5 vibrant white bags, 3 dark salmon bags, 5 dotted tan bags. +striped maroon bags contain 1 mirrored olive bag. +striped salmon bags contain 3 muted indigo bags, 5 wavy salmon bags, 4 shiny maroon bags, 4 dim fuchsia bags. +striped orange bags contain 2 dotted purple bags, 4 shiny cyan bags, 1 drab gold bag, 4 dark beige bags. +posh olive bags contain 3 faded tomato bags, 5 posh blue bags, 1 clear red bag. +shiny plum bags contain 3 pale purple bags, 3 dim beige bags. +dark olive bags contain 4 dull coral bags. +dotted teal bags contain 5 plaid lavender bags, 4 clear bronze bags, 4 dim lime bags, 3 pale maroon bags. +clear brown bags contain 2 wavy teal bags, 1 faded green bag, 5 light white bags. +clear crimson bags contain 4 pale turquoise bags, 5 plaid green bags, 3 shiny aqua bags, 5 wavy turquoise bags. +mirrored maroon bags contain 5 bright coral bags, 5 drab orange bags. +wavy violet bags contain 4 mirrored tomato bags, 4 striped gold bags. +plaid olive bags contain 3 dotted silver bags. +light purple bags contain 2 dark red bags, 5 dull cyan bags, 4 plaid black bags. +wavy orange bags contain 1 dim green bag, 4 dark coral bags. +vibrant red bags contain 4 posh brown bags. +wavy silver bags contain 5 faded orange bags, 2 wavy coral bags, 4 faded silver bags. +dark tan bags contain 3 mirrored brown bags, 2 bright plum bags, 2 plaid silver bags. +vibrant blue bags contain 1 wavy salmon bag, 5 pale green bags. +shiny bronze bags contain 5 wavy white bags, 1 dim indigo bag, 5 muted crimson bags, 5 shiny lime bags. +clear red bags contain 1 dotted aqua bag, 3 pale chartreuse bags, 2 muted teal bags, 5 posh brown bags. +dotted silver bags contain 2 dark maroon bags, 3 dim brown bags. +bright tan bags contain 1 posh black bag, 5 striped orange bags, 5 drab gold bags. +drab red bags contain 5 posh gray bags. +striped purple bags contain 1 striped silver bag, 1 pale blue bag, 4 mirrored black bags. +striped bronze bags contain 2 striped gold bags, 5 light crimson bags, 5 faded tomato bags, 3 wavy indigo bags. +pale red bags contain 2 mirrored olive bags, 5 faded orange bags, 4 faded chartreuse bags, 2 plaid chartreuse bags. +dim plum bags contain 4 vibrant coral bags, 3 clear purple bags, 3 dull blue bags. +muted yellow bags contain 2 clear red bags, 3 pale plum bags. +posh salmon bags contain 3 pale tan bags, 3 wavy gold bags. +mirrored bronze bags contain 4 faded bronze bags, 1 clear black bag, 5 dark white bags. +muted cyan bags contain 2 dim plum bags. +vibrant fuchsia bags contain 1 faded teal bag, 2 muted teal bags, 3 pale chartreuse bags, 3 bright teal bags. +mirrored fuchsia bags contain 4 dull red bags, 1 light cyan bag, 3 wavy crimson bags, 3 wavy yellow bags. +clear indigo bags contain 5 clear bronze bags, 4 dark coral bags, 4 drab chartreuse bags. +pale bronze bags contain 2 faded salmon bags, 1 shiny black bag, 3 pale yellow bags, 3 dotted chartreuse bags. +pale purple bags contain 4 mirrored black bags, 1 vibrant silver bag, 2 striped beige bags, 5 dotted chartreuse bags. +muted gray bags contain 4 shiny purple bags, 4 light green bags, 1 pale fuchsia bag. +clear blue bags contain 5 dotted olive bags, 4 light purple bags. +posh cyan bags contain 5 muted tan bags, 1 dotted cyan bag, 4 wavy gold bags. +bright purple bags contain 4 wavy salmon bags, 1 dark teal bag, 4 pale yellow bags. +drab aqua bags contain 1 vibrant red bag. +pale silver bags contain 4 light lavender bags, 2 mirrored bronze bags, 1 striped teal bag. +dark blue bags contain 3 dull beige bags, 4 faded salmon bags, 1 dull black bag, 5 posh salmon bags. +plaid tan bags contain 1 plaid lavender bag, 5 pale lavender bags, 4 light aqua bags. +posh tan bags contain 3 dotted lime bags. +drab maroon bags contain 5 mirrored chartreuse bags. +dim magenta bags contain 1 pale fuchsia bag, 2 light fuchsia bags, 5 bright bronze bags, 1 faded gray bag. +shiny purple bags contain 2 pale chartreuse bags. +drab turquoise bags contain 4 light turquoise bags. +light bronze bags contain 2 posh black bags, 3 dark yellow bags, 3 faded plum bags. +plaid gold bags contain 4 dark teal bags, 4 shiny plum bags. +dim maroon bags contain 2 clear plum bags, 3 striped aqua bags, 2 striped teal bags. +drab coral bags contain 3 faded chartreuse bags, 2 drab plum bags, 3 faded red bags, 1 dark blue bag. +faded gray bags contain 3 pale gray bags, 2 dull beige bags, 5 wavy indigo bags. +dotted magenta bags contain 2 light salmon bags. +light magenta bags contain 3 posh yellow bags, 3 dotted green bags, 1 drab violet bag. +dotted cyan bags contain 2 faded plum bags. +dim orange bags contain 5 light brown bags, 5 bright yellow bags. +posh teal bags contain 1 faded beige bag, 5 mirrored gold bags, 5 bright teal bags. +dim purple bags contain 2 light silver bags, 5 muted red bags, 1 mirrored gold bag, 2 posh orange bags. +shiny tomato bags contain 3 striped coral bags, 3 dark plum bags, 5 plaid turquoise bags. +vibrant olive bags contain 3 vibrant lime bags, 5 mirrored white bags, 1 pale bronze bag, 2 striped cyan bags. +dull lavender bags contain 5 muted gold bags, 5 pale maroon bags. +light black bags contain 1 dark plum bag, 1 shiny gold bag. +bright magenta bags contain 3 striped turquoise bags, 3 dim gray bags. +drab tomato bags contain 3 vibrant purple bags, 4 shiny purple bags, 2 light maroon bags. +posh turquoise bags contain 2 bright aqua bags, 2 striped salmon bags, 5 muted green bags. +dotted yellow bags contain 3 dark red bags, 3 wavy gold bags. +plaid lavender bags contain 4 striped turquoise bags, 1 dotted olive bag, 1 clear green bag, 4 shiny beige bags. +drab black bags contain 5 dotted magenta bags, 2 drab yellow bags, 2 striped turquoise bags, 1 dark bronze bag. +clear beige bags contain 4 striped salmon bags. +light lavender bags contain 1 wavy silver bag, 1 dark indigo bag. +posh red bags contain 4 muted olive bags, 3 light tan bags, 4 clear gray bags, 2 dim lime bags. +clear coral bags contain 3 light lime bags, 2 posh violet bags. +plaid salmon bags contain 2 pale yellow bags, 5 dark plum bags. +pale gold bags contain 2 striped teal bags, 3 faded crimson bags. +wavy red bags contain 4 faded green bags, 5 dim coral bags, 4 wavy silver bags, 4 plaid brown bags. +faded white bags contain 2 posh tomato bags, 1 posh green bag, 4 vibrant lavender bags. +dull indigo bags contain 3 muted olive bags, 4 shiny purple bags, 3 drab chartreuse bags, 1 dotted orange bag. +wavy green bags contain 3 pale indigo bags, 1 striped purple bag, 5 dotted coral bags, 1 shiny tan bag. +shiny red bags contain 4 pale fuchsia bags, 2 posh salmon bags. +vibrant cyan bags contain 1 faded salmon bag, 1 faded black bag, 4 striped coral bags. +dark tomato bags contain 3 clear maroon bags, 4 plaid maroon bags, 5 dotted aqua bags. +vibrant gold bags contain 1 shiny fuchsia bag. +dark black bags contain 2 wavy lime bags, 1 pale cyan bag, 4 posh brown bags. +posh fuchsia bags contain 4 pale purple bags, 2 dull lavender bags. +light silver bags contain 2 vibrant plum bags, 2 pale magenta bags, 4 pale chartreuse bags, 3 plaid chartreuse bags. +dark yellow bags contain 1 dotted crimson bag, 3 faded orange bags, 5 posh teal bags, 1 clear plum bag. +mirrored turquoise bags contain 2 muted teal bags. +drab purple bags contain 5 dotted plum bags, 1 plaid plum bag. +dotted tan bags contain 1 pale plum bag, 1 dotted aqua bag. +drab bronze bags contain 4 vibrant red bags, 4 light blue bags. +mirrored cyan bags contain 1 dark white bag, 4 dark lime bags, 5 vibrant silver bags. +shiny aqua bags contain 5 wavy plum bags, 4 drab maroon bags, 2 drab chartreuse bags. +striped aqua bags contain 1 plaid blue bag, 1 dark plum bag, 4 faded lavender bags. +dotted plum bags contain 5 mirrored green bags, 1 dark plum bag, 4 dark maroon bags. +faded gold bags contain 4 pale yellow bags. +vibrant beige bags contain 2 light lavender bags, 3 faded indigo bags. +light brown bags contain 3 drab brown bags, 4 dark violet bags, 3 faded indigo bags. diff --git a/2020/day7/inside_shiny.py b/2020/day7/inside_shiny.py new file mode 100644 index 0000000..00df40b --- /dev/null +++ b/2020/day7/inside_shiny.py @@ -0,0 +1,45 @@ +import networkx as nx +import re + + +def fits_in(root): + """recursively count the number of bags that fit in other bags + + :root: the node to count bags from + :returns: total + + """ + total = 1 + for neighbour in bagtree[root]: + total += int(bagtree[root][neighbour]["weight"]) * fits_in(neighbour) + return total + + +bagtree = nx.DiGraph() +bagremover = re.compile(r" bags?\.?$") +countandbag = re.compile(r"(\d+) (\w+ \w+)") + +with open("input", "r") as baglines: + for line in baglines: + (miniroot, child_str) = list(map(str.strip, line.split("contain"))) + + miniroot = miniroot.replace(" bags", "") + + children = list( + map( + lambda a: re.sub(bagremover, "", a), + list(map(str.strip, child_str.split(","))), + ) + ) + + if "no other" in children: + continue + + for kid in children: + matches = re.match(countandbag, kid) + bagtree.add_edge(miniroot, matches.groups()[1], weight=matches.groups()[0]) + +lengths = dict(nx.all_pairs_shortest_path(bagtree)) + +# we don't count the shiny gold itself +print(fits_in("shiny gold") - 1) diff --git a/2020/day8/gamechild.py b/2020/day8/gamechild.py new file mode 100644 index 0000000..3763c78 --- /dev/null +++ b/2020/day8/gamechild.py @@ -0,0 +1,55 @@ +boot_code = list() + + +def gameon(acc, cx, sf): + """emulates the game until a loop or the end""" + + while cx not in sf: + sf.add(cx) + + if cx == len(boot_code): + print(acc) + exit(0) + + if boot_code[cx][0] == "acc": + acc += boot_code[cx][1] + elif boot_code[cx][0] == "jmp": + cx += boot_code[cx][1] - 1 + else: # nop + pass + + cx += 1 + + +with open("input", "r") as file: + for line in file: + line = line.strip() + oparg = line.split(" ") + boot_code.append((oparg[0], int(oparg[1]))) + + +cursor = 0 +accumulator = 0 +sofar = set() + +# we are allowed to keep a 'main' branch and keep jmp/nops separate because +# task calls for only one instruction change over the whole code + +while cursor not in sofar: + sofar.add(cursor) + + if boot_code[cursor][0] == "acc": + accumulator += boot_code[cursor][1] + elif boot_code[cursor][0] == "jmp": + # one for the jmp + gameon(accumulator, cursor + boot_code[cursor][1], sofar.copy()) + # one for the nop + gameon(accumulator, cursor + 1, sofar.copy()) + cursor += boot_code[cursor][1] - 1 + elif boot_code[cursor][0] == "nop": + # one for the nop + gameon(accumulator, cursor + 1, sofar.copy()) + # one for the jmp + gameon(accumulator, cursor + boot_code[cursor][1], sofar.copy()) + + cursor += 1 diff --git a/2020/day8/handheld.py b/2020/day8/handheld.py new file mode 100644 index 0000000..6197a2f --- /dev/null +++ b/2020/day8/handheld.py @@ -0,0 +1,27 @@ +boot_code = list() +with open("input", "r") as file: + for line in file: + line = line.strip() + oparg = line.split(" ") + boot_code.append((oparg[0], int(oparg[1]))) + + +cursor = 0 + +accumulator = 0 + +sofar = set() + +while cursor not in sofar: + sofar.add(cursor) + + if boot_code[cursor][0] == "acc": + accumulator += boot_code[cursor][1] + elif boot_code[cursor][0] == "jmp": + cursor += boot_code[cursor][1] - 1 + else: + pass + + cursor += 1 + +print(accumulator) diff --git a/2020/day8/input b/2020/day8/input new file mode 100644 index 0000000..a73cabd --- /dev/null +++ b/2020/day8/input @@ -0,0 +1,642 @@ +acc +40 +acc -14 +nop +386 +jmp +262 +acc -4 +nop +25 +jmp +500 +acc +13 +acc -1 +acc -7 +acc +37 +jmp +319 +acc +46 +jmp +429 +acc -4 +acc -8 +jmp +335 +acc +12 +jmp +78 +acc +16 +acc -11 +nop +137 +acc +41 +jmp +210 +jmp +83 +acc +7 +jmp +48 +nop +374 +acc +11 +jmp +268 +acc +1 +acc -17 +acc +15 +jmp +178 +acc +23 +jmp -5 +jmp +374 +acc +8 +acc +5 +nop +231 +jmp +1 +jmp -22 +acc +44 +acc +39 +jmp +415 +acc +44 +acc -8 +acc -10 +jmp +36 +nop +385 +acc +6 +jmp -37 +nop +245 +acc +5 +jmp +261 +acc -3 +jmp +23 +acc +37 +jmp +532 +acc -18 +acc -8 +nop +405 +jmp +499 +acc -1 +acc +3 +acc +47 +acc +38 +jmp +67 +jmp -9 +acc +16 +acc -4 +acc +23 +acc +6 +jmp -14 +jmp +229 +nop +235 +acc +3 +acc +17 +jmp +521 +acc +49 +acc -8 +acc +10 +jmp +103 +jmp +75 +acc +22 +nop +527 +acc +36 +acc +32 +jmp -46 +nop +434 +jmp +447 +jmp +159 +acc +37 +acc -19 +acc +39 +jmp +181 +jmp +1 +jmp +162 +jmp +1 +acc +0 +acc +0 +acc +34 +jmp +241 +acc +42 +acc +12 +jmp -75 +jmp -70 +acc +42 +acc -4 +acc +49 +jmp +456 +jmp +277 +jmp +302 +acc +45 +acc +19 +nop -41 +jmp +318 +jmp +153 +acc +9 +nop +323 +jmp -113 +nop -9 +jmp +1 +acc +37 +acc +12 +jmp +448 +acc +3 +acc +38 +jmp -114 +acc +7 +jmp +180 +acc -5 +acc -10 +jmp +117 +jmp +320 +acc +9 +jmp +330 +acc +18 +jmp +1 +jmp +330 +nop +450 +acc +10 +jmp +22 +acc +44 +jmp +298 +acc +38 +nop +433 +acc +1 +jmp +431 +jmp +339 +nop +251 +jmp -126 +nop +191 +jmp +294 +acc -7 +acc +30 +acc -15 +jmp +400 +jmp +441 +acc +5 +acc +17 +nop +35 +nop +103 +jmp +410 +nop -122 +acc +35 +jmp +73 +acc -13 +jmp +291 +acc -11 +jmp +95 +acc -12 +acc +19 +acc -16 +acc +34 +jmp +140 +acc -15 +acc +6 +acc -4 +jmp +190 +acc +11 +acc +0 +acc +19 +acc +43 +jmp +167 +acc +29 +nop +371 +jmp +1 +jmp -36 +acc +20 +acc +20 +acc +26 +jmp +374 +jmp -76 +acc +20 +jmp +115 +acc +13 +acc +25 +acc +39 +jmp -115 +acc -18 +nop -64 +jmp +133 +acc -18 +acc +32 +nop -198 +jmp -157 +acc +6 +acc +41 +nop +36 +jmp -136 +jmp +1 +jmp +41 +acc -14 +acc -17 +acc +1 +jmp +280 +jmp +1 +jmp +72 +acc +7 +jmp +1 +acc -12 +acc -8 +jmp +291 +acc -13 +acc +36 +acc +0 +jmp +97 +acc +20 +acc +0 +acc +12 +acc -16 +jmp -196 +nop +342 +jmp -122 +acc +21 +nop -33 +acc +38 +jmp +285 +acc -9 +acc -17 +acc -2 +acc +25 +jmp +232 +jmp +146 +jmp +312 +acc +11 +nop -54 +nop +351 +jmp -46 +acc +27 +jmp -244 +jmp +262 +acc +42 +acc +5 +nop +4 +acc +20 +jmp +239 +jmp -62 +nop -147 +jmp -169 +acc -12 +acc +40 +acc +29 +jmp +178 +nop +310 +jmp +49 +acc -18 +acc +5 +jmp +297 +jmp +244 +acc +31 +acc +21 +acc +47 +acc +41 +jmp +76 +acc +29 +acc +22 +acc +16 +jmp -121 +jmp -244 +acc +45 +acc -9 +acc +36 +acc +5 +jmp +265 +acc +13 +acc +47 +acc -11 +jmp +338 +acc +0 +jmp +85 +acc +18 +acc +27 +jmp +1 +acc +43 +jmp +227 +jmp +276 +acc +42 +nop +52 +acc -15 +nop +311 +jmp -199 +acc +45 +jmp +286 +acc -8 +acc +7 +acc +9 +acc -18 +jmp -273 +acc +50 +jmp +239 +nop +31 +acc +16 +jmp -162 +acc +12 +nop -204 +acc +27 +jmp -166 +acc -4 +acc +38 +acc +50 +nop +120 +jmp +243 +acc +29 +jmp -300 +acc +0 +nop +179 +acc -6 +jmp -136 +nop -305 +acc +15 +jmp -136 +acc -6 +jmp +172 +jmp +41 +acc -7 +nop +81 +jmp +199 +jmp +54 +acc +1 +acc +25 +jmp -283 +nop -132 +acc +47 +jmp +239 +acc +45 +acc -14 +acc +1 +acc +0 +jmp +10 +acc -15 +nop -338 +nop -257 +jmp +1 +jmp -218 +acc +36 +acc +33 +acc +28 +jmp -230 +acc -5 +acc -14 +jmp +1 +jmp -87 +acc +48 +nop +141 +nop +224 +acc +42 +jmp +22 +nop +140 +acc +16 +jmp +1 +acc +16 +jmp -92 +acc +37 +jmp -368 +acc +27 +jmp +155 +acc +11 +nop +196 +acc +5 +jmp -269 +nop -92 +jmp -276 +acc +46 +acc +6 +acc +34 +jmp -258 +jmp +2 +jmp +80 +jmp +36 +acc +20 +jmp -181 +nop -54 +acc +48 +nop +166 +nop +165 +jmp -263 +acc +47 +acc +33 +jmp +54 +nop -216 +acc +37 +acc +19 +jmp -349 +acc +12 +nop -156 +nop +7 +acc -5 +jmp -390 +acc -10 +jmp -315 +nop -393 +jmp -89 +jmp +1 +jmp -312 +acc +4 +jmp -120 +acc -2 +nop +23 +acc +42 +acc +28 +jmp -205 +acc +43 +acc +6 +jmp -49 +acc -13 +acc +1 +acc +10 +acc +19 +jmp -394 +acc -15 +acc +0 +jmp -365 +acc +23 +acc -17 +nop +23 +acc +0 +jmp -37 +acc +9 +acc +31 +jmp -7 +jmp -278 +nop +147 +acc +5 +acc +43 +jmp -149 +nop -65 +acc +19 +acc +46 +jmp +59 +acc +29 +nop +169 +jmp +131 +acc +43 +acc +50 +jmp +10 +acc -4 +jmp -390 +acc +24 +jmp -236 +acc +10 +acc +19 +nop -160 +acc +32 +jmp +162 +acc +29 +jmp +170 +jmp -14 +acc +36 +jmp -88 +acc +2 +acc +1 +acc +1 +jmp -86 +nop +48 +acc +21 +jmp -356 +acc +0 +nop -321 +nop -247 +nop +127 +jmp -279 +jmp +40 +acc +23 +acc +47 +acc +6 +jmp -438 +acc +26 +acc +35 +nop +120 +acc +2 +jmp -58 +acc +30 +acc +2 +jmp +42 +acc +8 +acc +24 +acc +9 +acc +19 +jmp -351 +acc +40 +acc +18 +acc +43 +acc +29 +jmp +9 +jmp +1 +jmp -210 +jmp -82 +acc +41 +acc +45 +jmp -28 +nop -395 +jmp +71 +acc +38 +acc -13 +nop -251 +acc -9 +jmp -366 +acc +34 +acc +7 +acc -7 +jmp -212 +acc +6 +acc +24 +acc +1 +acc -11 +jmp +94 +acc +20 +acc -14 +acc -5 +jmp +81 +acc +37 +jmp +77 +acc -15 +nop -486 +jmp +39 +jmp +1 +acc +39 +acc +49 +jmp -371 +acc +5 +nop -446 +jmp -267 +acc +39 +jmp +67 +acc +35 +acc +8 +nop -419 +jmp -53 +acc +20 +acc -9 +acc +46 +acc +30 +jmp -136 +acc +35 +jmp +56 +jmp +70 +acc +13 +acc +48 +jmp -290 +acc -18 +acc +48 +acc +50 +jmp -225 +jmp -226 +acc +34 +jmp -391 +acc +49 +nop -324 +acc -10 +acc +41 +jmp -130 +jmp +6 +jmp -555 +acc -17 +jmp -433 +acc +33 +jmp -64 +jmp -476 +nop -138 +nop -556 +acc +47 +jmp +27 +jmp -78 +acc -16 +acc -4 +acc -3 +acc +48 +jmp -292 +acc +43 +acc +3 +acc +44 +jmp +15 +acc +49 +acc +5 +acc +4 +acc +27 +jmp -491 +acc +6 +acc +38 +acc +31 +nop -70 +jmp -379 +acc +0 +acc +2 +acc +49 +jmp -297 +jmp -405 +jmp -72 +jmp -371 +jmp -115 +acc +7 +acc -15 +acc -9 +jmp -486 +acc +3 +acc +16 +nop -19 +acc +14 +jmp -296 +jmp -233 +acc +40 +nop -342 +nop -58 +acc -9 +jmp -316 +acc +4 +acc +15 +acc +14 +acc +50 +jmp -296 +acc -11 +acc +14 +acc +43 +acc +38 +jmp -391 +acc +43 +acc +25 +acc -5 +acc +27 +jmp +1 diff --git a/2020/day9/input b/2020/day9/input new file mode 100644 index 0000000..c27e1a4 --- /dev/null +++ b/2020/day9/input @@ -0,0 +1,1000 @@ +30 +17 +44 +5 +10 +33 +19 +31 +22 +25 +39 +49 +1 +26 +38 +36 +14 +27 +15 +50 +28 +41 +20 +34 +18 +6 +24 +16 +11 +81 +7 +8 +63 +65 +58 +9 +109 +10 +13 +26 +86 +17 +57 +32 +14 +15 +42 +22 +21 +30 +40 +39 +28 +37 +20 +16 +18 +24 +19 +23 +35 +33 +25 +56 +29 +31 +34 +92 +75 +64 +61 +36 +38 +41 +42 +78 +43 +39 +44 +48 +37 +97 +59 +55 +62 +58 +106 +105 +79 +60 +87 +93 +73 +114 +74 +75 +149 +116 +99 +108 +82 +76 +162 +81 +110 +118 +150 +113 +220 +120 +131 +133 +213 +134 +142 +147 +148 +196 +221 +156 +151 +157 +181 +175 +242 +158 +186 +214 +384 +233 +231 +244 +251 +253 +254 +352 +467 +276 +281 +347 +304 +299 +308 +313 +307 +309 +315 +475 +783 +389 +575 +400 +445 +464 +477 +482 +624 +504 +851 +622 +1079 +923 +1251 +704 +603 +606 +795 +620 +1158 +616 +773 +715 +789 +1477 +834 +1794 +845 +909 +941 +986 +1318 +1695 +1981 +1209 +1219 +1222 +1223 +1226 +1307 +2304 +2012 +1236 +1549 +1331 +1786 +1488 +1504 +2649 +2272 +1679 +3183 +2727 +2131 +2177 +2195 +2428 +2431 +3667 +2432 +2445 +2905 +3874 +2543 +2567 +2724 +2785 +4862 +3932 +3635 +2992 +3167 +4584 +4563 +5423 +5159 +4308 +4326 +4859 +6521 +10285 +6080 +5110 +4877 +4975 +4988 +5267 +5291 +7895 +10153 +7773 +5777 +7730 +6627 +13196 +7751 +10887 +8892 +8634 +9167 +9185 +9314 +9203 +10126 +9963 +9865 +10255 +9852 +10144 +10242 +10279 +16492 +11068 +14378 +12404 +14944 +13507 +16622 +15261 +16385 +16954 +17526 +17801 +17819 +25695 +18388 +18517 +28796 +20534 +19717 +19996 +20131 +20094 +26734 +20521 +24657 +23472 +26012 +41995 +35392 +28451 +33339 +43119 +34186 +47184 +34773 +38611 +35620 +45729 +40251 +62126 +39811 +39713 +58328 +39848 +44653 +43993 +40615 +56141 +55294 +48129 +51923 +61404 +89480 +83706 +61790 +102321 +95989 +68959 +70393 +73384 +74231 +75333 +79524 +79561 +114846 +79659 +80328 +80463 +83841 +84608 +88744 +92538 +100052 +107217 +109533 +113327 +131797 +130749 +179711 +136021 +144292 +172099 +139352 +257619 +272151 +149564 +154857 +159085 +352479 +164304 +159987 +207269 +176379 +168449 +231890 +181282 +244344 +340548 +291784 +276089 +268184 +262546 +275041 +275373 +280313 +283644 +429877 +318013 +304421 +495405 +308649 +366354 +323389 +328436 +324291 +336366 +344828 +491838 +460233 +544273 +425626 +519385 +607033 +543225 +537587 +551828 +642304 +550414 +555686 +641402 +847646 +613070 +805061 +627810 +632038 +632940 +659755 +647680 +972638 +660657 +681194 +895242 +1099959 +1073303 +1230687 +1479684 +1056972 +1080812 +1089415 +1168756 +1811060 +1210169 +1293597 +1183496 +2458740 +1246010 +1508312 +1259848 +2597727 +1620318 +1737095 +1905765 +1328874 +1341851 +1555899 +1576436 +1984657 +2146387 +2130275 +2137784 +2900475 +2170227 +2352252 +2258171 +3356556 +2393665 +2836284 +2983105 +4428398 +2884773 +2505858 +3518019 +3430075 +2670725 +2897750 +3890422 +3461664 +4758949 +5335357 +3132335 +4122441 +5967522 +4268059 +4300502 +6558673 +4522479 +9429186 +8319774 +4651836 +5176583 +4899523 +7251164 +5390631 +5568475 +5403608 +5935933 +8012863 +5803060 +7549586 +6030085 +6593999 +7254776 +8919895 +7400394 +9477085 +8390500 +14832794 +9422002 +8822981 +9174315 +9551359 +9828419 +13496357 +11770582 +14598585 +10290154 +10794239 +11738993 +10972083 +17674926 +11833145 +12397059 +12624084 +13284861 +13430479 +14984499 +15645276 +15790894 +16574709 +28263273 +40660332 +22046086 +54156689 +17997296 +22564821 +19379778 +21567412 +21084393 +33306405 +21262237 +21766322 +22533232 +54390798 +22805228 +43028559 +24230204 +26715340 +25908945 +28269360 +28414978 +41425864 +31436170 +50461064 +39259533 +42227500 +37377074 +39081689 +39564708 +45492441 +40464171 +40642015 +44100644 +42346630 +59910306 +61025855 +44299554 +50948210 +63447243 +86447274 +54323923 +50139149 +52624285 +59851148 +56684338 +72515622 +70517859 +83360177 +83381243 +78019089 +76458763 +77841245 +78646397 +130465530 +84763725 +95247764 +84742659 +86646184 +93294840 +109308623 +111165004 +136586423 +101087359 +102763434 +123142144 +104463072 +106823487 +112475433 +116535486 +133143101 +148359104 +155105160 +155860334 +154300008 +154477852 +197239158 +156487642 +187506093 +197218092 +191587212 +219298920 +171388843 +199121617 +223358973 +220473627 +203850793 +205550431 +207226506 +323761992 +235617577 +211286559 +344429660 +229010919 +374951479 +404672048 +302659112 +353078426 +312347976 +401089951 +310965494 +353726800 +360338435 +370510460 +382675402 +362976055 +423149713 +375239636 +434739194 +409401224 +673941549 +518192000 +412776937 +783765353 +440297478 +446904136 +646025753 +400480901 +687587612 +783156303 +613624606 +615007088 +623313470 +975345523 +664692294 +720366718 +714065235 +1036774319 +733486515 +772377279 +875036672 +775720537 +840778379 +809882125 +847385037 +813257838 +1616498916 +853074415 +887201614 +1014105507 +1310718047 +1023794371 +1015487989 +1310901082 +1228631694 +1236938076 +1238320558 +1378757529 +1942696929 +1385059012 +1453853233 +1700459452 +2510341577 +1505863794 +1548097816 +1588978375 +1623105574 +1623139963 +2198102696 +1876868786 +2429756754 +2125522172 +1740276029 +2253808547 +2029593496 +3094842169 +3408351025 +2244119683 +2465569770 +2466952252 +2475258634 +2617078087 +2763816541 +2933156828 +3171237779 +2959717027 +5426669279 +5338961852 +3053961610 +4815180783 +3329254404 +3246245537 +3363415992 +3769869525 +5046834841 +3865798201 +4357354116 +6013678637 +4273713179 +5203836710 +4709689453 +4711071935 +4719378317 +4932522022 +6288971431 +5092336721 +6296572820 +5696973369 +5892873855 +6130954806 +12189446675 +7133285517 +6300207147 +6383216014 +6575499941 +6609661529 +7016115062 +7635667726 +8043582704 +12193081002 +10849213120 +8631067295 +8983402632 +8984785114 +10024858743 +9429067770 +9430450252 +12431161953 +15558902573 +10789310090 +10985210576 +11589847224 +11827928175 +12023828661 +22379157314 +12683423161 +12875707088 +12909868676 +16040111781 +14211167667 +21614705967 +23860917664 +34650227754 +16674649999 +39901029445 +20814168833 +17614469927 +17968187746 +24273270385 +29558034970 +18859518022 +33527090319 +22617238265 +23417775399 +24703635263 +22575057800 +23613675885 +23851756836 +24899535749 +54341259152 +25559130249 +41887740312 +27121036343 +81788769757 +30885817666 +34289119926 +42318105190 +35534168021 +34642837745 +42711274858 +41466226763 +35582657673 +83784331953 +41434575822 +97052534010 +52386608341 +47031451284 +82614108957 +45992833199 +52020572092 +65501416197 +81674289029 +48751292585 +50458665998 +52680166592 +84177501621 +79507644684 +76968743843 +77017233495 +68931957671 +113796764610 +70177005766 +70225495418 +76109064508 +77048884436 +81575490872 +84333950258 +149684650450 +88466027106 +93024284483 +130170334820 +116169838965 +94744125784 +104700738684 +102479238090 +149733140102 +128789231100 +99209958583 +164921131550 +122905662010 +169993028326 +169386964349 +139157453089 +139108963437 +223442913695 +164575091614 +140402501184 +195503522573 +153157948944 +197223363874 +238199167208 +183210152890 +181490311589 +187675985689 +292315402033 +193954084367 +201689196673 +199444864468 +207179976774 +279511464621 +322743315467 +222115620593 +238318922020 +262014625447 +363947112693 +278266416526 +500213792655 +304977592798 +321892812773 +293560450128 +352251077303 +323612654074 +380935176057 +347112033311 +460434542613 +369166297278 +364700464479 +387120850157 +381630070056 +393398948835 +423804817266 +566389661152 +477711280994 +445498898794 +484130246040 +500333547467 +500382037119 +531879372148 +540281041973 +921216218030 +615453262901 +598538042926 +770916850577 +617173104202 +784047196687 +913501694463 +704547830131 +711812497790 +1000715584586 +751821314636 +901516098260 +746330534535 +1093442567846 +775029018891 +817203766101 +924186854385 +923210179788 +929629144834 +945880935913 +1445381066611 +1157454146175 +1032261409267 +1130417415074 +1401220300889 +1215711147128 +1213991305827 +1388089954779 +1321720934333 +1363503638737 +1416360327921 +1450878364666 +1456369144767 +1698239198679 +1592232784992 +2722941235222 +1741390620486 +2672080291895 +1699215873276 +2138532657628 +1763084702014 +1847397034173 +1852839324622 +4060170246674 +1978142345180 +2162678824341 +2189715555442 +2664869670493 +2344408720901 +3303717689288 +2429702452955 +3403706861269 +2685224573070 +2738081262254 +3104894259223 +2872729472688 +2907247509433 +3594901802395 +3887954754121 +5652403031666 +4384440446346 +4568235110583 +3462300575290 +3546612907449 +7979342248741 +3610481736187 +4015518148963 +6237279770968 +4140821169521 +5610810734942 +6295706309257 +4534124276343 +5790118832293 +5977623731911 +5167783715209 +6795202263554 +6147525148360 +7291687955779 +6419342380137 +8757297290889 +8129026078738 +6369548084723 +9699580346258 +7625999885150 +7008913482739 +14084020792604 +11363437374137 +7072782311477 +7157094643636 +7751302905708 +9183301864172 +11400929567235 +8674945445864 +10511748008254 +9701907991552 +11537331799932 +10903672361066 +10957902547502 +17684856948292 +11315308863569 +13214544643691 +13773525033510 +13378461567462 +12788890464860 +13442330396200 +13526642728359 +14698782196627 +14824085217185 +14166008126375 +14229876955113 +14908397549344 +19695049872426 +16774690303029 +15832040089500 +16426248351572 +18376853437416 +19186693454118 +30530822286127 +20213655999806 +20605580352618 +22441004160998 +21861574908568 +22273211411071 +24529853507260 +35651672978533 +28038629860876 +26167352032322 +28620930554360 +26231220861060 +56762043147187 +28225424924986 +28395885081488 +30592256477947 +36121298223998 +29138274504457 +30740437638844 +35527089961926 +33200938654601 +40650064848487 +34803101788988 +39400349453924 +39792273806736 +58756247211113 +40819236352424 +46836801213678 +44134786319639 +46391428415828 +46803064918331 +75319363768662 +54205981893198 +52398572893382 +54392776957308 +59213187032307 diff --git a/2020/day9/xmas_encoder.pl b/2020/day9/xmas_encoder.pl new file mode 100644 index 0000000..4fdcb9b --- /dev/null +++ b/2020/day9/xmas_encoder.pl @@ -0,0 +1,70 @@ +use strict; +use warnings; +use DDP; +use Smart::Comments; +use Tie::File; +use List::Util qw(min max); + +tie my @xmas, 'Tie::File', "input" or die "no input present, $!"; + +my %preamble; +# because it's easier this way trust me +my @also_queue; +my $goalnum; + +foreach my $idx (0 .. $#xmas) { + if ($idx < 25) { + my $t = int($xmas[$idx]); + $preamble{$t} = 1; + push @also_queue, $t; + } else { + my $nextnum = int($xmas[$idx]); + my $tester = 0; + foreach my $num (keys %preamble) { + $tester++; + if (exists $preamble{$nextnum - $num}) { + my $old = shift @also_queue; + delete $preamble{$old}; + push @also_queue, $nextnum; + $preamble{$nextnum} = 1; + last; + } + } + + if (not scalar grep { $_ == $nextnum } @also_queue) { + $goalnum = $nextnum; + print("XMAS weak num: $goalnum\n"); + last; + } + } +} + +# find the contiguous set + +my @contiguous; +my $total = 0; + +foreach my $curr (@xmas) { + if ($total + $curr < $goalnum) { + $total += $curr; + push @contiguous, $curr; + } elsif ($total + $curr > $goalnum) { + while ($total + $curr > $goalnum) { + my $evictee = shift @contiguous; + if (not defined $evictee) { + last; + } + $total -= $evictee; + } + push @contiguous, $curr; + $total += $curr; + } + + if ($total == $goalnum) { + print(min(@contiguous) + max(@contiguous)); + p @contiguous; + exit; + } +} + +untie @xmas; -- cgit v1.2.3-70-g09d2