From cdb12dbc28cc441745bad55e384494bc8942586a Mon Sep 17 00:00:00 2001 From: "Elizabeth (Lizzy) Hunt" Date: Fri, 1 Dec 2023 15:49:11 -0700 Subject: [PATCH] Template (#1) * tempalte foo * buff aoc stuff --- aoc | 145 ++ aoc_2023/{day0 => day-01}/main_1.js | 0 aoc_2023/{day0 => day-01}/main_2.js | 0 aoc_2023/day0/input.txt | 1000 -------------- problem.txt | 2000 +++++++++++++++++++++++++++ template/example.test.ts | 18 + template/logs/.gitkeep | 0 template/part_1.ts | 26 + template/part_2.ts | 27 + template/problem.txt | 5 + 10 files changed, 2221 insertions(+), 1000 deletions(-) create mode 100755 aoc rename aoc_2023/{day0 => day-01}/main_1.js (100%) rename aoc_2023/{day0 => day-01}/main_2.js (100%) delete mode 100644 aoc_2023/day0/input.txt create mode 100644 problem.txt create mode 100644 template/example.test.ts create mode 100644 template/logs/.gitkeep create mode 100644 template/part_1.ts create mode 100644 template/part_2.ts create mode 100644 template/problem.txt diff --git a/aoc b/aoc new file mode 100755 index 0000000..4cda9ed --- /dev/null +++ b/aoc @@ -0,0 +1,145 @@ +#!/bin/zsh + +# usage: source ./aoc + +AOCTZ="America/New_York" +AOCSOLS=$([[ $AOCSOLS == "" ]] && echo "$HOME/git/aoc" || echo $AOCSOLS) +AOCCOOKIE=$([[ $AOCOOKIE == "" ]] && echo "/tmp/aoc_cookie.txt" || echo $AOCCOOKIE) +AOCINPUT=$([[ $AOCINPUT == "" ]] && echo "problem.txt" || echo $AOCINPUT) + +if [[ "$OSTYPE" == "darwin"* ]]; then + pastecmd="pbpaste" +elif [[ "$OSTYPE" == "linux-gnu"* ]]; then + pastecmd="wl-paste" +else + echo "Unsupported OS" +fi + +exec_test() { + bun test +} + +exec_part() { + local logfile="logs/out_$1.txt" + bun run "part_$1.ts" | tee $logfile + echo $(cat $logfile | tail -n 1) +} + +get_aoc_problem_path() { + local year=$1 + local day=$(printf %02d $2) + + echo "aoc_$year/day-$day" +} + +get_problem_input() { + local cookie=$1 + local year=$2 + local day=$3 + local out=$4 + local url="https://adventofcode.com/$year/day/$day/input" + echo "Querying $url and saving to $out..." + curl --silent --cookie "session=$cookie" $url > $out +} + +submit_problem() { + local cookie=$1 + local year=$2 + local day=$3 + local level=$4 + local answer=$(jq -rn --arg x $5 '$x|@uri') + local url="https://adventofcode.com/$year/day/$day/answer" + + echo "Submitting..." + local submission=$(curl --silent --cookie "session=$cookie" -X POST $url \ + -H "Content-Type: application/x-www-form-urlencoded" \ + -d "level=$level&answer=$answer") + echo $submission | pcregrep -o1 -M '

([\s\S]*?)<\/p><\/article>' +} + +get_aoc_cookie() { + if [[ ! -f "$AOCCOOKIE" ]]; then + echo "Please copy your Advent of Code cookie to the clipboard, then press Enter..." + read -r + + echo "$(pastecmd)" > "$AOCCOOKIE" + echo "Cookie saved to $AOCCOOKIE" + fi + echo $(cat $AOCCOOKIE | tail -n 1) +} + +aoc() { + local argc=$# + + if [[ $argc -eq "0" ]]; then + echo "/==============================\\" + echo "| simponic's bun ts aoc helper |" + echo "\\==============================/" + echo "+ aoc cookie: get cookie and store to '$AOCCOOKIE'" + echo "+ aoc init : initialize 'template/' to problem solution and" + echo " pull input to '$AOCINPUT' (today by default)" + echo "+ aoc test : run 'exec_test' in aoc problem (today by default)" + echo "+ aoc submit <1 | 2> : submit part one or part two to aoc problem (today by default)" + fi + + cd $AOCSOLS + + local prevcwd=$PWD + local year=$(TZ="$AOCTZ" date +"%Y") + local day=$(TZ="$AOCTZ" date +"%d") + local curr=$(get_aoc_problem_path $year $day) + + if [[ $1 == "init" ]]; then + if [[ 3 == $argc ]]; then + year=$2 + day=$3 + curr=$(get_aoc_problem_path $year $day) + fi + + if [[ ! -d $curr ]]; then + mkdir -p $curr + + cp -r template/* $curr + get_problem_input $(get_aoc_cookie) $year $day $AOCINPUT + + echo "Initialized $curr" + else + echo "Nothing to initialize" + fi + fi + + if [[ $1 == "test" ]]; then + if [[ 3 == $argc ]]; then + year=$2 + day=$3 + curr=$(get_aoc_problem_path $year $day) + fi + if [[ ! -d $curr ]]; then + aoc init $year $day + fi + + exec_test + fi + + if [[ $1 == "submit" ]]; then + if [[ 4 == $argc ]]; then + year=$3 + day=$4 + curr=$(get_aoc_problem_path $year $day) + fi + cd $curr + + local level=$2 + local output=$(exec_part $level | tail -n 1) + + echo "..====.." + echo "Submitting Answer=($output)" + submit_problem $(get_aoc_cookie) $year $day $level $output + fi + + if [[ $1 == "cookie" ]]; then + get_aoc_cookie + fi + + cd $prevcwd +} diff --git a/aoc_2023/day0/main_1.js b/aoc_2023/day-01/main_1.js similarity index 100% rename from aoc_2023/day0/main_1.js rename to aoc_2023/day-01/main_1.js diff --git a/aoc_2023/day0/main_2.js b/aoc_2023/day-01/main_2.js similarity index 100% rename from aoc_2023/day0/main_2.js rename to aoc_2023/day-01/main_2.js diff --git a/aoc_2023/day0/input.txt b/aoc_2023/day0/input.txt deleted file mode 100644 index 143e7a3..0000000 --- a/aoc_2023/day0/input.txt +++ /dev/null @@ -1,1000 +0,0 @@ -kjrqmzv9mmtxhgvsevenhvq7 -four2tszbgmxpbvninebxns6nineqbqzgjpmpqr -rkzlnmzgnk91zckqprrptnthreefourtwo -fouronevzkbnzm6seven47 -zphgdcznqsm2 -4gjnmxtrbflgp71 -4sqvv1cnpn -8sevengzfvjrhnsb6ddb8ninerkgkxthtfkvbcmqs -1seven336 -86one34vvvgdngbt39 -37qdmsqzsq72clfntfxqfrhbxtmfourzcjxfmmfz -3rxgts -skhcdbnrninethree5 -qtkhfdsixnine3bvpcpmjbzjonefivethree3 -seven4six51zlrvqmbgpzplxtk6ptcr -eightczxhbntwo9sl83 -42m1ndvqkz16seven -three9oneeightmqbtwo -vt81pzcchsvz -eight6349jr -8czmcdhjzpsbpjgngdvtxczgsl6th36 -gbddhhhhkgjltwothree57 -pjjlddnvtwo884 -eight5fbcxqlqkplm -cdzgbtxbzl43vvnx -onefxtprsml8fqptvmfthreesix2jbeightwor -nine8twolrpzp -eightvjdzfmqlvceightnine6rlpzkdmk -8tqmjgpfzrnineeightpcfltmzn8 -9nnnh -49onefour7fivezchhjrpbmteightwokrs -7zqhjkjkmm7448 -ninebndfdjbxx9sixltsjbsbgone45kpcln -zhqkrndh5 -p61five44cvgxlgkdseven -8two4kpdxdf -two773t1rcdvxldjrjjq -lnqhgfivebdhpshzfiveonefivejsqzzdxq7 -72vlqqdtwo4xdzlreight7 -27zpq4one -xczj475 -2two3seven9rshkhrjzlv2 -onethree222 -fgeight6threegkjcgzjsfxqksgqvhnrhqf -sixsix8twotwoone -five3qr3two -76zxcjmfq -xchtklzgtwo4lbvnsix -cffmlvmsvnlrtgkstmqsdone9mdlkdgpgeightwogd -3onethree -lrdtfive3six -foursixsixntwoeightthree9zmcmxdn -threefmqjzhzdseight8dfkbstnineeighttlzhjrrgcl7 -7msqnfdbbseventwofivesixrrqgsvxn3 -64dlmxn -3two7vrv2rlqc4nine -rmxqpktrxsixsix634 -tjlrqkj1 -dthree2qhhnbeight5two -zjvvmskpnclgnfnjqr7 -two425zfiveeightjmhznf -113njjz -pdchljrdrlntkdn1pc8 -5twom9hpmbggpeightjnddsfbfpsslvvt -one52ctrkkc -dnbtwovcvxggsbsix219 -fivetjmg5sevenjp -131 -8two9khfl -threethreetcghqbv3rbnsdsk4sevennine -stlttkxrsninetwolftchdtcrpfivelmsmgcdpprqx1qh -sptb46rtrzhcmbf3seven7 -six6tntbjjtsdnczlnbeightlsfplsqq6 -33bldlptj2twosevenxk -five8snvmzqcksix7 -vx49six -three7sixfourfxfcljfdhfl6fgktbsxxrrp -4csxnkvmdnfive2rkkppdqln -dpxhgssggqoneqsvp9eightjvgjrjbd9eight -five6xrrzpdp8five44hqxqbnhxslrjfh -fkpcdb2sltktfghhmxdtxxffssxztjngkthree4 -ndhcxeightthree3 -qrrslbfxklbxnine99lcdtpbf -mvmcg5three -g9one -2ninegdsix3kb9ninerssqbpxgs -blfclcvsh8seventwo8fourznjjssvtlg -ppjdvrxb6eight37cnqmgl9dghbrgrnine -nine6zzcvprthreefive -8fourshkcchfb4sixlv -9tpqqs3qxvqhqmb2 -fljrhvnr722threetpghbftdt -2five2bhhq -18jhhzczcncjnjjx -jgvzzrklz8svzfcgzgggseven -8rdjdvmvcheightrvkpcmjnshhltgghf41 -9three4cffsxc5vhcvdcqtv -86tghvbgthreebkrgf6one -331s2twonep -rtvz4bsdzqeightwodth -3vggdskpcdjfivezpjgrfsqone4z85 -xsftxsrk6threeconesevenncvs8nine -3two2xjrqhrzjv -smdmb1gnlbvkq5nrmqmc -qmmpthreenine7sixczhlfttvphzkbqnm -2rmsrzrbgfjrones -81bmfddsmngkqpq5zsnrcnhqt -two1lzf4two -4sixonetwobzvll -eightpggvssixfivelpm4three1hz -77nine3ninefive7 -oneninerhplrfsxlltwonineszhdqskt9 -lxvtzvjzrreight931 -38z -zfxtdnbqtwoseven1grtpbonenk -fivesixkbzcbvcn76pdclljqsix18 -mrxtfour5vkkmshbmpx2fourtwocpdzkmspqxqrvf -8sevenfiveqvbsnine -onetcdfdtnsthree21four -3zqcbvdftwotttfdvtmtxvhrsixtwo -lqmxvcplqs8bhsixb97 -bmvxz27sixtwocvhtmqlls73 -five1lvzzbv -5oneqdcztvjsqmjf6 -61hjj4onetqlgkllr -sixthree9five -8sevenjqgvlfoureightqnghxptsmc6xmrrnzd -ftjbhzkmvtwooneninenine9sevenqgb -onesixtworksmtc3 -3oner65 -3trmpzmc622 -seven14 -xfgbmsixeight6twocsevenzx6 -3xfdpbpnzzkdrbmrdjrtsrvx37 -nflclprfgnt7 -fiventkj8three4twolkrztseven -19tbgcfourseven -9onefour54seven -hkmfqcnpncfzgrplqq9xqklcb -ninemxhkpspbqn69zmlsbtsevensixfive4 -zvfmhfjflscnqskzgnz74jlxrzm3 -fiveeightvdqtlcfzzrpfd7eightwosn -2nineone7fourninethreeeightsix -ppzf4five9threeseven -six1kzczzlssp84three -885dlzlnnfth1xthreetfm -vqmntfbqgt6four57six5 -mqgmbp3 -threesix3one33seven -46sixptwoone1vnnqlmrr -vvmcjdbjbthreeljznqhh5ztwodj8eight -rxhxx6ninesixeightrxffqrgdqx -ninefive2twoccpxbfcfkzpzhsf243 -fourmvxpxsglhthreeone4jlgsfvxhmmjt1eight -9crfpmnine19four6vkbsdfqn -6ninekxjcfxfthreejpfmtjjbeightone -xknxrr6threeglmjzxpvxmfivethreezn -7five737 -1qstxdtctlk94gtnqvfxmbjtnlkconetlkdmqgrxz -6mgqtjq -4pt -eightjkdl54one5eighttwofour -ttjblsrrl2three -mtwone8onethreecprdhtdgxvdqcptplmsixtwo -tqlkbkjrclseven9lprrcpnxv5zs -seven94mgljdpp8fourfour -htxchhjv6fivethree -gprqsxbnlpls2two -7cjtrglplbm7pdbvjtnineonerqnkt8 -8onezjrxcsfjfoursz2seven -mcrpvnlsix8fourdblmxkhcsx -413zsixhbsxqsplhz -fxqthree99 -onenine46twotwoeight5three -2559nhlsgmknq -sevenonexzxgxkhvln1v -68 -7dcbpcxrm87crhzlmfgk58 -36one81foursevenfourpcnjgf -eightxlbgssonerjfone7ztfftmn2one -eightzkvcbzmceight5four -four79ninefive9sixh5 -2lmggjph5eight -ninetwojhzxf5kpfp -7xvnbfbzpspbfxlpsfrzteightqtvdxnlkp2seven8 -lgblvsjdrnjqfgxlfqh37852six -jtrnmqseven6bqbsdvtzd8ppzmnfmdhkrd -seven5seven676fivelctxb -mctbkczczspvhjfhfivesix3gtnqgkjzc3 -psnhmjsix9 -four4nlrhxflrrtxsixeightwosk -npkxv1grrrrbcsbq67538 -35thrcjrkrdptwo -klsnbcjfpdsrfnsclvnfczjfsixqpdhmmfmcqfive4bmtpctone -zxkncsrktnrv74eighttwonine -jdmfscrdlbj2brseighteight -8ktjrzprt8khpvszbtn -547jrxkhmheightfour -fivetwobpjrjczflhljvdlhl9fivernglhclznzfq -threenzlvrgjonenjbqnlfxhmfourone4mdnld -6jbzzxsix9ninefivebdjmgnzcqqckkl -gone6sevencdmrdbrgh -cssoneighthmmxvqvbfflkjsixone361 -5onekpsevendcrzcgcs7hfvffksqr11 -mfxjbzn9 -6nine4 -cbljjfthree42sixkss5b -36pvqf2cmvvzzdfour8 -ntwone84three -twothree745seven4rsdlbtkoneightrbj -sixfivexfzfjhnzpfv8vz -four8five -bpqrcnj3 -45przmdflrrd -zcbpzhzq2nvjsk -xbrdcttltxnhdfgh33fivepthree -seven5six -3three21tlfxhmlkqx9 -sixkdxjtskknd1nrgbqxjsixbznjqhpfz2 -eighthsfnljrpvqnzpkninebbbjfcshfq5one -nzqbqklqlsixseven56twoonethreeone -nfsixeight5jflseveneight3 -sevensevenp63twoonevxlsgmcfvk -fourgncfdfoursix5mnlhvvml -sixseven66hrqjbkvfrjkmbg -339lnhgjzxbdmfh -pvdnppdt3bxxqvdc -sixmqrcvtzdtsb4 -two9xtsv5 -fourdvt1 -two2cbpqfgszpgbkrrbbnjzh1sixfourtqkns -sevennine6451oneninefourtwonenn -vbxrslkfour7four4qsmlhqvm3 -foureightc3kjvmgtc6eightseven -oneone8bcpmdfcszz4kmrfrd -sixcqpbffcsctccd281sevensixeight -6kxbhq5mnvt9cpbcpzslg77 -cpjfplxvpzqfng4four516three -3eightlnqzzsfhmndftc72 -six2xsdhxgdlfnonenine46sevenseven -qdpdrkrt754 -5twosevenninerg6ninefcvgdtk -six31twox8sevenfourone -8eighthplftwo -41ninejdcvrlplk -9hlnjcjjgdrhvmpvbmdzcmmzjtj2six -3vpvdeighttwo -4sznqlshqmninefourseven -eightthreeseven7 -sevenfourzsfjplg1sevenfour -34zbrvfjqckr8cknzsmpqc1seven7seven -21shklthree59two -7fivefive1gdtf8 -8gzfnxsp6hlpr -nineznbgntvcqjtft24threerkp1jlrdjhlg -3414zzrxbgdvmp -fbjzjffour3lxzmck9 -lsccprmgh1 -33two6ppjhfkcxpthreejm -sixsevenseven33 -3rphhpfdbh1cbmonetwo7five -8hqmcqxcj6two1eighthbkcvvvt -63fourrtfztfvonesevenseven1 -d9ggdsxgnxvdlqhclgstn7 -5fourskvdvntzgmrmsgxqzd -11onenine4eightsix -three4sixkrgfour9fourtwol -8seven2pthreetjxzhrzvxrrfpdfnxsdbshrtnqgmzxsg -twonzbbtjkvtbcxrtszxmdtffkdndzqdfffxckznine5 -two5rljthree64n8seven -fourninetwopnhzzrdmng4 -7vfivemlqgctmzrk -85d7onefour1 -9nine6xddqgvth3six6 -fjszdfnmg7one -m2 -threenqglsjplgbpsixfour7fourninefive -4bszvrqdvninesix6seveneightmfrgnxftkvchk -xnstcjndqzthvczfninendvksmmzzxsjt5 -413f9sevenninesix -21mthreethree -fourmpsgpone6txh376eightwods -onetwo1ninefourfive4twohbb -7hpxlcsh7 -cqtwoneonelgjmxxjkv8 -6threetwotwo93nn -1fmbdzfkkcg -4mqfpxjhmmzfive9sixsevenhckjrrzxqcxnfppjchrh -55xcxtfour -gbpcvzsklsix7eight -83seventwoseven7ninetwo7 -hdstztbpg8twofbtfeightninemzgrx -78kzbqq3686bsnmvnchts5 -689113fbgjtjd -nine1threesevenninefour -6sevenfxrhbxktxfive -3lhpktqh89two4bpheight -85three1dgvtjtg6cdtkhccnhhjfbsxdc -ninebvvhmlkrkllhjsl4five1 -four7pvbvqjxsnfh -882qtlk -8onetk7eight8four4 -cpkjmtpone68twojcmjbfsj7sixtwo -nineslzthree8fqtfckjdkl3 -6five9pkl -1nine48dlxscmvsvpxtcsqhpfxn2 -22fourthree -8dstsdqpffkfivegqmrvqr -6rbdxrvxhsix44 -34three -dnkmhlzq4seven9 -5twohpxxfive8eight -5eightz -jmmzbfk8ltkksfbbskcdrrgfnz21 -eight1zqzr92two56 -bvvmeight4twofour -147gfslhl -dmfz59qsqmxngqxdlbhcxrqbonesix -nine8eight -3ttzjhjdcqk -62nine64ninebktrj15 -mkdfdzxkbfctv47 -vvhsvgjhhonenl7mrhdskxfrr -oneeightgqtp7fiverkvqjtsdeight1nine -eightonethree416gbqgnf -seven144 -twoeightpprtlffourfive5jfjdvcvkd8 -jppmcvlzrg96 -8eightonesevenzcvknjfvdkhrrzfmeight9 -cm97three2 -eightzptfnlgpfive6prrgtjone7vbnfml -threethree1ljbsfqcrsix -njnpsxlfivenine28two -95dneightsevenxdtzbk86 -eightm399lthreeoneqbjjjtwonef -2kzxgfmcseven6qv7eight -bkrkfdfqbbcl84sevenfourpjf -552 -lmccgmxbzfour16zlbrrcgpln -nine7ngkjczfv7ktmvvgqb -qcqtseventwolg8 -foursrbl91rsvtlbqdn6five -sixhvszbkncglchflsevenoneone4fivenmrcgkkvpk -1threetwofive4fiveeight -seven8ghsqbmfzvpzbvvrtmxnhf -4sixfive -3six3sixfourseven5 -hsbprzpjfhflrggjdpdsn23five -zzjqrc7 -737rmjmftkrdkvgs6five -sevenseven81 -four69hdsevensix -jjgqr5pqtwo3one5cgkftvz -seven3threeseven1n6 -7ninenxktnbfiveeighthqmfdlkb -cgrztlh4gsdfjqzqvr2znxzkrjrkmd2eight1 -87eightfourdjbbjkpfpqrqmtfdhjrrfive -qqbglmxcsix8vftfivefvpfivevzvtz -fourpcksixjslx26six7 -mfgleightc15frgtvxdnfour37 -67qbqpsgfcfgsccdt4 -cfpjlxh16 -21sixslgcrgc3two -kmgfivextrdeightnine8sl -6eight62fivekj2clfk3 -fivetwo5three6 -9rzdrhvf4 -62fivetsceightfive6 -847gnmgjjksvdbkklpqsbfbzsffmm -cdtbhbfvgkkh7vhbcqkbjkkcrkhxfive -7onethree3pnsfbhqsgpkgvncs26 -2jkfqkc -sevensixztcfmt88 -nineeightxsfivekfv5 -5one5 -48jjvh4rprbgqzpgr -23six -vztbppbsevenfive88gpmgjkq -2hpnxbssr -2jkgvrsevenntvzdkjzsmnjtcllttbxrnddmjceight -snn2cmvphzbbjlphrdkpqnqssixtwo -threeeightrbeightsevenkcfpn5qjmjbtc -l4four -2two1 -two6zmzvkx5nine -sccjntwo9 -6twothree9nineq -nine749sevensmvggvmfxghvmp5 -4six7sixeight9 -3seventwoxjmh76gllshjm6 -threesevenxkftjzmpc6 -rs4onefhnzkt -6dprgnfhhfhnglddzksbk922 -oneninejgcmvkkhxtsrmgqvninerpqmlmm89 -cdvvddhxc1dtrzjl7nine9rxxkgb -71chdqhbzps8sj -nkqpjmvjkzeightfourthree9sevenfqffcpbdsfks -kjtzdpxnmcvcsixbzcvdnzhnbkn7 -3xnvkmxqhgnzfour5 -4sevenxftdgseven94phsgkflqbpgjs -98jhbgtdlrmjonesix -86625three2one -onefoursixone8bphb6 -eighthkzfnllhk3onethreezfttbtqljd8 -peightcfdlhk9dvdtmbqgcone -ninefqtnjkqvrfbj8nine5 -5vtsntrvfivelpfln3kpkskrbrhbnhrncthree -nine6rpdsrkhzrqthreegkdlhxvzvfzmfive4krbdxjxtjr -eightseven3nine8threethree -sixdvqlt5zp3threemszxfdfiveone -hrtwovfive8ssfmbfsztwodthdlrxtjfive -qmlzrzfj2ccvztbn314 -xvcgcljm6seven6 -two7787fivesnine1 -twodlhhsqseven8twosevenfour9 -gktrrqrffg6sixkpbtldbzj35seven14 -8fivexnxsseven6hjdbbhxlt -cfzmmoneninefour4 -823eighteighthsonenzt -4four6eightkdqljeightthree -5jdpdgml22four -6threefive7eightlzdlcxfvthgrlm7mjkmx -6pldrbjfceightbnktrtqgtrxbt -b5seventhreexl -194zgeight54 -7threethreez1sixthreetwonemr -zcnltvvhjr5vvdvkbnn2 -frcdgbkjmqqzshjkfsixzxkgvmfrkfxqjpbgn5zgsn -sixonenine6 -twotwoninenine6ttxh -nine4three32 -four9three6bgbsqq -seventrseven1three7jxsmnrnlgdf -2sfflb -twohfcr5one -fivetwohgrqtbhx619twonedv -9lcsvtveightninerfxkxvzgpl -sixeight6sixfivethreeoneqj -dfourktxv2msshb8seven12 -sgljk4 -mjgk11eightrlbqpdl -jfdrflpxh489bkjtlj -pftppcr85three -onefivemfsfk3five -5x7twoseven -cqkz8sevenfiveninefnbrht2nine -ninehhm2three986foureight -63ljkvtrtwo9g -dqfour95fiveseven6 -8twozthreetwofive -six91fhzjs -1slknxtrv -psxvkdcsdldxjninejfzblssv5z -bczst26r -btoneight79fninejvhvdccnhtwo -onejcnlqmnhjeight34z5 -clbqcdmzc4mjlxgfournineddtlj6 -1pqqphfgqv5nine -five2tvzshsixfive -8ninedhvzbsvcqgone -bqlgonesix7 -75bltzpqpntwosixtwo -onefxlvlqseven47twoslgffq -nsrnltmf4 -mgshfseven33 -2p24 -jklglqrone3qmjbdgpgzmznd -eight23fkgb2 -187two -vlvncjgmqtwo5771sixftz -lzr9 -chrshzthree5641nine -rnnqlfgfmpscnmgjqvq84 -gzltjddjpb937 -ninethree5 -fouronehvmmfrcgjcnmgcgkjnctnvvqftmdgzds89 -6xjone244 -ninefour8four -49threeq95five -gpeightwothree8lsjgjfourninehseven5 -2kfmzscsvssseveneightsevennine7bfct6 -cbmtfpvsevenvsbbcpkzlqlgsixfghzrnn28 -eightpslnsnnonemqxmmhch42six -2one42bgllqb2 -rjshlfvkkgqzsnttwo3vfourgkplcs -eight96 -16qng4fiveseventhreenine -bldtndftseven9qhhxgmgxd2 -219ninebklfrvppfmzrjnv9g -jvzdghjjv298zkssjc714 -1eighteight -onejkzeight7seven -37five4 -zxqrfpr7lnsqmcrtxkpvxkzjgdsmncvqhvrmnvqzkl -1dxfivepqbvrp3 -krpjpfxbrstwosixkr3dceightwoj -5nineeightjbfzclpdjone2threebddbpxrcjf -rqlfljnktwo57 -tsleightwocdzzmgpxsix4seven -xdvrspvzbx2 -jlbvjskhsnttvzdlhsveightthree9 -5one7jlsnzbbbzxkvrtd -foureight6rpsrtrrzcnvtc8mdqzdxnrsqtcxkskd -gtdxgdj2jlhfltkbmq45zhqcqmzbfninenrvvqcj -seventwoeightonebkcbxqpdhn42 -rrqchvstrmfive3mzmvcrprssbvthrg1twotwo -414nmdkhgfive7seven1llbpxdv -eightfivecflctsdvs262nineseven -sixfive71sthtxdgbbtntqpqnltmf83 -kboneighttwordldqjvvkh4ctntmtvsv -jxmdndmtxhqndfptmnine8three3 -cvmqjmbsm2c3onecvftwofourtwo -one7fkckcjknb2l -onefnbtgpqkghcxlgthreevvlxp94jdrgfvpmf -eightjxktztgfgpnine1threexgfklt -six1llzdnkvn4twotwo -7mfnnptwosix2five -qgzftjcdgs45fivezzvrtjonep -boneightnxggjksdcg8 -2three7mfqvtzlk -fxg8gsffbl84pjvk -sixpj5 -4qbvpfqrnplq2snsfive1hnmkxgszqdseven -9sixcjnqgxtzh4 -2sxmbjxfive2 -9kqcndbqfvs -kvrhxlsbqh7fivethreemmflkfq -khonesix28 -nineeightvhncnbtbp68fone -8eightnine -four71eight -nnvonethreepktq8threed -x373one -flv3nlzxszdbhbdcntp -vm76xr -pksrznbsfg4 -7twobsxjrz1eighttscqzfl -6sixoneightnc -bnvvfour7sixzgxxgctdvfive -qrxoneight7vsdlprzmvneight -5blqzhrdr8ptwoseven7twonefh -j8 -three3938ninethree8 -ctvc2 -sixqdmvtwosixpfour3 -86xqkfzzn -dcjxcj4sevenkglhzcthreesvbkcgxkg -sixcqncsgn6cqfvcl28three -4five6fivetwothreehtpfqvfnvteight -rdcmt3 -4eightzxxfvrp4sixz -sixsevenhcf13qfdnnqml -sevenqzflnkpppvdln5mcztone -twosixqdqdscpzfvzxx4 -seven3six -48four8 -kmsflcqndhnl3onedqfkd7seven -lrtdllmlz3smpvmhsggfjrvheight42fl -vpftvkgzmjl57qgvlsd5 -bkbrkjtpmtwo2gpmkjxnxlfive -eight7three8twonbl -nflq6nine4qrpzclr7 -onefour1hjndfpkndthreetwo2 -gphthpbfeightmsvtdp2six -98two6threemqnscvg3seven -kbrqglhqseven3onetwo13 -rvzddkzftqlnine8hngltmmz -fkeightseven52hptcfivengnrj2 -7sevenfivefourrdbdxh7 -pnjpbvlrd2jfivexflcbseven -four887seven9lc2 -4sixlsxxlqqvpxxhrlhqc -cq5four8 -7threedzdp527eighthxjtzfxv -bdlhgonexrjsfvxghxxchcdd3dpltbbklpvbszm4 -6twonineeightkvhlhlfm -nine6krqqzfive -eight8qzkhfhm -3eightsevennine -eightx38fourf88 -qkjxldk8418n -r15xhtkntq6nxcqvrmfpbvcponeone -ztgf92 -five9vbqlbvkksixtwoone9 -onevjbktjqn4onebxml1gckfssxst63 -fhrhvvst9fivefourxmspzh -3six191dbxtkm -mq5vczknqlqdd4eightvpv -ffourthree4 -four4rvcrlbb96 -95ninelttmq9 -9fivetwothree71five7oneightrt -zvhmfqbzfjtrv19h -57eightvmqfvrjg9 -r2lszmztwo -5919xj -jkmrvxgmzrflqtzkc44onenjftxgm3 -pmjpbdxpgctkninelpgrdjkrrzdpf2 -dxveightwo6psqffzhc5jc -seven5ftzpsvcfzhhtgpdtghpxfmhfjvppkone -822oneoneoneightct -mhzjmppgh7cqpxkmdtlthree1vgkqxcfvpgtwo -78bbrbspqpjkjcprh -eight7hdgm -rpvrvrqtgc87 -6oneqcntnrblvqmm2 -nbsoneight7 -hxfzqzqvsnfive4five44ctbldgcpg -fxvnkksjcz77threemgcgzfrbqzdqtfgnine -qcl45q17 -3gdqztrfjcmz -threebkcvccgsrrp77onetwoccrmtwo -1vmvqqjg58onetwoeight -jknhpr85stqcsfbrbm -three941rlqcpcjmffivecqgzbzjl -44dnnvrlgqsixone -4kkxgggmcbn4bqjrcvdbd4vcgxsvsrk -8fivemgvrcxlhsix4 -twobvccclhj6vtzfhtwofiveninehqsnvcxgfourtwonexrv -3sixvzzdkblrhlgbplqkqeightsnlncvqcxqsix -six9jgsrxknfmfv5four4seven -fourthree1 -1xndxzh -2znktjrsevenrgvc2tcmbbxzj -416nineonebgnninetwoqlpglcvcxc -gone9bjv8 -2gltwof -hhonencqn2dnzhjpfrs3n59 -fourcjmsf3 -mtwothree82four -onefivetwonxv5 -xgvfxzfshr1 -nine15 -21rfhzxlngk2fourfm79 -3cdzbnrvqbbrklrsvxktmghrn6eight -two25gv8sevenkmkprbgzzlkddnine -fiveeightrscknxv1jlhzgjjrxktcvjgqkqqzjqdjgsixvqlhjghsm -33nine39pfgsdtptzbqhfjppp4 -7nftkbhcgtthreethree44 -fivefournrqbl3 -43fzvdptqnq -499four1bdpvvvfnine -9tt -381ldxxmdsgtwonine -pmctnnbdzmxmqrdgcj8sxbpshfzxdnznvtldqj5 -jnhtfjqfive7hvsxqsixnine1 -cnhkqbhtwoonezhdlbxdtdk6 -four5oneonefivehkzcxq9seven4 -onefivexpfour2 -42six2threesixfour5 -8fmqpdhpjv1 -1bnlfgqnseven -tkzcs9ndthree2366 -qttwone5711vjvonesix -nrp62ggmtwo87twofbkpbgtlr -11cgcbfprckdrtzxqlckxhvbjqbslvvnchpkdqfg -1nhkzggnnxhnrbkzjq3nine6one -zvhgzgpvll1dkvbdf5fourfgqqdnp -one1rkpsfddfh6four -hmfxqb9twol4dpfmz4threelkg -xlcmzqgrq7threetwo97 -ntwonedz3dbgngsnshb6bdbtspkzzttvhphqdbz7mpkbpchsf -one586fivethree4ghcgjrqltgeight -1eightone -seven96two2hjxp -9two5bzzfzfive661 -nine12ninefourone8oneightsv -pdlcdbgsc5 -xnpbsr3fourrgjhdzgbxsfbvhhjlthree69seven -qtnxqffour6sixfour9cmnxsrjttonej -psshpgrbhnjhgr7 -428 -7twotwolghmqhkxthreefoursevenzmkzhvs -13hcnzjhsix2 -7four5nxdq3fivesevenfivesix -hzfqzc2fourone34 -7tdr46hrdgjlzkptkqhmsffh -gqc76 -33376 -32three45kvlmcvmmh63slm -842xbtj -lvjzkvqthree2six -64ninentjfiveeightppljppn1d -four8fzvmnfourtwopggbxv -fivexftmjtmxdp7 -sevensjmhskjnmpfnfj55xhgchqcgbsixdrtg -sixccttdcpvklgspscrbronefour3 -foureightnine4jnm -86twofour -fqrpnphnqr98nine7 -fivetwo3 -8dbqjkxjfsgpsixsixeightthreepfmtsnk -9sixonembbhvbmsfseven1 -sixdsvdctxpchvgkggtwocvzvseven8onesix -5lmbjk7nine7szmvnkmz2 -fiveeightfive7xlcszxsevencrxdfzsmccb -lhmvzszvbxxq592 -eight814srjh99 -qdqzvx2sixjp -4fbtjrxs -9ftbf668sixsjninethggtdncsv -4ninezzmbfbjn -75nineonefivesix -ninethreevntrpltfttnlzgn7 -fivefiveseven4seveneight9three -89bspmdgzcm -6jnnmhkfourfive63eightggchjtwonet -6twocsjssxfnfxbqrqrhdfrlzfldf -xhlk7xdmg -64ninesixhhmjhglhp -6fourkm9mnnrbjpjtwozdgtrsseightwox -rjrldgmzthree5kqnjmxpmmr1threefiveeightbjjvk -2bzsevenfour -pkkrrzlnm31gkfvfjpvhfivefour -jtnkdkldq285fiveg -tvzmqone8mqsfeight5 -9nineeight1vnsm6tx6three -24gnthreebzz9six -dvcmqppn7 -one5three3ninedqxqljq -five8gdtthree4jjnhbdkp51gtkmbnjzk -cvsgrlfdflhjp8dvfourninefive -113three26 -6dhfrhjthreebslzctwo85vgjbr -4seveneightzvbrjtvbvzcmzxshl9 -five24kfrninepp7 -onejlx6nsgqcckqfgkstnczpgmzcfx2rbqdvcjpr5 -2fiveoneonetzkqxs95ztchd -1nineblthree -xndbmvlqlkq6pkzvzlplbthreethreethree -sppdbmqndkqj7 -hcdkt8fdlqmkprg11seven -sevenseven84five6sjbsvkds -9two3eightone5 -dreightwolpqzcqsmqfiveeighttwoninesg9 -vzplxbbt9rfftfmmvnine49j -8ninetfvjmjlxtseven3chppcpt2gzfdpdm -nfbckqn7 -four5threenine -9threeccgvdstztf4 -one772nineeight -fourfive2v387 -five9dpbgxxjkg64 -nvngsn9six32fivenine -pdctqmdvdpqbdqs49pgzfive -seven5trmnqnqgqprkdkxcsrtmzjccgrtbklnhnfive -5kpjfc3rt -47four -61fourvz3 -3gtzzrsphbrkqgmfmgdhsixdskqqzhfoursx7 -four4rfnhpqblsixcqhlfkdkn6 -nine1nzrqg9 -two5three -f7trxrqhfpg3fourpprkpvone -eighteighteighteightsixone2fivefntjsvkln -992xtfbdstcnlkfxfour1q -5bhhlkrhjptwoeight2d -488 -2four8twosevensgtplsfournine6 -8jnsljdgdbbxzvvxrzhv8fourdvvcvmcsq -zqmthreekdvdd9eightcxkjckgd -eightninetwoeightfpznmztv722 -bslvfrtgqb3seven -3fourtxlrxjfskztwoeight5kd -kjgbpdxbrsv2twosix -eightfivesgbktt47sixeight3 -4oneninelpfjmmzcsq -3eightsixseven7sevenxscsrrfc -18dgvtgskkfoursix -one87 -386tworhzbhbtonesix3 -516xdqcsdpxpfhzbblg -nldnine15six59nine -seventhreegpqqdddh9five -dkktl5gnrmjgbfsfive7568scfgqvrqs -glfourseven2sevenqvpc -nine1cfttktvqjxzbb -twoqvfzx56one -eight1lzfkrsclhccxtwo6 -9one5 -1onetwosevensevenfiveztgmhfldthreeone -4ngnpzvpvdz -3452 -6lklgpxstsixtwo -tcpbcspsix4vdlvsqddfvxeight79 -xhgxp7sbnbfsfxntspbncg48fivetwonine -7eightgmleight9xbzlpgjqsix7jcsvplq -lmdbvbkpfive3qtkf35 -3xfszvbl -2sevensevendrzzljmqcr -1four2 -mnhqcgffllnlhthreegneightcxbhz23 -znrprxdtp9sevenoneightnk -18ninethreetwo -fournineftpqcmsix213 -eightlmgrjxdfl5six -52eight495 -6twogmvhfrrzhkthreegplbmssixseven4 -hvpnvkrmrqfivetwo6dlgtscdmfsq -ninemseven9seven -zfqfdz5sixbmlsvzckgvskseven8five -sixsevenjcmtgqtb1nmnmqggmc95 -sixeight8fourseven -6tppqxqsmljd2rjfffxbeight86 -69two1seven -813three1eight -rttddjcrmc52eightcsevenvhxc -kvpgfbnrkzseven2fourgrghxjplqbgnbvpznbdhrxgdqzzkdgfdbqggbmfg -seven8eightfive -3tgcnpp -316ksn9twohrtgbcmcrdn -1ccsfttwosix -eight1sixnine3cfvzlfh -5twoxhmlzmvszm -4ninefourhvqznsjng2 -jzvdcjsdpmrdzbkvdfourfivefour9 -lnlhncjthreeseven5 -six8seven4seven4qtncq -2threesixjzdzmlfsdmqc -threenlrd33 -three3sqfmq7nine -jrgvgjlnlthree78kf -tgngldxnkzf2one8 -mpmeight92seveneightsix -tninethqhpzlkzhgmkqsix574fsd -seven8five1seventhree5 -jf533reightrxjdrqhsix -mxvnxmxmnvkfqcnzzpc1twoone3 -four7twodlfxxrsix -gfflmcdlsix5fgthree -threecnqdtbvjxmgndzkkninedclqh78zk -fivesg8dhhthspm -sixmbsnvvzncxz4one -8hkrb3oneightj -sixsix3gqtvqqnmtph8threexchpjtcxfj -8399 -2hzngcnshdktwovcxchdqrh -five6ddcnpsdlllrmmnvmmsix -ninerxfpfsixone9 -xrjphdrq3kdvlg5twoks -threegnklthree1rbthree3 -fivenine1tftcphztmfthj23 -3h75eightfdnz -twoone4eight -4783five -threeqsbhznhfd2jgjjggt8hmbdhstsix -seven2sixthreeglzvrcvlhfivenine -9jht8xdhfrsjbhthree11 -seven9twosix -2rzzmzgbqggbqhlsdt2seven -733eightfpljbfm4clqccf1fjgkgxdktz -ltvlb331jmp1sk -5fourseven2kdd2vfour -4sevenone18 -lsscqvt7seventhreevcqvpjndvltwobkv5qgfhczmhxg -659five -nzl231pzllsvcmpncslfmseight -nine8zsnkrnine -rlgzb95eightxmj -5sixsixkstxnclx6 -jkkxmn34nttqsrhdtkjl -2mjkqdlfrjjnvbv -fourhqbhbxfvzkrplxqkckl55onethree5 -bffncpr8tclcgtwo2 -nbqtkrhnmrh9hvctrhjzvbqrs -vfxbqqxlpx1sixnine9 -d2sixsixsevenseven -jtwonethreesixseven8fiveseven -4mlvbpnxzmsrnzvsjlpbcxgsmvcqdmqqlrhj15 -bskfxdmsixeightnbtdfpbtmgpddrkkczr9one -ng8eightfour5 -53ccpsnxndthreegcpjgkzbmvcrbfive -4one2threedmb -9kfscngdfrnine -9four32skfdjfour22ltv -pgfourrntwo985 -seven5cpvbsonefour -seven7onefive -9pqspsbsneight6nv -eightdbsevenqdsh3zjgmlxlgpnjxjt -vcj7fzhmjnqjdds -rczjzrsrzfiverbzmpcjthree7 -cvdqclthr9 -twosixonefour1sevenmsb -tdrgmvlm343938qpvjd -8nine33fivethree -5hpbhcpkkgfour7sevennine -1m -rstwonevngtsslzn2 -sevenfiveoneninehfmdseven9bvfqbvvhbm -gonetwothreenlqxbpfpxs1pfrkgzjjk -58three768qsrffkxp -eight4sixsevenfrjcfour866 -4seven3hpjfllmhhncq -fivesnbldvhsixdl4 -4twofive -rlrj15 -2sixpqspdfssix -five32lxgrrrbnntpqhhxcgcztqgtbsz -ncvnfivecnkdpjjpbh93ninejvqslxxpm7 -kdfcfqrn9eightonebsix2prnbrmj -gsixninels229dsflfvnine -zjxvkq7cvlcggkskcccmcsconerszqnmfghnine -4four1tlfnjgqzz -78twonine2kzhqdgx169 -bfive2fivegktdzmtlbf3jlfzdktsg -35eightfive9six9qsnq -3twobhf2fjvgr2 -2ggns35nsbcldmone -jpdqktwo4tdvh9sxslths7 -ggkplvtgctpgzmxbmdt3btqmgsnmvqqxv -5kntpbjz -nfqjskkntdlbsjzsjxvmjbfivemcbhkzrjdhvfqzqkbbbqv7p -five2nqcj7sixsixthreeh -fg3one -4nineb1threesvbks2lp -xxlq9 -rptjtqdgfghmxhv4239gptndhvjqd -4lbbtzvcxgxnfbbv7 -eightzzmcxmthreekkmq919 -7jpdvzs1threesixhctfdzpdlmxqgz -97bzcqhdnpvmonesix4pfpsevenbjvctzqchd -tlbxlftmc73nineeightzktqfzqhxx9nine -5six4 -4bxgmpcd1seven4grrdnine3two -1lsfpdnmlzlkczfdqpbkdb5pjns6lqqnpvkrjsg -hzxppjnkhbtqnrqpleightggcgbrhm3 -7bzz199threecmnrn -five214qcppmkvzdq5six -fiveeightgvqnvcmgsthreefive2 -eightfour6kds2 -eight1seven5 -xone3fivetwofivesix3qqqsvhmt -twogrfrrmkc4zkrpsp9two -twofourfour8 -sevenlfive7psixonefour -kfxfgt98jvdrx -45gzmzzxh -2gvxgmtone7twoxqninenrqr7 -twotwo1onexgtmdnvss -4517seven -7onensevenj6555 -fivesix9nine -329lbrn -xkzrhlcrfmrmfqlseven3five -2877rfplvjbvjj15 -mzzfdftbninesxsdxltwo79bsdvnine -79tfnmsevennnmsdrgzlsg -kgmhkkq64threesixeight44mskzftd -vnjz8onemdnjfzmqcgxqonemspchrxlggoneightptg -83hqrd1sixsevennine -fcbdjhdndjchqlvdv2sixoneseven4fhfhxrrrxeightwotpt -ksfbthjpczlghsgkfive6 -663krqxqlznine8 -sevennineeight1nsk8mvblkzzz -1seven74 -tvqlxnzn7 -mbrphrdzsvnlpqlfdfpqrmf2 -two9pbxbt1fivecpp -six2onelffxlvkh8sixfive3six -fourdkqzfive9 -reightwobp9bzpx71six -2mconefour -6fjpccfour -seventhree8one293 -six3khrpvrhzgthree8two -7357sixhsbgkkkfljlrmbx -75twoeightfourbcgeight -ninenineone2two2 -gfqhnhjgt762zfgpzdzdhh1 -nghtwone5sjbhtzgseventwomdm -gphcvbvxfxdbnqcttt37 -qone3nineqfqdcfc -3eightnineonesixslhkjqgmreight -two5dfive56 -seven9rk -9six6seven -1crhxcgsfqcfvgvrr6nine7tworzbvh -skbfn94hskkfzsvqj4eight -mbtkcgqj4mbfour8 -blghkbbgx3 -6oneeightnine6 -1threesix -1jzlbxmxbseven39 -65nineszqvcgghgg -threepcjrl1 -n346seven4 -oneeight3 -7vtcgkpgqqzcxdxrjmpbjone1pvxcjjtpdtcprkq5mqxkjpbqkd -32skznxsevenone3 -sevenninesrrcmxdgnq2vmlvdhj -2nine3vcfivemb5six2 -5hx78fournine669 -qszds3 -six4seven2one87four -plxfoursc41five -sixfour9fivernqcknsbgpfrzmgz3 -onesevenf78threedzvlm1 -xlkdlhlk23four -8ninejseven5 diff --git a/problem.txt b/problem.txt new file mode 100644 index 0000000..97c1adf --- /dev/null +++ b/problem.txt @@ -0,0 +1,2000 @@ +155 +157 +156 +172 +170 +186 +198 +189 +207 +213 +222 +228 +229 +227 +220 +226 +241 +243 +244 +246 +256 +255 +260 +266 +268 +270 +269 +271 +272 +275 +276 +277 +272 +273 +278 +286 +293 +298 +304 +305 +317 +330 +342 +341 +371 +374 +376 +377 +381 +385 +398 +409 +433 +434 +435 +436 +437 +443 +445 +455 +450 +447 +462 +465 +466 +468 +474 +493 +494 +523 +532 +539 +538 +539 +542 +547 +545 +557 +558 +561 +581 +582 +583 +580 +584 +603 +617 +618 +605 +616 +618 +620 +636 +637 +639 +640 +641 +642 +641 +642 +644 +645 +664 +668 +678 +679 +681 +686 +687 +688 +689 +706 +709 +724 +727 +735 +737 +749 +753 +754 +760 +766 +770 +765 +766 +773 +775 +777 +785 +786 +787 +797 +798 +818 +835 +836 +838 +859 +856 +860 +867 +868 +870 +871 +892 +896 +897 +898 +919 +928 +944 +943 +965 +980 +982 +988 +994 +997 +998 +997 +998 +982 +990 +986 +985 +986 +987 +997 +1003 +998 +1005 +1006 +1009 +1008 +1015 +1021 +1023 +1024 +1021 +1041 +1042 +1044 +1052 +1053 +1056 +1053 +1056 +1057 +1058 +1060 +1053 +1054 +1059 +1056 +1057 +1068 +1081 +1093 +1094 +1099 +1103 +1101 +1103 +1125 +1127 +1128 +1134 +1130 +1133 +1137 +1141 +1142 +1144 +1164 +1166 +1180 +1178 +1177 +1182 +1183 +1180 +1182 +1197 +1198 +1203 +1204 +1206 +1207 +1208 +1217 +1241 +1250 +1249 +1250 +1252 +1253 +1257 +1285 +1286 +1290 +1302 +1330 +1332 +1333 +1334 +1336 +1334 +1331 +1332 +1344 +1345 +1354 +1358 +1357 +1360 +1362 +1376 +1378 +1379 +1381 +1379 +1381 +1380 +1379 +1383 +1393 +1403 +1407 +1397 +1403 +1408 +1413 +1415 +1419 +1427 +1430 +1438 +1441 +1446 +1476 +1502 +1495 +1497 +1498 +1499 +1500 +1502 +1503 +1505 +1526 +1552 +1570 +1572 +1577 +1579 +1574 +1575 +1585 +1605 +1624 +1626 +1631 +1646 +1647 +1649 +1681 +1682 +1684 +1687 +1690 +1691 +1694 +1718 +1719 +1723 +1731 +1721 +1723 +1724 +1742 +1743 +1748 +1753 +1761 +1762 +1765 +1772 +1774 +1773 +1781 +1784 +1789 +1794 +1795 +1803 +1807 +1813 +1829 +1828 +1830 +1844 +1847 +1850 +1854 +1855 +1850 +1848 +1853 +1878 +1909 +1910 +1912 +1917 +1937 +1939 +1943 +1941 +1952 +1959 +1963 +1971 +1974 +1989 +2007 +2009 +2005 +2006 +2010 +2013 +2016 +2027 +2044 +2030 +2031 +2032 +2035 +2036 +2047 +2050 +2052 +2061 +2071 +2077 +2080 +2082 +2094 +2098 +2119 +2111 +2112 +2127 +2139 +2140 +2141 +2149 +2151 +2156 +2157 +2171 +2186 +2202 +2206 +2221 +2239 +2247 +2252 +2262 +2264 +2271 +2281 +2291 +2293 +2333 +2335 +2339 +2343 +2338 +2342 +2337 +2343 +2344 +2347 +2353 +2358 +2363 +2364 +2377 +2403 +2402 +2405 +2418 +2408 +2406 +2422 +2424 +2422 +2435 +2437 +2439 +2446 +2458 +2459 +2484 +2486 +2487 +2484 +2486 +2485 +2508 +2509 +2507 +2508 +2509 +2521 +2531 +2541 +2542 +2545 +2556 +2566 +2579 +2582 +2583 +2584 +2585 +2591 +2593 +2594 +2598 +2599 +2600 +2601 +2604 +2609 +2616 +2638 +2647 +2646 +2645 +2642 +2643 +2644 +2645 +2624 +2635 +2634 +2639 +2643 +2645 +2658 +2659 +2662 +2666 +2654 +2655 +2666 +2663 +2673 +2684 +2702 +2707 +2708 +2734 +2742 +2745 +2748 +2751 +2754 +2753 +2751 +2758 +2757 +2775 +2761 +2772 +2773 +2796 +2807 +2808 +2809 +2810 +2817 +2819 +2823 +2824 +2847 +2850 +2851 +2859 +2861 +2862 +2854 +2860 +2877 +2880 +2881 +2880 +2913 +2916 +2917 +2918 +2938 +2954 +2957 +2965 +2971 +2976 +2984 +2985 +2986 +3002 +3003 +3004 +3005 +2990 +3004 +2997 +2995 +3011 +3005 +3009 +3018 +3019 +3021 +3015 +3016 +3017 +3024 +3026 +3041 +3042 +3052 +3064 +3063 +3068 +3087 +3088 +3084 +3110 +3109 +3121 +3131 +3130 +3134 +3139 +3145 +3153 +3159 +3162 +3179 +3219 +3224 +3220 +3221 +3230 +3232 +3256 +3236 +3235 +3237 +3245 +3250 +3265 +3222 +3238 +3273 +3287 +3288 +3293 +3297 +3307 +3292 +3306 +3311 +3312 +3324 +3315 +3316 +3318 +3316 +3317 +3318 +3320 +3321 +3328 +3330 +3331 +3333 +3337 +3342 +3323 +3332 +3330 +3337 +3338 +3347 +3343 +3345 +3347 +3353 +3361 +3362 +3363 +3366 +3351 +3353 +3365 +3368 +3389 +3400 +3410 +3420 +3438 +3439 +3445 +3444 +3472 +3486 +3484 +3494 +3503 +3504 +3505 +3513 +3524 +3526 +3527 +3535 +3536 +3529 +3530 +3531 +3533 +3547 +3549 +3562 +3553 +3560 +3561 +3562 +3566 +3567 +3568 +3578 +3579 +3581 +3611 +3613 +3615 +3618 +3639 +3655 +3657 +3676 +3680 +3700 +3709 +3710 +3717 +3720 +3727 +3735 +3736 +3746 +3768 +3772 +3777 +3780 +3790 +3799 +3802 +3804 +3812 +3814 +3815 +3823 +3824 +3827 +3853 +3861 +3854 +3846 +3849 +3868 +3879 +3883 +3880 +3881 +3889 +3891 +3890 +3899 +3891 +3885 +3917 +3918 +3919 +3920 +3926 +3921 +3931 +3938 +3939 +3950 +3951 +3955 +3966 +3965 +3970 +3982 +3996 +3997 +4000 +4002 +4003 +4005 +4010 +4015 +4023 +4027 +4019 +4025 +4034 +4035 +4037 +4053 +4075 +4084 +4089 +4093 +4083 +4089 +4090 +4129 +4141 +4158 +4185 +4189 +4191 +4201 +4202 +4212 +4222 +4223 +4238 +4244 +4243 +4245 +4252 +4270 +4275 +4278 +4279 +4283 +4285 +4289 +4290 +4293 +4294 +4302 +4306 +4290 +4292 +4310 +4317 +4318 +4321 +4322 +4325 +4303 +4304 +4306 +4307 +4310 +4330 +4328 +4329 +4330 +4332 +4335 +4337 +4336 +4344 +4347 +4342 +4361 +4362 +4361 +4359 +4379 +4385 +4390 +4389 +4392 +4395 +4397 +4412 +4415 +4416 +4418 +4441 +4442 +4443 +4441 +4435 +4437 +4450 +4471 +4472 +4473 +4469 +4470 +4490 +4492 +4511 +4516 +4517 +4530 +4524 +4522 +4523 +4522 +4531 +4532 +4543 +4549 +4548 +4546 +4537 +4533 +4542 +4551 +4552 +4562 +4570 +4571 +4576 +4585 +4597 +4599 +4600 +4605 +4606 +4607 +4630 +4642 +4643 +4639 +4675 +4661 +4684 +4685 +4697 +4699 +4730 +4731 +4732 +4734 +4737 +4744 +4761 +4771 +4775 +4776 +4784 +4789 +4790 +4767 +4768 +4770 +4771 +4772 +4792 +4801 +4808 +4811 +4818 +4811 +4813 +4814 +4815 +4824 +4823 +4824 +4827 +4830 +4832 +4821 +4809 +4812 +4841 +4842 +4844 +4801 +4805 +4820 +4832 +4823 +4824 +4816 +4818 +4817 +4816 +4822 +4858 +4861 +4880 +4879 +4886 +4893 +4902 +4906 +4901 +4913 +4919 +4928 +4926 +4927 +4935 +4937 +4938 +4939 +4941 +4942 +4947 +4949 +4963 +4955 +4958 +4960 +4956 +4958 +4957 +4961 +4971 +4972 +4975 +4978 +4979 +4985 +4972 +5019 +5023 +5022 +5014 +5016 +5024 +5026 +5049 +5054 +5055 +5051 +5052 +5055 +5062 +5065 +5067 +5065 +5067 +5047 +5060 +5061 +5074 +5101 +5103 +5104 +5108 +5110 +5113 +5124 +5122 +5109 +5110 +5093 +5103 +5099 +5101 +5102 +5108 +5106 +5139 +5160 +5164 +5165 +5170 +5164 +5166 +5168 +5178 +5199 +5200 +5202 +5206 +5214 +5217 +5222 +5223 +5263 +5268 +5288 +5289 +5301 +5324 +5301 +5302 +5304 +5318 +5321 +5329 +5337 +5340 +5346 +5369 +5386 +5377 +5392 +5383 +5385 +5403 +5402 +5404 +5434 +5440 +5442 +5434 +5442 +5452 +5453 +5495 +5499 +5503 +5509 +5508 +5513 +5515 +5521 +5527 +5532 +5543 +5544 +5549 +5550 +5551 +5537 +5508 +5509 +5514 +5517 +5521 +5538 +5546 +5561 +5563 +5566 +5569 +5581 +5592 +5608 +5607 +5612 +5618 +5630 +5636 +5652 +5662 +5663 +5672 +5681 +5682 +5680 +5671 +5678 +5692 +5701 +5707 +5709 +5710 +5711 +5713 +5702 +5713 +5700 +5701 +5702 +5699 +5678 +5679 +5684 +5688 +5720 +5722 +5726 +5731 +5732 +5731 +5735 +5741 +5742 +5747 +5748 +5773 +5792 +5795 +5797 +5820 +5819 +5825 +5827 +5829 +5852 +5853 +5856 +5868 +5875 +5883 +5907 +5872 +5882 +5893 +5929 +5942 +5943 +5946 +5948 +5949 +5950 +5959 +5961 +5965 +5971 +5972 +5973 +5964 +5957 +5977 +5978 +5976 +5980 +5984 +6009 +6023 +6035 +6037 +6039 +6040 +6041 +6048 +6061 +6081 +6080 +6088 +6086 +6089 +6113 +6118 +6124 +6139 +6140 +6142 +6134 +6125 +6130 +6134 +6139 +6145 +6169 +6170 +6173 +6174 +6184 +6155 +6169 +6184 +6190 +6199 +6204 +6205 +6221 +6220 +6229 +6206 +6207 +6209 +6219 +6222 +6220 +6221 +6223 +6225 +6226 +6245 +6246 +6251 +6257 +6258 +6269 +6280 +6282 +6283 +6287 +6296 +6298 +6303 +6304 +6312 +6301 +6304 +6302 +6314 +6317 +6336 +6348 +6357 +6355 +6356 +6364 +6368 +6366 +6374 +6372 +6351 +6358 +6356 +6364 +6365 +6381 +6406 +6420 +6424 +6420 +6432 +6447 +6454 +6456 +6498 +6497 +6498 +6500 +6508 +6544 +6546 +6548 +6557 +6564 +6566 +6567 +6570 +6599 +6602 +6600 +6606 +6608 +6605 +6608 +6610 +6624 +6601 +6604 +6603 +6619 +6647 +6661 +6660 +6663 +6664 +6679 +6682 +6686 +6701 +6702 +6710 +6719 +6720 +6715 +6716 +6718 +6728 +6729 +6712 +6711 +6718 +6730 +6731 +6757 +6760 +6765 +6748 +6747 +6746 +6775 +6776 +6775 +6785 +6786 +6788 +6791 +6792 +6800 +6802 +6803 +6806 +6809 +6806 +6818 +6821 +6823 +6824 +6832 +6835 +6834 +6838 +6840 +6844 +6845 +6854 +6857 +6863 +6885 +6893 +6908 +6922 +6914 +6915 +6922 +6923 +6924 +6926 +6930 +6938 +6970 +6971 +6972 +6971 +6978 +6975 +6978 +6958 +6971 +6977 +6978 +6979 +6982 +6986 +6985 +6988 +7000 +7002 +7007 +7017 +7019 +7040 +7043 +7045 +7046 +7047 +7057 +7061 +7073 +7093 +7095 +7096 +7121 +7129 +7130 +7135 +7139 +7141 +7143 +7145 +7147 +7148 +7149 +7152 +7160 +7170 +7171 +7174 +7175 +7170 +7171 +7198 +7201 +7203 +7204 +7211 +7214 +7215 +7246 +7233 +7238 +7240 +7253 +7254 +7249 +7252 +7256 +7267 +7268 +7274 +7277 +7279 +7285 +7290 +7296 +7298 +7313 +7326 +7332 +7335 +7338 +7345 +7346 +7353 +7356 +7360 +7367 +7392 +7395 +7404 +7416 +7418 +7438 +7451 +7452 +7449 +7453 +7469 +7471 +7473 +7503 +7504 +7517 +7520 +7532 +7533 +7544 +7553 +7565 +7575 +7576 +7575 +7581 +7597 +7633 +7634 +7632 +7633 +7637 +7638 +7644 +7634 +7643 +7644 +7645 +7646 +7649 +7629 +7630 +7632 +7635 +7636 +7642 +7643 +7645 +7644 +7660 +7663 +7672 +7675 +7677 +7680 +7701 +7702 +7709 +7720 +7726 +7734 +7735 +7773 +7774 +7779 +7782 +7787 +7783 +7785 +7787 +7788 +7791 +7793 +7797 +7802 +7803 +7805 +7809 +7805 +7815 +7826 +7832 +7851 +7852 +7853 +7874 +7854 +7858 +7866 +7867 +7850 +7858 +7876 +7892 +7897 +7898 +7900 +7908 +7909 +7911 +7917 +7918 +7919 +7920 +7914 +7911 +7914 +7929 +7942 +7943 +7944 +7945 +7944 +7945 +7976 +7988 +7998 +8001 +8002 +8008 +8010 +8006 +8011 +8006 +8016 +8018 +8019 +8020 +8024 +8027 +8031 +8022 +8025 +8039 +8040 +8049 +8069 +8070 +8071 +8080 +8081 +8093 +8096 +8107 +8110 +8115 +8124 +8126 +8115 +8118 +8121 +8142 +8143 +8147 +8148 +8152 +8156 +8158 +8159 +8160 +8163 +8166 +8179 +8202 +8203 +8205 +8214 +8215 +8211 +8218 +8228 +8229 +8230 +8252 +8255 +8258 +8266 +8267 +8268 +8270 +8275 +8276 +8278 +8283 +8292 +8303 +8305 +8293 +8297 +8313 +8317 +8308 +8307 +8308 +8323 +8326 +8331 +8328 +8329 +8332 +8335 +8337 +8336 +8337 +8338 +8362 +8363 +8364 +8366 +8369 +8379 +8384 +8385 +8392 +8400 +8424 +8429 +8432 +8434 +8433 +8434 +8437 +8438 +8442 +8437 +8438 +8450 +8451 +8445 +8449 +8452 +8478 +8480 +8498 +8490 +8492 +8493 +8494 +8495 +8503 +8504 +8507 +8516 +8517 +8543 +8544 +8555 +8571 +8572 +8574 +8575 +8580 +8590 +8593 +8601 +8603 +8610 +8616 +8617 +8619 +8644 +8645 +8646 +8652 +8653 +8654 +8655 +8656 +8659 +8660 +8666 +8668 +8669 +8672 +8690 +8682 +8685 +8686 +8665 +8674 +8672 +8677 +8678 +8679 +8684 +8695 +8704 +8725 +8745 +8747 +8739 +8755 +8757 +8734 +8738 +8737 +8730 +8735 +8739 +8747 +8750 +8777 +8778 +8780 +8782 +8783 +8785 +8786 +8777 +8778 +8779 +8783 +8788 +8789 +8795 +8811 +8829 +8834 +8862 +8871 +8875 +8878 +8879 +8872 +8867 +8881 +8892 +8893 +8896 +8897 +8896 +8897 +8898 +8907 +8908 +8910 +8937 +8943 +8950 +8951 +8953 +8964 +8985 +8982 +8987 +8994 +9021 +9023 +9024 +9019 +9024 +9029 +9008 +9020 +9026 +9027 +9044 +9061 +9058 +9061 +9065 +9066 +9067 +9077 +9078 +9077 +9075 +9076 +9078 +9087 +9082 +9083 +9085 +9086 +9101 +9112 +9122 +9123 +9128 +9129 +9131 +9134 +9138 +9147 +9153 +9171 +9165 +9155 +9159 +9185 +9183 +9186 +9190 +9193 +9194 +9197 +9203 +9204 +9214 +9213 +9218 +9227 +9231 +9247 +9262 +9266 +9268 +9269 +9259 +9260 +9268 +9278 +9279 +9299 +9300 +9301 +9302 +9312 +9313 +9314 +9346 +9347 +9348 +9337 +9342 +9338 +9337 +9357 +9360 +9364 +9367 +9382 +9410 +9411 +9422 +9429 +9431 +9430 +9437 +9438 +9442 +9441 +9443 +9455 +9462 +9464 +9472 +9497 +9528 +9551 +9553 +9555 +9556 +9569 +9580 +9584 +9586 +9575 +9578 +9579 +9587 +9590 +9619 +9622 +9628 +9616 +9614 +9625 +9626 +9631 +9641 +9648 +9658 +9663 +9664 +9665 +9649 +9650 +9647 +9657 +9661 +9663 +9668 +9673 +9678 +9681 +9682 +9687 +9688 +9705 +9706 +9710 +9716 +9728 +9730 +9733 +9726 +9727 +9728 +9729 +9730 +9727 +9729 +9731 +9732 +9735 +9746 +9748 +9753 +9752 +9739 +9738 +9760 +9765 +9768 +9767 +9771 +9762 +9765 +9766 +9759 +9765 +9766 +9797 +9802 +9803 +9805 +9807 +9813 +9814 +9818 +9819 +9825 +9826 +9827 +9828 +9829 +9833 +9849 +9855 +9856 +9875 +9893 +9899 diff --git a/template/example.test.ts b/template/example.test.ts new file mode 100644 index 0000000..f3e80eb --- /dev/null +++ b/template/example.test.ts @@ -0,0 +1,18 @@ +import { expect, test } from "bun:test"; +import { main as part1 } from "./part_1"; +import { main as part2 } from "./part_2"; + +// const example = ``; +const example = `1 2 3 4 5`.split(" "); + +test("part1", async () => { + const answer = 5; + const res = await part1(example); + expect(res).toEqual(answer); +}); + +test("part2", async () => { + const answer = 5 + 5; + const res = await part2(example); + expect(res).toEqual(answer); +}); diff --git a/template/logs/.gitkeep b/template/logs/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/template/part_1.ts b/template/part_1.ts new file mode 100644 index 0000000..f43fbd6 --- /dev/null +++ b/template/part_1.ts @@ -0,0 +1,26 @@ +export const main = async ( + lines: string[] +): Promise => { + const answer = lines.length; + + // delete me! + console.log(lines); + + return answer; +}; + +const isrun = process.argv.length > 1 && process.argv[1] === import.meta.path; +if (isrun) { + const file = Bun.file("./problem.txt"); + const text = await file.text(); + const lines = text.split("\n"); + + console.log("=== COMPUTATION ===\n"); + + const answer = await main(lines); + + console.log("\n=== /COMPUTATION ===\n"); + + console.log("=== ANSWER TO P1 ==="); + console.log(answer); +} diff --git a/template/part_2.ts b/template/part_2.ts new file mode 100644 index 0000000..cdf4590 --- /dev/null +++ b/template/part_2.ts @@ -0,0 +1,27 @@ +export const main = async ( + lines: string[] +): Promise => { + const answer = lines.length; + + // delete me! + console.log(lines); + + return answer + 5; +}; + +const isrun = process.argv.length > 1 && process.argv[1] === import.meta.path; +if (isrun) { + const file = Bun.file("./problem.txt"); + const text = await file.text(); + const lines = text.split("\n"); + + console.log("=== COMPUTATION ===\n"); + + const answer = await main(lines); + + console.log("\n=== /COMPUTATION ===\n"); + + console.log("=== ANSWER TO P2 ==="); + console.log(answer); +} + diff --git a/template/problem.txt b/template/problem.txt new file mode 100644 index 0000000..895c58b --- /dev/null +++ b/template/problem.txt @@ -0,0 +1,5 @@ +this +file +has +5 +lines