summaryrefslogtreecommitdiffstats
path: root/2020/day2
diff options
context:
space:
mode:
Diffstat (limited to '2020/day2')
-rw-r--r--2020/day2/input1000
-rw-r--r--2020/day2/pwcountcheck.pl22
-rw-r--r--2020/day2/pwindexcheck.pl19
3 files changed, 1041 insertions, 0 deletions
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 @@
113-16 k: kkkkkgmkbvkkrskhd
25-6 p: qpppvzp
33-4 p: psppxhlfpvkh
43-10 w: wwwwwwwwwwdwww
54-5 r: rcgrrcr
63-4 c: clvccc
71-5 x: xfsfxmctb
89-14 k: kpkmkkckhkkkkvkk
95-6 s: gsfsss
104-8 c: cccdcqdcr
112-5 k: kmkpkkfgkkkkdkkk
129-11 f: pfnsfffwxsn
138-9 w: wjwnwcwxc
147-8 q: rrxhplqs
155-10 n: gpnkqnxnbjzgjnb
1618-19 p: fvpkgfkfjgwllqwhrjd
1712-13 v: kvvvbmdvvvvvvcvvvv
183-5 m: mdmkmvhszpjcxl
192-7 v: qjmvzdwxc
201-4 b: bbbbbbbb
212-5 c: fzcdccfkcsjhckccrcx
222-10 d: fhdwdbdddrsldrtdjdr
231-7 z: ztszzfzztcqzrz
244-6 j: mmjjjrj
2511-12 b: smbgkbbmbpbbmkbbbb
263-5 r: jxzrk
2713-15 d: fppsvgqrdgrbddd
2812-14 w: wwwwkcwwwpwzwzwwsz
295-6 v: lmcvvv
3012-14 x: xxxxxxvxxmxbjnx
311-2 p: hpgpt
3210-11 k: qmktzklkgkcknfwkh
336-7 r: ntcrrrjrznk
347-8 v: vshxvzxw
359-13 c: cncccccclcdwccwmc
365-6 r: srrrgv
376-9 w: bwfswqthk
385-7 f: hfvsfjf
3911-14 v: zbksgqcrclvvwpfvfr
408-9 v: vvvvvmvvvkv
411-12 n: gnnnnnnndnqnd
4210-11 j: jtjjjvbjjhj
433-10 x: vgxxxwqxkxn
445-6 z: zzzztr
452-4 z: rzdhz
4610-11 m: mmmmmmmmmmvj
472-4 z: jzczpvzzs
481-4 k: rkkhk
494-8 n: nwcwmnflpbnnl
502-4 w: dwwgwwssf
511-3 m: smzm
522-6 d: dsddwwljd
5313-15 w: wwwwrwwwdvwwpwg
547-10 f: bhsfffzfjdbfmf
556-7 w: wwwwtwww
563-6 b: bbbbbbxb
577-9 d: dvwdxjgdhf
5812-14 n: znnnnnnnnlnfnrn
591-7 v: qvkvvvgv
602-15 x: xsxxxxxxxxxxxxbx
615-11 n: nckpwnmmnzg
624-13 d: dzdddcdkxgqddqdp
635-17 m: mkxmzbmmmmvfvmmjvmmm
6411-13 p: pppzppppswhqhpppp
654-5 b: bbbgg
665-8 v: vvvvvvsv
679-10 j: jnlkmhmvjvnbjcsvlwb
682-4 x: zxxxxv
691-17 r: drrrrrrrrrrrrrrrcr
7011-17 w: wqmwlszsnnwwwzwwwww
712-3 m: mmmmmmmmm
729-10 n: nrnngngnvr
734-8 z: bxjtzkdzwkzz
745-8 g: vjtvqtgqjgtggggmj
752-5 q: qfgcqw
766-11 c: cgccccchcccvc
776-8 t: tpjgfjpr
785-10 h: hhhnhbhhczhh
7911-14 d: gdddddddddwdddr
801-2 l: twngrmgrckmlmh
8110-12 r: rrrrrrfprfrr
827-8 m: bmmmmsrhqm
832-11 w: wlwwwwdnqsvw
8410-13 j: jjjjjjtjzjjjj
854-16 f: fdvgffxfzcffffff
862-6 q: wbfvkm
874-6 d: ddddddd
882-4 p: jpxprdpn
895-6 s: tgssrrpbvsgs
903-10 j: spjgjjjcbjsjxj
915-10 w: wwqrdvwwwpwwwr
923-4 x: hpxxxzf
934-8 d: dxcpddddddrddddddqj
9415-16 z: zhfxlzzkzzgzhzzz
953-5 s: ssslsnc
962-3 j: rrjrwg
977-13 x: xxxxxxpxxxxxtxx
985-8 x: xxxxxxxrxxxxxxxgx
994-10 g: dmhcmbwnwwggcw
1006-8 s: qtsxflsfshzvsgpxg
1017-9 c: cbvccckcwc
10215-16 r: rlrrrrrrnrrrrrsx
1038-10 r: kjrbrrrbrnvrrx
1046-7 q: zpsmcjmmr
1055-10 p: ppgpsppppkpp
1063-4 k: kbkkk
1071-2 b: bbbbb
1088-11 s: sssvssssbsw
1095-7 m: lmwrmmmmgmfhd
11016-18 j: jjjjjjjjjjjjjljsjt
1111-14 b: bcjlbbcwbjbxbbvbf
1122-5 z: qzzrfv
1134-17 t: tttrtzttttttttttxttt
1145-6 w: kwwwjw
1157-9 l: bclgtbghdtd
1161-8 h: mqhbhhhhhhh
1175-6 j: zznjjfvvjwcths
1185-7 t: tttbmttd
1195-14 v: vvvvpjvvvvvvhm
1202-4 x: vxlx
1215-15 g: gfgfnnqkbgngpdpp
1221-8 n: jnnnnpnvntrp
1233-4 b: bbbb
1246-7 z: frszzzfz
1256-9 f: pbbmlvfpwvw
1264-15 g: gbjgggfgvggggdgbq
1271-9 w: tgwljtgwlm
12814-15 k: kkkkkkkkkkkkkzk
12911-12 p: ppppppppppklp
1304-8 n: nnnvpkzsn
13113-16 m: fmjsqwtmwbdxmnwmlmb
1322-7 c: qccgccczcc
1338-11 x: xxxxkxxbxxx
1341-4 g: gcgb
1356-7 l: pkjllll
1362-3 n: mnntpwsrlqkxkgnlb
1379-10 s: sssssssscss
1386-16 n: rtthnbsrfvndnsnnj
1391-2 h: hjdhh
1401-3 f: ffff
1416-9 l: xqtvlllllpmlxtl
1426-11 r: rrrrrrrrrrr
1431-6 z: fzzzzzzzzzz
1442-7 q: qqdqqqgqqqqtxqqqq
1459-13 k: dbfkszjjmkkkfkdkklxk
1465-6 j: mdjjljdfzjvqd
1475-10 s: tsbskgsbtsqdd
14812-14 j: tjjsjdjfjtjjfjj
1499-10 x: xxxxxxxxgx
1508-11 r: rrgrrrrbrrcrrr
1516-18 m: vmnmhmbmmmmmmmmmmz
1526-8 k: llkkqrkc
1531-2 c: cccc
1542-8 x: xxxxxxxxxx
1557-10 p: ppzppppppwp
1569-17 v: cdjwncwrbcgkfvwzvkf
1576-11 w: wwftwjwwwcwwvwwvw
15812-16 g: gggggggggxggggggggh
1591-4 z: kzxzcdnpgczhn
1603-5 t: tttmtttvxtd
1614-5 h: hhhwh
1624-8 d: dvddddln
1638-15 l: lvllfllllxllllwmpl
1647-9 s: dbsksbwtj
1658-15 q: qkbqmqqqqqqqccqhq
1662-6 r: grcsrrqz
16714-18 s: sssssssssssssssssss
1687-10 r: ffrrttnrrrrs
1692-11 c: csccccccfdgccgcccccc
1703-5 r: rrrrr
1713-4 h: qrhh
1727-9 k: kkzqkrkwk
1731-5 k: khkkfgkj
1743-6 l: pplnxl
17510-13 k: chsxfrtrkkjgq
1766-9 b: lbbblnbrbbb
1773-5 n: hqnlfpnj
1785-8 f: shffkcnfdmswfrnsfrpg
1792-7 j: jjjjcdcnwxnbr
1804-13 z: dvxnzpcbfkngk
18111-13 h: hwzpzbphjhrhk
1821-10 v: vqptqpbbtq
1831-4 b: bdfpt
18413-18 p: pppppppppppppppppp
18514-15 h: hhhfhhhhhhhhhnmhh
1864-14 x: wxsbxxxjvxxbxx
1879-10 m: mmdmmxsrjdmpdmzsmm
18811-16 s: szsbssssssszsxss
1899-13 h: hhhhbhvhthhvnh
1905-6 q: qqqqqq
1911-3 d: ddldcqrdmd
19211-17 f: ffcfkfffffpwfqffm
1933-6 m: rmmmqm
1949-11 l: vlblgszllwbvpn
19513-15 z: ghzvdlzrvrzzcnz
1963-5 l: bglllcll
1971-8 h: hhhhhhhhhh
1982-7 j: qjsgtjjt
1991-2 d: ddbctlvpdf
20011-14 v: vvvbvvvvvvtvvvvv
20114-15 g: ggzgggggggswgrjggm
2029-13 v: hqtcqvnbvqnmv
20312-13 b: bbbbbbbbbbbjzbbbbb
2045-6 r: rrfrcv
2054-6 p: pppppppppppp
2066-12 d: fdddddddddddrd
20712-17 g: ggghgggggggxggggfgp
2082-7 h: hqhhhhjhh
2098-12 v: vvvlvvvvvvvv
2104-5 n: nnkpg
2113-12 m: mmzmmmmmmmmmmmm
21211-14 b: bbbbbpbbbbbbdbbbb
2136-7 z: zzzzzzr
2144-7 n: snnnnfnkn
2151-2 h: hnshhqvmjpghntx
21615-16 b: bbbbbbbbbbbrbbbb
2174-6 n: nxnnpnnnh
2182-9 v: sdghvmxtkz
2195-7 j: jjjjjjj
2204-10 l: plbhsmlllrl
22112-18 g: ggtggdlghcjwqwggggg
2225-7 b: bzbxrbxgwcdbb
2235-15 m: mmmmmmmmmmmmmmmmm
2244-13 j: jjjjjjjjjjjjjjj
2254-11 k: kshkkwlkkkkkdkbk
2261-15 w: bwwwzbwwwnwwwmcww
22719-20 l: pblvxmgslllnnsplldnv
2283-4 z: skzx
2291-5 x: xxqdxgb
2302-3 g: wgggc
2315-9 d: dgcddwrdf
2323-6 m: mfkzjg
2335-8 s: hmssmgwxhssg
23410-11 s: ssssshqssll
23517-19 v: vvsvfvvvvxvvvgvvvbv
23611-12 t: cwssdtfqkdttjv
2371-5 b: hcptprhlpbwkg
2382-8 j: ljjxjjjljp
2392-5 q: qqqlqr
2402-8 r: jrcwdbhrcltrnsgswpm
2413-4 f: ffvff
2425-10 h: hhhhhhhhhhzph
2435-6 z: mzzmctzz
24410-13 w: wwwwwjwqwwwwwwwwww
2451-4 m: mmtm
24611-12 z: tddzcrptcnlmbjj
2473-6 l: llmllpl
2482-4 f: ffsf
2495-11 g: gggrvgggggg
2502-10 k: zbmpktfnddfs
2515-9 l: lsbblgpjlms
2521-12 s: sssssssssssss
2535-7 f: fffdrsc
2549-11 z: rzzzzkfzzwqzrz
2553-6 z: zwzrbzv
25617-18 r: rrrrrrrrrrrrrrrrrg
2572-4 n: nnnrgnnn
2583-4 n: nfqq
2592-3 h: khhc
2609-10 x: xxxffbxxxnr
2615-6 d: mtgnrjdnmzhddks
2623-4 b: bbbb
26311-15 p: kppxppppppppppppp
26413-18 t: tttdtttttttttttttttt
2651-7 p: frjpppwgdpzvvfwds
2661-6 k: qkzkkvpk
2674-15 n: nnnxnnnnnnnnnnpqn
2686-7 l: ndlrqrl
2694-5 r: rchrwr
27011-12 f: ffffffffhfff
2711-3 j: xjjjj
2729-10 z: zzzzlzzzgn
2736-17 g: tgrhpggcqbjwjggmgql
27411-15 v: vvvvvvvvvvlvvvhv
27510-13 w: wwwwwwwtwwwwswwfwww
2761-2 l: plllllllllllpll
2778-9 k: kkckklwkc
2782-4 b: bvbp
2791-6 r: rrrnqrrrrrrrrrrrrr
2808-10 d: pwnvkxddpddd
2813-6 k: kkkwkf
2828-15 v: vvvvvvvvvvvvvvvvvvv
28313-17 g: lhqgggcxlgcvgwgdg
2846-13 x: kxxxxsxxxmxxxx
2853-4 r: rrrqr
2862-3 r: kvrsxjrmtvtr
2871-2 h: jtbh
2888-9 w: wwwwwdfckw
28913-18 v: vvqwvvvnvvvvvvvsvv
2906-14 t: mpfthffdnmtxmx
2914-5 d: dddcsd
2926-7 m: mlmmmnfmmh
2935-7 x: xhxpkpqxqnx
2949-11 v: vgvvqgvvwmkpfvvlv
29515-18 l: jlxqvmjgrrnbhccpdl
2962-9 k: kkkkznkkbf
29714-15 w: wwwwwwwwwwwwwbwww
2989-10 k: wkkvvmkkvgfkkk
29910-15 g: bfggggggggggggg
3007-8 x: xxxxxxxx
30112-14 t: dmtmwtztltfsthtb
3026-7 k: kkkkkwk
3034-5 c: ccvsz
3043-4 c: mclvcfjcqh
30516-17 k: skkpknhxxsrqmcvkj
30612-13 v: vvvvrfdfsdtvf
3071-2 q: fpqp
3087-8 b: bwbbbqbbb
3095-6 h: hhhhhh
3105-7 z: zzvzdzzxzwz
31117-18 w: wwwwjhggnwbwwwwwzb
3126-8 g: gggggtggg
3134-8 n: lnnnzhbn
31417-18 g: lggggggggcggglgggg
3152-8 v: vbvvvvvkv
3161-9 v: vvxvrvvtvvvvv
31713-15 j: fhvxdngcrjdqxmnz
3185-17 n: nnnnnnnznnnnnnwnnn
3191-4 f: fnxdmjdsqbfffnjsnkf
3203-8 q: dqqgbnbrpxqclq
3214-6 b: xkpbbbk
32211-12 l: llqllllllldjll
3239-10 c: cwvlcdnmzr
3246-8 l: zkjlllvlgvlnlblspm
3254-9 b: lbbbbbbbbbwbbbw
3269-12 g: gfgrggvgbggg
32716-17 r: rrrrrrrrrrprrrrtc
3282-16 r: mrbmrrxgrrbzrrmrrj
32916-17 v: vnsvvczmjwfkvjvvvsrv
3302-11 l: lglrllnlllqlll
3312-8 t: sllgjrxkthl
3323-7 d: ddldddk
3338-13 c: ccckchmcdxccccccsf
3348-9 t: cttbtztttfqdqh
3354-5 b: tbbxh
33612-17 w: wwwwwwwwlwwtwwwvtww
3371-5 t: krfwxtzxcwphw
3383-10 w: wwwwwwwwwwwww
3391-2 n: nnjqqkspswql
3409-13 w: wwwwwwwwfwwwwww
3411-3 s: ssss
34213-14 x: xfxxxxxtxxxxnx
3434-5 x: xxxcj
3445-15 k: kkkktkkkkkkkkkf
34514-16 l: lrlzjxlllpqltlblvlll
3465-6 t: ttttfct
34711-14 z: zzzzzzrczdkzzz
3486-8 f: ffffftfj
3499-11 d: ljdngglsdvdsv
35010-15 c: ccrqhcqzccnnjvcfcj
35111-15 w: jwvwnccwwxzcwwww
3529-10 s: ssssssssss
3532-4 r: vzfmrr
3545-8 l: blhlnlsqb
3556-7 c: ccxxcfxldckpcc
3562-4 j: czjkj
3572-14 d: rlxksvpqsnhhpkds
35816-19 k: kkkkkkkkkkkckvkjkkwp
3593-9 j: kcjcbjjjjjjjjgljml
3602-7 l: ljjzdll
3614-8 r: fqnqjbsssqrrwrrrrr
3625-15 t: xtnvhtttdsrhtttt
3631-3 l: xlzl
3646-10 g: ggggncchghgggghgg
36510-11 m: msmmmmmcmgj
3664-6 c: mcnprhmcfcclcl
36712-13 s: ssssswssssstsss
36813-14 m: mmmmmmmmmmmmmmmmm
3699-11 p: kqvrdbpppcpgqh
3706-7 q: qqqqqqq
3719-10 b: bpbbnbbbkdbbsbblqrfb
37212-13 b: bbbbbbbbbbstsb
3738-11 g: ggbbfrsgdxhldnt
3747-8 d: dddwddssdbd
3756-7 b: bbbbkbfj
3763-5 z: jtdklzthgz
3775-6 l: hlnlllltmvhmlmq
3783-6 q: qqpxqvqp
3791-3 z: zskzmzzzhzzzhzvzrzzq
3802-8 h: sskhzhlhkht
3812-9 r: rltcgrrrrrrr
3823-16 f: zrxffkfcvffffncffgff
3831-2 r: rrcrhkns
38414-17 b: bbbbbbbbbbbhjbgbdblb
3854-15 c: cccccccwcckclccrcc
38613-14 l: lkzlclbnlhlcnk
38713-14 r: rrrrrrrrrrbrrr
3884-5 k: cvhkkkbj
3892-5 m: kmfnmzh
39014-15 n: nnnnfnnnxnnnnnnndnnn
3917-10 t: wttwkbhtpf
3923-9 n: qjgzpnkpn
3936-7 n: nhnnnzn
3945-10 n: nngtndngcn
3952-5 x: rdxnp
39610-13 s: sssssssssxssssssss
3976-8 n: mnjnnxnnvckn
3982-10 p: gpxpglqwpppp
3995-7 t: twtktdts
40018-20 c: cccccccccccccccccccc
4016-7 d: dddddddw
40210-11 x: xxxjxxxxxvzxxxx
4034-7 z: zrphzzlzhgfwd
4044-8 l: lllnlllkl
4052-7 q: kkwsgndmdrmsvfqj
4064-7 m: mmnmjfmm
4072-5 s: flhkzzs
40812-15 x: xxxxxlxxxxxmxxs
4099-11 v: vvvvvhvkbndjvx
4101-9 n: kpqgbxnkx
4115-10 f: ffdfrpfffffwfffff
4121-3 f: jsvqkff
4135-7 j: jsjjjfxl
4148-14 z: zzznrzzzzzqzzz
4151-12 d: dzlbdzhgmrdddc
41612-13 k: kkkkkkkkkkkbk
4177-8 m: pmmmmmmmm
4181-6 s: bsssssvslx
4196-8 d: dddgdgrtbfdm
42011-14 k: gkplwxkmskwmdpm
4216-10 x: xxxxxkxxlr
4224-10 l: lllxlllllklllll
4231-2 t: ttstmpksrrp
42410-12 s: ssssdsssshscs
42510-12 z: zzzzzzzzpwjszzzz
4262-4 r: grrrctkzmw
4271-2 l: fspl
4283-5 k: kkkkk
4295-12 b: bcbbbbjbbbbb
4308-9 c: ccccccctcc
4313-8 p: pmplmhpp
4326-7 b: bjhfsbbx
43316-19 d: dddddddddwdvddddkdg
4345-6 j: sjrzcj
4355-8 f: mfdffdgf
4361-3 q: qcqqq
4379-10 s: sbsssssspm
4382-4 f: dffl
4393-4 n: nnnn
4404-10 t: wttthjpdmtlthttgwtkt
4419-10 d: jpxdmbnddddd
44210-19 q: sqhswtjrpqbxwjqzfqmr
4432-6 w: swwzvgwbww
4441-2 m: cfmmsl
4459-14 w: pwdbjwwhbnpwllm
4464-5 q: qqqqqqqqk
4478-15 m: mmkdmwzkrvlmpmnmmmmf
44817-18 q: qqqqqqqqqqqqgqqqnvq
4493-6 g: gkkngh
4501-8 g: gghdzwkg
4513-11 j: vxdspqtvkpj
4525-7 q: qqtqgpmqdq
4536-8 d: bdmddddvd
4545-6 w: zwwwwwvwxfw
4552-11 n: bnplrmpvbpn
4567-14 k: kkktbkkkkkkkkk
4573-11 b: fmkqvvbztnxzqvjc
4583-6 q: sscqqq
4594-7 c: cfrrdrzbjmvpk
4606-9 w: pwrtzwrww
4612-5 v: vvcvv
4622-4 f: ffmf
4638-10 k: kkkkkkkpkd
4646-7 v: mvjvvvv
4658-11 c: vccvcckccfk
4667-8 b: bbbbbbbsr
4672-3 x: xxxmvx
4686-7 l: llbllwsl
4698-10 r: rrrrrbrrgrrrrnrb
47012-16 g: ggggggzsggmwgggv
47118-19 p: pprppppppppppppppppp
4723-6 s: ssssssss
4732-6 x: lwxkdx
4742-3 n: xgbnf
4752-4 p: dzrk
4762-4 h: hlhpjhh
4774-5 b: bmnbb
4781-7 z: zczvzczsxmxpzznp
4792-9 l: nlwxdwlblzl
4801-4 r: xbtcqrfkv
48113-16 k: skkkkkkvkkjkxrkfqk
4829-14 b: bbbfcbwfjbbcbg
4831-13 r: frrrrrrrrrrrfr
4841-4 w: hwwxwnvvt
4852-6 l: zzhlrx
4863-8 v: vmzvggqtslnlqrj
48715-16 s: dhssknsjztzssssssss
4882-6 q: qqqqqqqq
4892-3 t: mkktlt
4907-17 b: bbbbbbbbbbbbbbbbdb
49111-17 s: sssssszfssxssssskj
4922-7 h: hnhkhshhhhhhhh
4932-15 x: xzxjxnxxpxxkzxxxxj
49415-16 p: pmcmpclzphppxplp
4958-9 k: kkkkkkkdpkks
4962-4 r: vrwt
4978-12 r: qrrrhhwjrrrhrrr
4983-4 j: vjjzq
4998-10 q: qqqqqqqqgs
5006-7 j: zjjjjjjj
5011-11 m: mdgkdkmqzmmsrhxxmmj
5021-7 x: pxxxrbq
5033-4 z: zrhkzz
5044-5 s: ssqlss
5055-8 f: vtrfffffff
5067-13 j: jjjjjjdjjjjjtj
5071-7 n: dnnfxwz
5082-11 n: nzgnqncnnnjg
5094-5 x: xxxxx
5105-7 v: rhbvvvvhvxvpz
51110-11 z: zlbbddzlzwzv
51210-13 v: vvvvvvvvvvvvvv
5133-4 s: ssrs
51411-12 m: mmmcmmfdmmsmmmmnm
5155-7 s: sdstsssssrs
5161-3 w: bwzw
5173-4 h: hphq
5187-16 q: qqqfqqdwksqlfcqjxq
5196-7 x: kndcxfv
52010-11 m: mmmmmmmmmmm
5211-4 n: fvsvnfhgwcgcnp
52213-14 s: ssssssssrssswrss
5235-9 x: xmvkxwgrxrtwxmrxhxx
5243-5 q: jdbvvxvdg
5253-15 w: zlzcksssjbwcvgp
52616-19 x: bxxxxxxxxxxxxxxxxxx
5273-5 z: rzzhz
5284-10 f: hpttvbtjmq
5293-6 n: wsngjn
5304-5 p: ppphg
53110-12 c: bqlccfctmchqbchhcg
5329-10 z: zzzzdzzzzhzzvz
5337-9 w: nwgwcvdcxqqwmzq
53414-19 x: pxtxxlbrxdpvspwmxxx
5352-8 t: ssktwbft
5368-9 j: jjjjjgjsjzjj
5377-9 v: vvvvvvdvlvvwv
5384-6 x: qxxkssx
53911-13 g: ggggggggkgvgg
5408-9 t: tttttvttjttwt
5412-8 b: pfbbcsbwbbbb
5428-16 r: mkrcrtsrrrrbxmprftvx
5439-10 k: hvwlqvktkkb
5441-6 w: wsbwwvjwwrwh
54510-19 f: nfftfffrdhjffjsnffd
54613-16 h: hhzghvhhhfhhhhhhhhh
54714-16 x: kskxbwrwrvjxfvfg
5481-4 k: rflk
5496-7 b: bbbbbbgb
5504-17 v: vvvvvvvvvvvvvvvvv
55112-13 s: sdstmsspfwsssscqf
5529-11 z: zzwzvmrzzczzzz
5534-8 s: skslmgsqtszbswsssscs
5544-12 h: bdshxnpgvwhktdwgdp
5553-5 t: tltst
5564-5 h: hhhhh
5579-11 w: wwwwwnwxxwwwwwww
5586-7 n: dcnngffnnzn
5591-3 l: clflll
5606-7 x: xxxzxxgx
5616-7 n: nnnnnkgnnnnnn
5621-6 m: mmmmmmmm
5635-7 t: tktttpt
5644-8 v: zpcvqvzvrvgttntrbl
5656-7 d: dddrddd
5663-5 k: jskdkswqjfftgkfr
5675-6 f: ffffgrffn
5686-8 l: lwlkllgl
56910-13 p: ppppkpppppppd
5704-5 d: hbjdd
5719-15 r: rrxrrrrrrrrrrrrrgr
5724-5 b: bbbbtbx
5738-11 b: brbbtlvvlbdbbbqjsb
5746-8 g: zgzqgwmg
5754-9 r: qstrmxrtr
5765-8 m: mbmjmmmmmr
5775-7 v: tvvzqvgrvqvmvncshv
57817-18 g: fgggggggggggggggwr
5792-12 t: nttpgcjtkdjt
5806-10 k: kkkkklkkkk
5812-7 q: qqqmtgqq
5823-6 n: npccknvnn
5835-16 k: rtlhkbtdkmmntdbl
5842-3 b: wwkb
5857-17 q: qqqqqqqqqqqqqqqqqq
5861-4 g: ltgc
5872-6 l: lxlnln
58813-15 q: qqqqqqqqqqqqqqxq
5893-4 j: jvjj
5905-15 c: cpmzlhcckwlnhwmwgzw
5913-8 b: qvblmmchbcc
5925-8 b: fqhdwtcxb
5934-15 k: kkvkkkcwgkkbkkdkkkkn
59411-12 f: fnffffffffffffff
5959-10 t: tttttttpfvt
5964-10 f: nfffpftfffffffnf
5972-4 m: scgxnm
5987-8 z: zzzzzzxhbz
5996-9 z: vznwkzzzz
6003-5 k: hkcdn
6013-10 k: kkskkkkkkz
6022-3 p: pbdf
6031-4 m: mdhmm
6046-10 b: lfbbwdbbtv
6058-10 g: gggggggggggg
6062-3 t: qgthtztbwtppb
60715-17 n: nnnnnnnnnnnnnnbnjn
6088-17 v: vvvvvvgkvfvvzvvvpv
6094-5 f: vwffff
6108-15 w: wwbvwwwwdwwkzwwwwwwf
6117-13 n: srmzrmnvcgshljkchp
6125-15 q: dqjvfqvpwqnmpwqzh
6131-2 h: hhfs
6142-6 h: jhqwhh
6153-4 t: tthg
6162-4 b: sxsqrrxkjb
6176-8 q: qqqqqqqqqq
6186-7 c: rqcxcclxccwqcgwq
6194-5 v: vvmfv
6206-7 m: mmmcmmmm
6212-4 j: bqfj
6222-12 k: kkkkvkkkkskkkkkk
6235-9 q: xjtqqrnnkdplrnqq
6241-6 k: bqkrfpkcrwwkk
6251-4 r: mrblr
62612-18 s: ssssbfdlqbbssplswpsl
6278-9 b: bhbhhbbkbzbnbcbh
6283-7 t: tsdtthx
62912-15 f: xcmghffxtgfffjf
63012-16 n: bxnnhnhnnzfnnnwrtgl
6317-9 q: qqqcqmnqdq
6322-3 m: rpbjgkxqtmjrzm
63311-12 s: hssssssssshc
6343-5 x: xxldx
6353-4 k: kkkxt
6367-9 k: wlgkqndkz
6375-7 l: llmtllv
6382-6 v: svzvfv
6395-6 d: djdddvddd
6405-6 k: mhkkkkkwvkkcfk
6413-4 c: rjcc
6424-8 t: ttttzfttc
64310-11 g: ggzggngbzgg
64414-16 w: qzqwdwbcwwwmllndzlsm
6452-4 z: zzpz
64612-13 g: gwxpwcbsvwgtthn
6471-4 b: bbbbmzc
6485-7 f: cnxlfdffmt
6493-4 z: znsdz
65010-13 c: mrckljhmrcmnc
6512-9 m: dxmdhndrwpmpgc
6527-16 z: zzzzzzzzzzzzzzzzz
6531-3 j: jjjjjjjjjjjjjjjj
65415-18 g: mmglvtgzggzgnggggg
6554-10 c: cccncccccz
6561-8 n: mnnnnnntn
65710-13 l: llllllltzhlvvld
6582-3 r: gnnd
6593-7 v: vcnfzzbd
6606-7 p: pprpctdp
6615-8 g: gggggqgggg
6621-13 f: wfffdfpbfjlfhb
6633-8 j: dmjjkqwj
6644-10 j: vfjhnswwwtzlfvmcdn
6652-4 v: bnjd
6664-7 w: btwwlfwkwzmzhhlsvs
66714-15 g: gggggggggggggpgg
66810-11 w: zwwwwwwpwgrww
6692-3 b: dbbcgwqfzlhwcbs
6701-9 f: qfpfvffffffmfxbcpf
6719-10 t: tttbpttttmttcnt
6722-3 l: lgll
6738-9 s: vzgvjsnns
6746-8 w: wwwdwsbtswrww
67513-14 h: dhhhxhdjnvhrhrflhh
6767-8 d: dddddvjd
67714-15 l: lllqlllllllllnlxlh
67812-13 d: ddddzdjdddhhkdd
6799-14 p: pvtplhjvpzdvqjqvh
6809-10 r: rjrrrrrtrrrr
6816-8 g: gjjgfwgg
6829-14 j: jjjjjjtjcjjjjhjjj
6838-9 q: phxjqqnqq
6845-6 k: lkkkkk
68514-15 x: xxxxxgwxxxxxxtwxq
6861-4 x: xqfxx
6871-8 m: mmgmnmvm
6882-3 n: hnwr
68914-15 z: zzzzzzzzzzzzssz
6902-6 p: pspppp
6911-6 z: zzxzzx
6929-18 z: zzzzzzgzzzzzzzzzzgz
6936-11 z: wzhtdzzfxjz
6943-4 v: vzvv
69516-19 q: qqqqqqqlqqqqqxqqqqq
6962-4 v: vvhvvvv
6972-9 p: lpxppwppppgppspb
69811-12 m: mmmmmmmmmmndm
6998-9 v: vvvpjvvvpvv
70016-19 k: kkkkkkkkkkkkkkfkkkk
7019-10 z: zxlzfzczzzczrdn
70212-18 p: ppppppppppbjpplpphp
7031-3 p: pvpppx
7041-2 x: vxlx
70510-12 l: lllnlllllwlll
7064-5 b: bphwg
7077-10 c: gcjjpprxxjcwvk
7086-9 l: llwqklmpxlszgzlvl
7099-15 s: fsxsscswksvrmsh
71015-16 q: lqxqqwqpqwptqqmg
71110-13 r: xmpmqrdjkrzkpzc
7123-5 c: kcbcclt
71317-18 f: jffffsffffffffffbsff
7141-3 t: vqcqdmmgc
7151-2 n: qnnn
71616-18 n: nnjzhnznnnxlrmmnsn
71713-19 q: srxlcdznhbfxqtsqtsqx
7182-7 m: vmmmnjmmmmz
7196-7 v: vlvmjvg
7207-15 k: xnpkbtzwgntptwkgmxm
72115-19 g: wggggggggggsggkggxg
7228-17 h: hhhhhhhwhhhhhhhhhh
7232-5 w: kwwwww
7244-12 k: kkkqkkkkkkkqkkkkkkk
7257-11 d: hddcndsgddgz
7262-7 t: tdzxnth
7271-7 z: lzzcrvz
7285-10 h: shvchmxxdh
72912-13 f: kffwgtfsssfqnvff
7301-9 b: mbbbbtxbrbbc
7314-12 r: rnfvrprrrrzrrr
7322-6 p: qzltppwqljg
7332-4 w: hwdxwmmqphfkhthczx
7343-4 r: rrwj
7353-4 b: lbbbpldfj
7364-12 g: gggggggggggggkv
7374-5 r: rrqjtrrr
7384-8 n: nnnrfhnfn
7394-11 h: lrnxkwkbhgnhh
7401-8 l: lvjlhbffl
7416-10 g: ggtgghghghpfgg
7421-2 s: szsss
7433-6 s: dszxsdsssskssbs
74411-14 x: xxxncxxxxxxxxq
7455-10 m: mtmmmmmmmdmm
7461-3 r: qrgr
7472-7 m: gmhmmtd
7481-3 c: cccswmjcmnm
7492-9 x: qbcdsxxlx
7506-7 s: nsswzssv
7511-14 m: trmlzmsmgqmmmnfdsmtm
7525-7 d: cdddzdtdd
7533-4 k: tvczkxvvrw
7542-8 s: slvmswvs
75510-16 p: pppppppppgpptpptpp
7562-11 l: jqxsjlvpzkgzjdmt
7574-7 t: ttmtpttp
7584-11 r: twbrxccwcrtffpnv
7596-8 k: kkckkkkqkk
76010-12 v: vvvvvvvvvvvv
7614-6 k: gqzkkk
7623-4 r: rrmxr
76312-13 p: npgppsppppqnw
7641-16 x: mxxxxxxxxxxxxxxv
7655-6 l: llllll
7661-4 k: bkkckkkkk
76710-11 v: vkvtvkjltmlvtxlnlrsj
7683-11 h: mzhrhlhhhhhwl
7695-6 p: pppppp
7701-17 m: mmmmmmmmmmmmmzmjmmmm
7712-6 v: cvvcvfbgcvvvcq
7724-7 n: nnsnnwj
7732-3 k: xvkxkksvb
77416-17 x: xxtxxxxxxxxxxxxxr
7751-13 w: lwwwwwwwwwwwxw
7763-14 d: ddjdddbddddddtdddd
7774-10 g: jrxggnqmjg
7781-3 b: bbfbbbbb
7794-5 d: pdhdm
7805-7 d: mvdsdnd
78117-19 m: mlmmmmmmmmhmmmmmmmm
7824-6 g: gtlgxggggsgc
7836-7 m: mzvmhglmmmpmmxf
78410-14 j: jrjjjxcjjtjjjhpljl
7859-15 w: wwwwlwwwwwwwwwjwwdw
7861-3 g: wtzgjgr
7875-7 m: dmmmtmm
7881-8 g: ggkdgpggg
7895-6 x: xnjhmx
7901-7 b: bbbbbbbfbbbb
7913-11 n: mnnnngnnnvnnqnnvn
7922-3 l: jglgdrczl
79312-14 f: tffpffsmfffffg
79410-13 d: mndmdwdxjdxpd
7959-10 m: mlmmmmmmzvxm
7966-8 l: ptpjwltl
7977-8 r: rrdrprlqrr
7988-9 n: nnnnnnnrc
7996-7 p: ppppphn
8004-8 t: smtptgwtmlttw
8014-10 j: jsjjjjjjjj
80215-18 k: kkhwkkkkkkkkkkkkkk
8031-2 s: sksxb
8042-10 g: sggchblktg
8058-12 r: rrrrrrrrbwrr
80613-14 v: vvvvvvvvzvcvvvvv
8073-4 p: kppp
8084-14 m: mmmsmmmmmmmmmzm
8095-6 n: kndmnnnnpnznjqb
8103-10 d: xlddcdbdlddpqdkdl
81117-18 n: tnmcvdcznnnfnznldt
8126-11 g: wgbgzgggggg
81316-18 z: zzzzzttzzzzzzzzkzq
81411-13 x: pxxlgmtvbjrlb
8152-13 p: bmphpwxpsmmthppprdk
81614-16 r: rmrrrrrdmrrrrztrjr
8171-5 x: xdxxx
8181-3 d: dgdddfzddfd
8191-9 m: ddfmgwfgf
8207-11 x: xwnqqtxdmns
8215-6 v: ffvvvv
8223-15 g: dggggggzggggggb
82310-13 p: pptpppkdpwcngppf
82411-12 x: xxngxbxxdxxxxnzxbxx
8253-4 n: nxqc
8261-2 x: dvxxx
8274-5 h: zhvhh
8283-5 j: jqpjj
8292-7 f: ffffffpfz
8308-10 k: kkkkkkkkkk
8315-12 x: xxtxxxxxxxxxxx
83212-14 c: cccccccccccccc
8338-9 s: vhlssssws
8341-4 k: dqkk
8354-10 r: rrbrrrrrrdrr
8361-3 r: hqljfr
8378-12 c: qcccccszgjgcccddccw
8386-14 m: mmmmmxmmpmmqmcmmdm
8395-6 r: mwrrdtm
8401-5 t: rdjtts
8416-14 c: gpcbczvfbcbcckblzc
8425-6 w: wxwwww
8433-4 p: rjppp
84410-13 t: ttttttctdtgtttts
8453-14 c: cvlcpqscwgzgxzxvkmh
8463-7 h: kxqfwfddhllhj
84710-18 r: mdqrrmrdxkkvxftrrr
84813-14 m: cmmmcgmmmmhvmm
8492-7 h: khvhhjhhjbv
8505-9 r: rrrzgrrrlr
8511-8 c: gccccccsccc
85215-17 v: vvvvvvvvvvvvvvdvn
8539-13 v: vbvdgpvjvhvhwxv
8546-9 z: zzxbqznzqjzh
8553-6 r: rrrrrrrrrrrrrrrrrrrr
8563-4 x: nxxxxst
8577-10 q: qqqqqqfqqf
8589-10 j: jjbjdjqcqw
8599-13 z: dhzzzzzzzzzwxkzzzzjk
8603-9 q: pqxgqqcqqjql
86110-11 h: ljhgjwhzdrhhhh
86218-19 v: vvvvvvvvvvvvvvvvvvvv
86310-11 l: vgxrhvtfblwl
8642-3 v: rvvvvpj
8658-9 c: smchcscccdmf
8662-3 n: nqmnn
86715-17 x: xxxxxxxxxxxxxxqxrxk
86811-14 j: jjjjjjjjjjljjvj
8697-9 z: zvzzmzjkfbvzzczczlzm
8702-6 z: zzzjzjzzmfzk
8719-11 m: mvcmmbmlzrmmz
8726-7 r: rrrrrrr
8733-6 c: jtcfscccvvf
8742-5 s: cssbntxggkwvwnchn
8758-10 x: xxsxjzxqxx
8766-7 n: ndnnnbg
8779-16 j: jgzxxsmljbhbttqjw
8783-4 k: gjsk
8799-10 q: qqcrqqqpqq
8802-4 t: thtt
8813-4 w: wrfxww
8829-14 v: vvsvvkqgzvmvvvvvlvvv
8839-15 m: mmmmkmxdmdmmhmmwjw
8843-9 b: bbbbwcwbb
8853-6 c: ctdccs
8867-8 k: kkqrkkkk
8875-7 l: llmllcqjljlh
8885-7 w: wnzbwgw
88915-17 f: fcffffffffffffffpf
8901-2 t: tttft
8911-7 n: zctqhnxvbn
8923-8 z: hdpqzzzlzsw
8933-15 l: llslllllllllllml
8948-19 w: rwtbwrwjwtwxcclthdw
8954-5 g: zggggg
8965-14 v: vvvvhvvvvvvvmlvv
8971-7 l: mlgxllpgl
8982-12 b: mvwbfjcddqjb
8991-3 m: qmzm
9002-3 r: rrrrrffr
9011-7 x: xxsgxxv
9028-10 d: tdrrqdzcdddddxddl
9032-4 n: crnnfdcnnnzn
9043-4 n: nnnz
9059-10 z: zzzzqfzzzzz
90610-16 n: nnnhmnnznsnntnnc
9079-16 s: vssssbsscssssssjss
9089-13 w: wwkwwwqqwvwwww
9094-5 d: hkdhwddtdkqwvl
9103-4 l: llll
9114-5 f: ffzffftld
9127-9 d: ddddddddgd
9136-7 t: ttthptttqxlfddstsq
9145-16 c: clhwccvlnmttjqcc
9154-5 k: pkkkk
9167-11 m: xwmmmmchmmt
91716-17 n: nnnnnnnnnnhnnnnrm
9185-8 b: bbbbbbbbb
9191-4 s: jsss
9203-4 h: rhhhtjwfvdhz
9219-10 r: rrrprlrwrrw
9221-6 n: nnnnnkn
92318-19 p: ppppppppppppppppppp
9244-5 l: ljlrcl
9253-7 m: mmmmmjmdmtm
92612-13 b: bbbbbbbbbbbvf
9276-11 g: hcghdwfpcqk
9284-6 q: krpfvw
92910-13 j: jsjkvjjjjjzjjfj
9305-6 n: lcnnnnzndqkfnsq
9312-4 j: nvdj
9322-5 p: hppnpmpq
9332-4 w: wnwbw
9342-7 f: fwfxfmfszmcxf
9356-8 d: dqrdbsnjds
9361-3 f: ffffffmff
9375-8 s: lnbwqnkxws
93810-12 n: nnnnnnjnnnnnjcn
9399-12 c: pccvnbccxrncrcclccc
94014-18 s: ssssssssslsssstsssss
9413-6 l: lldllczl
9426-11 g: gggggwgggghg
94311-12 h: chhhmjhzhqfh
9445-6 n: qhnvcw
9456-7 k: nckkkkmnkkkzkkk
9466-8 d: wddgbdpdzdqxrwddjlz
9471-3 h: qghp
9483-5 j: mnjjjxjkgnrdzjbtdr
9491-9 g: gfgcgggxgjggggggf
9508-20 b: vptprmjbwwtnbhwjtnjb
9517-8 j: jjjjjjjj
9523-4 t: tqtt
9535-10 f: fffzbxxszjjvjfhn
9543-4 t: tttttttbtt
9554-7 p: wjrgpnj
9561-9 g: pgzllxgfg
95714-15 c: cccccccccccccqm
95811-12 b: btmcbzbnzcbbxr
9595-6 h: hhhhhhh
9601-6 s: nssmsssss
96111-12 d: ddddddbddthfdddd
96211-13 j: jtjjjjjjpjjjjwfjj
9632-4 j: gjjj
9643-9 v: vvgvvvvvrv
9651-2 l: tqjjljxcsl
9665-6 q: nqqqqr
96712-16 h: hkhhhhhjhhhhqxhhhhhh
9682-6 p: lpppkpbpzg
9692-7 v: vzvvvvfv
97013-16 g: ggggggggggggwggb
9713-14 j: ghsjjcgmkwsdchlslpf
9721-3 s: ssplw
9737-8 x: xxxnxxxxxxx
9743-4 h: zghhvtwtmlplvxxhsbf
9754-5 g: sqgsnf
97614-17 z: zzzzzzzzzzzzzwczc
9771-2 z: cpzzzzk
97816-17 s: ssssssssssfsqssss
9793-9 j: jvjjfjdjjjjjh
9801-6 v: vtvrvvj
9814-8 c: clzcccccccf
9824-5 d: dwldw
9832-4 l: lwlrllllllll
9846-11 s: zxgcsdxkrcns
98514-17 r: vrhvhrprrfrsrrrrr
9863-6 p: mrcztppnl
9874-6 w: wwwwwwwwww
9881-6 w: zwjccrqpwmnthz
9892-7 t: mnjntdcq
9901-5 b: bbjbbbbb
99110-11 w: wwwwwtwwwwww
9924-6 d: dddxdfd
9932-4 f: fjfff
99413-15 b: vbbbbbbbbbbbbbb
9958-9 n: ncbnnnnnn
9962-6 d: hdfphnnmbbdt
9971-4 f: wffz
9987-15 f: ffsffffffffffvzff
9998-10 c: zchrckkcqcr
10002-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 @@
1use strict;
2use warnings;
3
4open my $fh, '<', "input" or die "no input present, $!";
5
6my $valid = 0;
7
8while (my $line = <$fh>) {
9 chomp $line;
10 if ($line =~ m/(?'first'\d+)-(?'second'\d+) (?'char'\w): (?'rest'\w+)/) {
11
12 my $first = $+{first};
13 my $second = $+{second};
14
15 # https://www.effectiveperlprogramming.com/2010/12/count-the-number-of-things-in-a-string/
16 my $count = () = $+{rest} =~ /$+{char}/g;
17
18 $valid++ if $count >= $first and $count <= $second;
19 }
20}
21
22print("$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 @@
1use strict;
2use warnings;
3
4open my $fh, '<', "input" or die "no input present, $!";
5
6my $valid = 0;
7
8while (my $line = <$fh>) {
9 chomp $line;
10 if ($line =~ m/(?<idx_1>\d+)-(?<idx_2>\d+) (?<char>\w): (?<rest>\w+)/) {
11
12 my $first = substr( $+{rest}, $+{idx_1} - 1 , 1 );
13 my $second = substr( $+{rest}, $+{idx_2} - 1 , 1 );
14
15 $valid++ if $first eq $+{char} xor $second eq $+{char};
16 }
17}
18
19print("$valid");