day 2
This commit is contained in:
commit
dc0f15fe6e
250
02/input.txt
Normal file
250
02/input.txt
Normal file
@ -0,0 +1,250 @@
|
|||||||
|
ivyhczwokexltwhsfamqprbnuy
|
||||||
|
ivjhcjdokexltwwsfamqpabnuy
|
||||||
|
ivjhczdokebltwgsfydqprbnuy
|
||||||
|
ivjhcadokexftogsfamqprbnuy
|
||||||
|
idjhczdokexltwgsfacqprbnuh
|
||||||
|
ivjhgzookexltwgsfamqjrbnuy
|
||||||
|
uvjhctdokexltwosfamqprbnuy
|
||||||
|
ivrhczdokexltwhzfamqprbnuy
|
||||||
|
ivjhczuxkexltwgsfamqprbney
|
||||||
|
ivjhczdokemltwgsfadnprbnuy
|
||||||
|
ifjhczdokexltwgsfamqprbkuf
|
||||||
|
ivjhkzdokltltwgsfamqprbnuy
|
||||||
|
ivjuczdhkexltwgsfamqprtnuy
|
||||||
|
ivjhjzdxkexltwgsfapqprbnuy
|
||||||
|
ivlhczdoxexltwgsfamqprgnuy
|
||||||
|
ivjhczdoknxltwgssamqsrbnuy
|
||||||
|
ivjhczdokexltwgswadqprbruy
|
||||||
|
ivjhczdokexthwgsfampprbnuy
|
||||||
|
uvjhczrozexltwgsfamqprbnuy
|
||||||
|
ivolczdokexltwgsffmqprbnuy
|
||||||
|
ivjhczibkexltwgsfamoprbnuy
|
||||||
|
ivjhczdokefltmgsfamqprbouy
|
||||||
|
ivjhczdobexltngsfamsprbnuy
|
||||||
|
ivjhczdokexltwvsfxqqprbnuy
|
||||||
|
dvjhczdokexucwgsfamqprbnuy
|
||||||
|
kvjhszkokexltwgsfamqprbnuy
|
||||||
|
ivjhczdokexrtegsfamqprbnus
|
||||||
|
ivjhctdokexltwglgamqprbnuy
|
||||||
|
ivjhczdozexutwgsfamqdrbnuy
|
||||||
|
ivjhczqokemltwgsfakqprbnuy
|
||||||
|
uvjhczdokexlqwgsfadqprbnuy
|
||||||
|
ivjhczdohexltwglffmqprbnuy
|
||||||
|
izjhczdokexltwgsfamqprbsqy
|
||||||
|
iajhczdokwxltwgjfamqprbnuy
|
||||||
|
ivjfczdokexllwgslamqprbnuy
|
||||||
|
ivjhczdoyexltwgsfamqdrbnxy
|
||||||
|
ivjhczdokekwtwssfamqprbnuy
|
||||||
|
ivjhcodokexltwgsfamqirxnuy
|
||||||
|
ihjhhzdokexltwgsfamqlrbnuy
|
||||||
|
ivjdpzdokexltwfsfamqprbnuy
|
||||||
|
ivjhcpdokexltwgsfamqqrbruy
|
||||||
|
qvjhcziokexltwgsfamqprbnny
|
||||||
|
ivohczdomexltwgsfkmqprbnuy
|
||||||
|
ivjhczhokhxlywgsfamqprbnuy
|
||||||
|
ivjhczdokexltwgmffmqprbruy
|
||||||
|
ivjhczdokqxltwgcfamqprbnyy
|
||||||
|
ivjhczdokepltwgsfamcprbnay
|
||||||
|
ivjhczdokexltwgseamqpmbnua
|
||||||
|
ivjzczdokexltwgszamqplbnuy
|
||||||
|
ivjhczpokexltwgvfgmqprbnuy
|
||||||
|
idjhczdokexltwgsxamqprbndy
|
||||||
|
ivjhczdxkexltwgcgamqprbnuy
|
||||||
|
ivjhczdckexatpgsfamqprbnuy
|
||||||
|
ivjrczdorexltwgsfamqprbnvy
|
||||||
|
ivjoczdokexltwgswamqprbtuy
|
||||||
|
iylhczdokexltwgsfamqpxbnuy
|
||||||
|
imxhczdokkxltwgsfamqprbnuy
|
||||||
|
ivvhczdoktxltwgsfamaprbnuy
|
||||||
|
ivyhczdokexltwhsfayqprbnuy
|
||||||
|
ivjhcrdokexltegsfamqprbnum
|
||||||
|
rvjhezdokexltwgsoamqprbnuy
|
||||||
|
ivjzczdokexlbwgsfkmqprbnuy
|
||||||
|
ivjhczdokelltwgsyamqprbnoy
|
||||||
|
ixjhczdorexltwgsfamqprbuuy
|
||||||
|
ivjhczpokexdtwglfamqprbnuy
|
||||||
|
ivjhczdokexltwgfgamcprbnuy
|
||||||
|
ikjhczdokexltwgsfamqirbnux
|
||||||
|
ivjhczdopjxltwgsfamqprbnny
|
||||||
|
ivchczdokexltwgniamqprbnuy
|
||||||
|
ivjhczdooeqltwgsfamqprbniy
|
||||||
|
ivjhcldonexltwgbfamqprbnuy
|
||||||
|
ixjhczdokehltwgsfamqprbnuf
|
||||||
|
ivjhczdckefltwgsfamqppbnuy
|
||||||
|
ivjhczdoqrxltwgsfamqprbnun
|
||||||
|
ivjhczdokcxltwgmfarqprbnuy
|
||||||
|
ivjhcziorexltqgsfamqprbnuy
|
||||||
|
ivjhwzdokexltwgnfamqprbcuy
|
||||||
|
ivjhczdoqexltwgsfazqprunuy
|
||||||
|
iijhczdokexltwgsyamqprbnug
|
||||||
|
ivjhczdokexltwgxfamhprbnry
|
||||||
|
ivjhczdakexltwgsfaeqlrbnuy
|
||||||
|
ivjhqzdokehltwgsfampprbnuy
|
||||||
|
ivjhczdokexltwlsfpmyprbnuy
|
||||||
|
ivjhfzdoktxltwgsfamzprbnuy
|
||||||
|
ivlhvzdokexltwgsvamqprbnuy
|
||||||
|
ivjhczdbkexltwgsaamqprfnuy
|
||||||
|
ivahcedokexltigsfamqprbnuy
|
||||||
|
cvjhczdokexltwgsfamapibnuy
|
||||||
|
ivjhczkokbxltwgsfbmqprbnuy
|
||||||
|
pvjuczdnkexltwgsfamqprbnuy
|
||||||
|
iyjhczdckexotwgsfamqprbnuy
|
||||||
|
ivjhzzdokvxltwgsfamqprbnuo
|
||||||
|
ivjhczdobexltwgsxamqprbnry
|
||||||
|
ivjhczdokexltwgsfaprprbnub
|
||||||
|
ivjhczdokexltwgofarqprbkuy
|
||||||
|
ivjhczdokexltwgbfymqprbnhy
|
||||||
|
ibjhczdokexltwgsfkmqpvbnuy
|
||||||
|
ivjhczdzkexlywgsfacqprbnuy
|
||||||
|
hvdhczdokexltwglfamqprbnuy
|
||||||
|
ivjhczdokexrtwgsfamqprbsuh
|
||||||
|
ivjhczhokexltngsfamqpjbnuy
|
||||||
|
ivjhcsjokexltwgsfaeqprbnuy
|
||||||
|
ivjmczdokexltmgsfamqpbbnuy
|
||||||
|
wvjhczdokexltwgsfamkpkbnuy
|
||||||
|
icjhpzdoaexltwgsfamqprbnuy
|
||||||
|
ivjmczdhkexltwgsfzmqprbnuy
|
||||||
|
ivjhczdokexytwgsfamqprbwug
|
||||||
|
ikjhczdjkexljwgsfamqprbnuy
|
||||||
|
ivjvcdmokexltwgsfamqprbnuy
|
||||||
|
ivjhazdorixltwgsfamqprbnuy
|
||||||
|
ivchczdokexltwgsfamzprenuy
|
||||||
|
ivjcczdokexlttgsfamqpmbnuy
|
||||||
|
ibchgzdokexltwgsfamqprbnuy
|
||||||
|
ivjhczdokepltwgsfamqpeenuy
|
||||||
|
ivjnwzdokexlrwgsfamqprbnuy
|
||||||
|
ivjhczdokexitwgsfadqlrbnuy
|
||||||
|
icjhcrdokexltwgsfamqkrbnuy
|
||||||
|
ivngczdokexltwgsfamqprbyuy
|
||||||
|
ivjhuudokexlvwgsfamqprbnuy
|
||||||
|
ivjhczdnkexltwgsfhmqpxbnuy
|
||||||
|
itjhczdokexltwvsfamgprbnuy
|
||||||
|
ivjhcddokexltwgsfakqprbnny
|
||||||
|
ivjhuzdojexltwfsfamqprbnuy
|
||||||
|
idjhczdokexltwgsfamqukbnuy
|
||||||
|
ivjhczdokexlzigsfamqprbngy
|
||||||
|
ivjwczdokexltwgufamqprbnuo
|
||||||
|
iijhczdokexltwfsfadqprbnuy
|
||||||
|
ivjhczdukexdtwgsfamqpsbnuy
|
||||||
|
idjhczdokexllwgssamqprbnuy
|
||||||
|
zvjhczdokexrtwgsfamqplbnuy
|
||||||
|
ivphczdofexltwgefamqprbnuy
|
||||||
|
ivhhczdokexlpwgsjamqprbnuy
|
||||||
|
ivjhczdovexltwgsfamqprhnuj
|
||||||
|
ivjhczdoklxltwgseamqprlnuy
|
||||||
|
ivjhcqdokexltngsfamqprdnuy
|
||||||
|
ivjhczdoifxltagsfamqprbnuy
|
||||||
|
izjhczdokexltwjsramqprbnuy
|
||||||
|
psjhczdokexlgwgsfamqprbnuy
|
||||||
|
ivjhcadokexltwgsfsmqwrbnuy
|
||||||
|
ivjhczdokexltwgsfawqiibnuy
|
||||||
|
ivjhczkokexhtwgsfamqprbnuk
|
||||||
|
ivjhcmdukexltwgsfamvprbnuy
|
||||||
|
ivjlczdokexltwgsfamquibnuy
|
||||||
|
ivjhczdokexntwgyfamqprbniy
|
||||||
|
ivjhczdokexltwlsfafqprbnuc
|
||||||
|
ivjhczdosexltrtsfamqprbnuy
|
||||||
|
ivjhcznokexbtwgsfafqprbnuy
|
||||||
|
ivwtczdotexltwgsfamqprbnuy
|
||||||
|
ivjhvzdokexltigsoamqprbnuy
|
||||||
|
ivjhcmdokexltwasfamqirbnuy
|
||||||
|
ivthczdokexltwgsfaydprbnuy
|
||||||
|
ivjhwzdskexltwgsfamqprbnus
|
||||||
|
icjhczdosuxltwgsfamqprbnuy
|
||||||
|
ivjhczdokexltwgstamqbrmnuy
|
||||||
|
iejhczuoktxltwgsfamqprbnuy
|
||||||
|
ivjhczdokeqltwgskamqprbniy
|
||||||
|
ivjhlzdokexltugsfamqprbpuy
|
||||||
|
iwjqczdckexltwgsfamqprbnuy
|
||||||
|
ivjhwzdokexluwgsfxmqprbnuy
|
||||||
|
ivjhczdokexltwgwfwmqprbguy
|
||||||
|
gvjhczkokexltwgsfgmqprbnuy
|
||||||
|
ivjhczdoyexlhwgsfamqprbnoy
|
||||||
|
cvjhczdokexltwgsfomqprinuy
|
||||||
|
vvmhczdokexltwgsfamqprbnun
|
||||||
|
vvjhczdokexltwgsftmfprbnuy
|
||||||
|
ivkhckdokhxltwgsfamqprbnuy
|
||||||
|
iyjhczdkkexltjgsfamqprbnuy
|
||||||
|
ivlhczdokexltwgsfamqyrbhuy
|
||||||
|
tvjhmzdokexltwgsfamqorbnuy
|
||||||
|
ivjhczdokexltwvsfamqprbnxi
|
||||||
|
ivjhczdowexltwgswamqerbnuy
|
||||||
|
wvjiczdomexltwgsfamqprbnuy
|
||||||
|
ivjpizdokexltwgvfamqprbnuy
|
||||||
|
ivjhuzdokexlzwgspamqprbnuy
|
||||||
|
ivjhczdokeyltwgkfamqprdnuy
|
||||||
|
jvjhczdokexlnwgsfamqirbnuy
|
||||||
|
ivjheidokexltwvsfamqprbnuy
|
||||||
|
mvjhczdokexltwgsfamqyrsnuy
|
||||||
|
ivjhazdykexltwgsramqprbnuy
|
||||||
|
ivjkcodokexltwgsxamqprbnuy
|
||||||
|
ikjhczdoktxltwgpfamqprbnuy
|
||||||
|
ivjhyzdfkexmtwgsfamqprbnuy
|
||||||
|
ivohczdokexltugsfamqprynuy
|
||||||
|
ivjkczdqkexltwgshamqprbnuy
|
||||||
|
ivjhczdokexltwgskamqynbnuy
|
||||||
|
icjhczdokexltwgofamrprbnuy
|
||||||
|
ivjhlzdokealtwgsfamqsrbnuy
|
||||||
|
ivehczdybexltwgsfamqprbnuy
|
||||||
|
ovjhczdokexltwgsfamqirbnuo
|
||||||
|
ivjoczdokexltwgsfamqurbnty
|
||||||
|
ivjmczdokexltwgsfrmqprnnuy
|
||||||
|
ivjhczdowpxltwgbfamqprbnuy
|
||||||
|
ivjhczdokexltwfsfamqkrgnuy
|
||||||
|
ivjhwzdokexltwgsfavqprbnuq
|
||||||
|
jvjhczdokexltwgsiamqprbnny
|
||||||
|
ivjhlzdouexltwfsfamqprbnuy
|
||||||
|
ivjhczdokexltwgsfamqbrbnlv
|
||||||
|
iwjhczdokexltwgsfapqprbnqy
|
||||||
|
idjhczdokexltwgsaamqrrbnuy
|
||||||
|
ivjhjzdopepltwgsfamqprbnuy
|
||||||
|
ivjmczdokejltwgsfamqpbbnuy
|
||||||
|
ivjhczdokexltwgsuamdprvnuy
|
||||||
|
injhczdokexltwgefamqurbnuy
|
||||||
|
iujhczdokexltwgsaamqjrbnuy
|
||||||
|
ivjhczdokexltwgvfaaqprbnly
|
||||||
|
ivehczdokexltwgsfamqppbnui
|
||||||
|
ivxhczdodexltwgsfamqplbnuy
|
||||||
|
ivjhczfokexltwgsfamqpwbauy
|
||||||
|
ivjhcztwkexhtwgsfamqprbnuy
|
||||||
|
ivjeczdokexltygsfmmqprbnuy
|
||||||
|
ivjhchdokexltwgsmameprbnuy
|
||||||
|
ivkhczdoklxltwggfamqprbnuy
|
||||||
|
ivjhczdzkexltwhsfamqprjnuy
|
||||||
|
ivjhcedokeultngsfamqprbnuy
|
||||||
|
ivjhczdokexvtwgseabqprbnuy
|
||||||
|
ivjhczdooexltlgsfamqpibnuy
|
||||||
|
ivjgczvosexltwgsfamqprbnuy
|
||||||
|
ivlhczwokexltwgsfamqmrbnuy
|
||||||
|
lvjhczdokexutwgsfamrprbnuy
|
||||||
|
ivahczdokexpdwgsfamqprbnuy
|
||||||
|
ivjhcznokexltwhsfamqpnbnuy
|
||||||
|
ivjhczdpkyxltwgbfamqprbnuy
|
||||||
|
ivjhnzdokexltwgsftmqprinuy
|
||||||
|
ivihczdokexltnhsfamqprbnuy
|
||||||
|
ivjhcbdokevltwgsfamqprbauy
|
||||||
|
hgjoczdokexltwgsfamqprbnuy
|
||||||
|
dvjhczdckexltwgsfamqpybnuy
|
||||||
|
ivjhcadokesltwgsfsmqwrbnuy
|
||||||
|
ivjhwzdokexlttgsfamqprbney
|
||||||
|
ivjhcidokexltwgofamqfrbnuy
|
||||||
|
ivokwzdokexltwgsfamqprbnuy
|
||||||
|
ivjiczdokexltwgsfaqqarbnuy
|
||||||
|
ivjhczdokexqtwfsfamgprbnuy
|
||||||
|
ivjhczdokealtwgsfamqerbnqy
|
||||||
|
ivjhczdskexltwgsfamqprznuu
|
||||||
|
ivjhwzdokexltwjsfdmqprbnuy
|
||||||
|
ivjhczaokexlzwgsfamqprbnus
|
||||||
|
ivjhczdokexltwosfamqnrbnux
|
||||||
|
ivjhczdokexlqwgsfamwprcnuy
|
||||||
|
ivjhczdqkexltwgswamqpcbnuy
|
||||||
|
ijjhczdokexnttgsfamqprbnuy
|
||||||
|
ivjhcedckexltwgsfamqprbnpy
|
||||||
|
ivjhczdokeyltwgsfamqshbnuy
|
||||||
|
ivjhczdokexltsgsfamqpmznuy
|
||||||
|
ivjlczdtkeiltwgsfamqprbnuy
|
||||||
|
ivjhczdokexltwgsfkmtprbnby
|
||||||
|
ivjhnzdozexltwgsfamqprbnuc
|
||||||
|
xqjxczdokexltwgsfamqprbnuy
|
||||||
|
ivjhczdokeyltwgsfamqnrbnuw
|
||||||
|
ivjwczgokexltwgsfamvprbnuy
|
4
02/part1.js
Normal file
4
02/part1.js
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
var strs = require("fs").readFileSync("input.txt").toString().split("\n").filter((a)=>(a));
|
||||||
|
var pairs = strs.filter((str)=>(str.match(/([a-z]).*\1(?<!\1.*\1.*\1)(?!.*\1)/))).length;
|
||||||
|
var triples = strs.filter((str)=>(str.match(/([a-z]).*\1.*\1(?<!\1.*\1.*\1.*\1)(?!.*\1)/))).length;
|
||||||
|
console.log(strs.length, pairs, triples, pairs * triples);
|
3
02/part2.js
Normal file
3
02/part2.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
var strs = require("fs").readFileSync("input.txt").toString().split("\n").filter((a)=>(a)).join(",");
|
||||||
|
var m = strs.match(/,([^,]*)[a-z]([^,]*),.*,\1[a-z]\2,/);
|
||||||
|
console.log(m[1]+m[2]);
|
Loading…
x
Reference in New Issue
Block a user