From: Neil Smith Date: Wed, 21 Dec 2022 15:06:13 +0000 (+0000) Subject: Done day 21 X-Git-Url: https://git.njae.me.uk/?a=commitdiff_plain;h=fac89b5e50afe5c2d64d597c9e0873af5a1b9302;p=advent-of-code-22.git Done day 21 --- diff --git a/advent-of-code22.cabal b/advent-of-code22.cabal index d9def44..5fa92ad 100644 --- a/advent-of-code22.cabal +++ b/advent-of-code22.cabal @@ -200,3 +200,9 @@ executable advent20 import: common-extensions, build-directives main-is: advent20/Main.hs build-depends: data-clist , lens + +executable advent21 + import: common-extensions, build-directives + main-is: advent21/Main.hs + build-depends: text, attoparsec, containers, lens + \ No newline at end of file diff --git a/advent20/Main.hs b/advent20/Main.hs index 2b6b507..eb60a15 100644 --- a/advent20/Main.hs +++ b/advent20/Main.hs @@ -1,7 +1,5 @@ -- Writeup at https://work.njae.me.uk/2022/12/21/advent-of-code-2022-day-20/ -import Debug.Trace - import AoC import Data.List import Data.Maybe diff --git a/advent21/Main.hs b/advent21/Main.hs new file mode 100644 index 0000000..1811612 --- /dev/null +++ b/advent21/Main.hs @@ -0,0 +1,118 @@ +-- Writeup at https://work.njae.me.uk/2022/12/21/advent-of-code-2022-day-21/ + +import AoC +import Data.Text (Text) +import qualified Data.Text.IO as TIO +import Data.Attoparsec.Text hiding (take, D) +import Control.Applicative +import qualified Data.Map.Strict as M +import Data.Map.Strict ((!)) +import Control.Lens + +data Shout = Literal Int | Operation Operator String String + deriving (Show, Eq, Ord) + +data Operator = Plus | Minus | Times | Divide + deriving (Show, Eq, Ord) + +type Monkeys = M.Map String Shout + +fromLiteral :: Shout -> Int +fromLiteral (Literal n) = n +fromLiteral _ = error "fromLiteral" + +main :: IO () +main = + do dataFileName <- getDataFileName + text <- TIO.readFile dataFileName + let monkeys = successfulParse text + print $ part1 monkeys + print $ part2 monkeys + +part1, part2 :: Monkeys -> Int +part1 monkeys = fromLiteral $ findRoot values operations + where (values, operations) = splitMonkeys monkeys + +-- hardcoded assumption: small values of humn give large values of result, so find larger values to give negative output +part2 monkeys = binarySearch values operations l u + where (Operation _ rootL rootR) = monkeys ! "root" + monkeys' = monkeys & at "root" ?~ (Operation Minus rootL rootR) + (values, operations) = splitMonkeys monkeys' + (l, u) = findRange values operations 1 + +findRange :: Monkeys -> Monkeys -> Int -> (Int, Int) +findRange values operations prev + | res > 0 = findRange values operations (prev * 2) + | otherwise = (prev, prev * 2) + where res = fromLiteral $ trial values operations (prev * 2) + +binarySearch :: Monkeys -> Monkeys -> Int -> Int -> Int +binarySearch values operations lower upper + | lower > upper = error "Failed search" + | result == 0 = probe + | result > 0 = binarySearch values operations (probe + 1) upper + | result < 0 = binarySearch values operations lower probe + where probe = ((upper - lower) `div` 2) + lower + result = fromLiteral $ trial values operations probe + +trial :: Monkeys -> Monkeys -> Int -> Shout +trial values operations humn = findRoot (values & at "humn" ?~ (Literal humn)) operations + +splitMonkeys :: Monkeys -> (Monkeys, Monkeys) +splitMonkeys = M.partition f + where f (Literal _) = True + f (Operation _ _ _) = False + +findRoot :: Monkeys -> Monkeys -> Shout +findRoot values operations + | "root" `M.member` values = values ! "root" + | otherwise = findRoot values' operations' + where (values', operations') = evaluateMonkeys values operations + +evaluateMonkeys :: Monkeys -> Monkeys -> (Monkeys, Monkeys) +evaluateMonkeys values operations = M.foldlWithKey' f ((values, M.empty)) operations + where f (valMs, opMs) name op = + case (evalShout valMs op) of + Nothing -> (valMs, opMs & at name ?~ op) + Just v -> (valMs & at name ?~ v, sans name opMs) + +evalShout :: Monkeys -> Shout -> Maybe Shout +evalShout _ (Literal n) = Just $ Literal n +evalShout values (Operation op l r) = apply <$> (Just op) <*> lval <*> rval + where lval = M.lookup l values + rval = M.lookup r values + +apply :: Operator -> Shout -> Shout -> Shout +apply Plus (Literal l) (Literal r) = Literal (l + r) +apply Minus (Literal l) (Literal r) = Literal (l - r) +apply Times (Literal l) (Literal r) = Literal (l * r) +apply Divide (Literal l) (Literal r) = Literal (l `div` r) +apply _ _ _ = error "Illegal apply" + + +-- Parse the input file + +monkeysP :: Parser Monkeys +monkeyP :: Parser (String, Shout) +shoutP, numberP, operationP :: Parser Shout +nameP :: Parser String +operatorP, plusP, minusP, timesP, divideP :: Parser Operator + +monkeysP = M.fromList <$> monkeyP `sepBy` endOfLine +monkeyP = (,) <$> (nameP <* ": ") <*> shoutP +shoutP = numberP <|> operationP +numberP = Literal <$> decimal +operationP = opify <$> nameP <*> operatorP <*> nameP + where opify l o r = Operation o l r +nameP = many1 letter +operatorP = plusP <|> minusP <|> timesP <|> divideP +plusP = Plus <$ " + " +minusP = Minus <$ " - " +timesP = Times <$ " * " +divideP = Divide <$ " / " + +successfulParse :: Text -> Monkeys +successfulParse input = + case parseOnly monkeysP input of + Left _err -> M.empty -- TIO.putStr $ T.pack $ parseErrorPretty err + Right monkeys -> monkeys diff --git a/data/advent21.txt b/data/advent21.txt new file mode 100644 index 0000000..483f0df --- /dev/null +++ b/data/advent21.txt @@ -0,0 +1,2351 @@ +qdmp: 12 +tbqg: 4 +wvbs: 2 +hthv: jfcn + rnng +hbbd: pgrf + qqql +zssc: rwvf / tqwm +vzlp: ccbh + mqgt +bcgz: wzbt * slsc +cfqd: hqrz + hjdh +qwjz: 10 +jfjc: cbhr + wndj +vhhg: 3 +mrmv: sqtp * jjhq +svmj: 2 +pplz: wtjj + twlf +gqpr: 5 +ftrp: 5 +mvlg: 6 +pcff: bnmz / bsrh +rbvb: 20 +htqh: 10 +qwlt: vrrm * wwlz +dsvp: 11 +dmzt: 2 +prdl: dlnn * fbtg +vvfn: zdvq * gbqn +jdns: lzvr * rfnn +hgqv: 4 +wmcf: 7 +jvrc: 2 +fwqh: 4 +gcfh: 2 +hmgh: rhjn * sdgw +rswq: 2 +sdfp: 5 +lntt: 3 +sjdm: 3 +fvrp: bhql + pllr +gfwz: 3 +zfsd: gvmz * thtr +prtc: djdv / vjhz +qmtt: mvzp * mrnp +zpzg: fmfv + nqmg +tcdr: slcf + cmmh +gwsq: sflv * zncr +gpnz: 10 +wrsv: 17 +lbsc: rgjl * czvw +vgtv: 4 +ppmv: gbvp - zrrp +rmqs: 10 +htqn: 2 +jpnc: wthm + hhlw +frww: mvld - nnnh +bwtq: 4 +grrm: 4 +nffw: gjrj * ffpm +smdc: qdbs * gcvc +bcsb: 3 +qmpq: rnwr * zssc +tnbq: 5 +rnlr: 3 +wswq: wzcd * fdzp +dqbh: nstl / zgvg +dpbz: 3 +qndp: chjn * glfm +pqzz: 3 +bcrd: ggdz - bwbp +htsd: lhwz * rpgq +zzzt: 2 +pjfs: 5 +wzvg: 2 +vhrh: pvlt / vrht +jfgh: 1 +lqpj: jhcl + ssmm +jqsv: 3 +qfjc: jdbh * snjr +sflv: mlqw * rcjw +wtrj: hhrw + hntd +frnq: 2 +wwlr: mgmq * vmmb +nsww: lqwq + jjfn +dpsf: 5 +vvbf: qhqt - lvrn +tlnd: 4 +zvgl: lhwb * qclh +mtqf: 17 +lfrh: gzgq * nchw +fdfh: 17 +wtdr: zdvz + zhdc +pshn: hsqd * tfpm +lngr: 7 +fdcc: 14 +pfrr: jhms * pcgr +nnzd: 7 +nnrc: 4 +jgnm: vsvq + rtcl +zqbz: 5 +rsws: 3 +pnjm: 3 +pnzh: qfsm * qbjb +dgbn: 5 +pmgh: 5 +bqhf: lrgh * jsdb +dhpm: 2 +jjhd: lzcm * rbrp +dlms: 2 +wjvr: pjfp + wjvz +nfwh: 6 +dcwg: tgnw + lrjp +zzlg: wcmp * jjpj +lddf: 5 +pzjn: 2 +ntcl: 5 +rvsw: 3 +lltd: fhph + gplp +fnnp: lfdp - cqrh +mngc: jbzl * dpvs +fsvl: 3 +wvzj: fdbz / drmh +zbps: hmfd * hwvh +vnfz: 2 +jnms: zvvl + hcpm +mwmf: lvmp / rqgd +mcbh: dvtm * hvmn +rdbb: 3 +rmgt: dvdn * nbbm +rqgd: 2 +gbqn: 9 +tdnl: 4 +wtwt: 11 +tftl: cdsv + qgcj +qwql: tcqt / nhzf +nddq: 3 +brcf: cfzl + tmlm +mwcb: htqh + szmv +zmtb: qwlt * vjsc +mcmd: 10 +gvph: 17 +nvfb: 3 +njnw: flsd - fbpz +psjc: 16 +hzvq: 2 +jslt: 8 +rsbp: wtsb * qsvl +mdgz: mqmd * jhfh +ntts: blvv * stwz +lhwm: 9 +cbgg: hshc + hcqd +pjbv: vsbm * tdzg +hwmr: mptz - vgdt +dhnc: rvsw * jqtr +bmsg: 17 +zjsz: qmqz - jqjq +jbmb: 2 +mrjn: bjrh + psls +nqgn: 2 +vqhl: 2 +fgnm: 3 +vcnn: 2 +pvnc: pnjp * fnsd +drqh: 2 +fspm: nrzf - mhds +pqbf: vjvd + cswq +rdpw: bvfz - rnrm +vwmc: 8 +nwcr: 4 +mllj: 3 +zqsd: jjhd + vmwv +zqmw: bpst / frnq +bsjj: vpjj + gmgf +tnfg: 2 +pfvn: 2 +vgrj: 11 +zrrz: nltc * hzlq +gpsz: vhwz * fgnm +lhml: zrrz - ljzp +vnfh: nfgh + zphl +hhgg: vgvr - cdwn +mlbt: qmpq + pshn +rpvd: 4 +tlvw: 9 +vsbm: 9 +zvbf: cmdd * zqqq +vhzt: 1 +rjzg: 3 +zfcf: 2 +ndcw: 3 +dwnt: 3 +blpc: 6 +cmdd: 13 +tqss: cjtg * wjqm +whtt: 3 +nqvm: 2 +jtpl: 2 +pgjh: 3 +cbql: dpbr + gwcn +swts: 7 +lztq: 1 +gvjl: 3 +qmqz: wpzb + pgvg +cqtl: 4 +thjf: gvhs * pzlw +ztjp: 2 +fhgn: qdlz + vjnw +zdvz: 4 +wcfr: 8 +vdnj: tcgt * rwrv +pjfp: 3 +nqjg: wthg * lbnl +vpfh: cfml * nrss +wtdp: 1 +jhfz: blfn + vbrw +swcs: 2 +sfsr: 3 +fhdb: 4 +fcfb: 17 +hlcv: 3 +msbw: cfcv / wcrc +zmgf: 3 +jdbh: fgwf + mpqr +bcrg: 3 +rhdm: 3 +bhfp: wjjh + pjtv +dldc: 5 +wsth: 3 +wnzl: splf * mhmf +zfrv: 3 +mnwm: 2 +mlsh: 3 +fjvt: 3 +fblv: 2 +wjzm: rhzr * svmj +fttj: 2 +mbff: 1 +dbrm: 8 +qzcr: mwcb * tqcg +vrlf: fbws + jmrj +lqpn: 2 +cqrh: 1 +mjmq: wrsv + mcpz +qdbm: tvhg * fcfb +cmss: bbqc - jtpl +lqhd: vdnj + frbq +nhsz: lrrw + fshg +nlrj: mpwb * mqcz +fngv: trvd * wncg +lmpq: 2 +nbjd: wzhl * gvvg +vcdc: ngtd + dnss +cslw: wqsh * qvgf +hsgn: nbcb * dzdr +tnnz: ppnh + wqvz +gszf: 3 +fssn: 8 +frbq: zjth * chnw +lnqt: 7 +rdcs: 13 +lhbf: tjrm * lthq +pqqd: rdsr * tzqh +tbmt: rbrf * ljgf +rjds: 2 +bspp: 19 +fzdn: ccvt + ddcp +qmps: rrch + twqf +cbnj: dgfz + zsvr +vmrg: 5 +pfbw: lphq * fqvn +wssv: 3 +zrbs: vjdr + wcfr +dnwr: 3 +wcrc: 7 +vbbm: bsjj * pbdv +gjgl: wtdq * hbbd +sgmq: qwnb + shnn +cttq: 13 +rtht: vcdc + cttq +dflb: 9 +gvlv: 2 +sglw: jngs * nfdt +vpbd: mftz * pdqw +gncw: 16 +zdlm: hvmd / gvjl +nbdg: nslg * tqss +bsvv: 2 +cqqm: rmgt * ztcl +rdhc: npmm * wmcf +qghv: gmzv * swcs +jrwp: jnms * cbjr +dztg: nfnn + lgjd +qqps: lqpj * mncl +cqgw: gbgs + wmgp +gtdp: vbbm + rgqp +dvjh: vvmr * rwgl +cswq: hrqf * lffl +hqrz: nmsw * gmlw +sfdq: pjbw * tlls +mrnp: dqll * cfgj +spwc: 3 +lqhp: mtwt * tgjb +lvth: szbw * zstn +nthd: 1 +sgfd: frww + hplz +vlnc: 2 +snsn: 5 +hrjh: 7 +cbcj: 2 +jdsl: zdlj * vvmd +vgbv: ndns * srqd +bbwz: 4 +djwh: gdnq * prtc +zqfb: 3 +wtrg: vgfg * lnqb +vfmv: 12 +rjsz: 2 +vrdj: mbwd - rwwj +nnjf: 11 +vgdt: 4 +hmfd: vqnl * nhnw +mhmf: fpvt + cbnj +nqsm: 13 +drvz: 17 +mwmd: sgnv * qdmp +dnms: 4 +ljgf: plrq - jfhp +wnsq: drdz * hrjh +wcwr: 5 +zrms: 5 +dggg: dfjm + vvrd +nchw: 5 +slsc: 3 +mcrv: 4 +jlcl: 2 +bvrc: 5 +qlmn: 5 +gbsb: jlwl * jhzq +fdbz: rzjl * pbjf +gqqm: 2 +srcb: sqfs + fhpv +mvpv: 3 +zggc: 3 +rqsq: qlmn * lrbl +dbbn: 2 +mwfw: drqw + slmt +jlbf: 2 +vrrm: 2 +qstj: 4 +hmnz: 6 +dpcq: jgzm * fpbv +btcz: 3 +qfsd: 11 +plhg: 3 +mpdd: szwz - lpmt +fflp: 2 +zbhs: 4 +nrsn: zbhs + qqhr +qdrj: zwdw * zwdd +cjth: 2 +hvsp: mlpt * htsv +nzsf: 5 +zncr: 4 +sqmm: mwdv * qqdv +mccw: hhgr * sfqt +qpzd: 1 +flcw: 3 +hmlr: dgqd * tpnr +gwjr: hlcv + lbmv +nswh: mrnm * dsnn +gcnp: 8 +stcf: dggb + svgl +wcmp: 3 +qgjp: 4 +mlqq: rmnl * mcbh +fhvm: dfjd / dsjh +rlrh: 5 +qdsv: 3 +nhhf: 3 +hczv: 3 +zbwp: qnwd / ddjn +qjfh: wztl + jndd +mpqr: 9 +spbl: dqsf * clwm +hwbl: pjrb + tnnz +czhv: 3 +hntd: wfmf * zpqd +dfjd: wdvz * vjpt +gmlz: lwbj * shmt +wpcb: 2 +vplb: 4 +fhpv: 18 +srdm: frcg * qmjf +jqpd: qwbn + dltl +tcht: pcsc / nbwj +jnzl: lddf * sdhn +cwzt: lglf * bswp +dfjm: zrdq + zblg +wmmn: 2 +gpgr: cpml * shbt +gbjb: zctd / sjdm +wwlz: zzwj * qmpm +whgp: fqqc + gfrh +ccvt: pmzf * hmwr +vrcg: 2 +dblw: 2 +hfln: 2 +hzlq: 7 +slmt: dqbd * swwd +svlm: tdhw / cnjn +hwng: 4 +pnjp: 3 +dhfz: hmgh + lqhp +cjtg: 2 +gntz: ctbj * vpvb +hlst: mrmv + mccw +slpr: 14 +pjtl: 2 +nslg: 3 +lmbj: 3 +jhhb: wcwp + zptd +mqgt: 15 +wzbt: gqjw + rpft +dpnq: 10 +mnzz: gntz / rrgb +lrrw: dnwr * mszq +ccbh: 20 +dctg: 7 +ndrw: fchc / rcdc +lphq: 8 +mfsl: zdsq * qnfp +dmws: cqwg * tcnh +hlgw: 5 +fsqf: 5 +stfh: wlfz + dgnv +tbhj: nzpc + mcmd +gbql: rszn * rnpq +pbdp: jzpw * bqqm +vjvd: mfnw * dwfh +wbpv: 5 +dqsf: 4 +ltrv: 3 +wjpg: nlrj - qqcw +fbzr: 8 +bjrh: 15 +jjgh: llzv * rlcs +brng: ncdq * jrcz +rrfn: sfgz + drtr +sjvm: wbqc * cvsz +fgtp: 11 +ggdz: zqwh * bgpp +gnmw: 3 +blcz: 6 +dwzf: hdgv + wmlv +lchr: mmsv - gmlz +rwnw: 5 +sdhn: 2 +ppwb: 4 +qnnv: 2 +jbzl: 8 +fdgj: scqg * nwlh +tpsf: ttss * mvns +snfd: dlms * rdcs +nfzp: 2 +mngr: nqsm + spbl +fltr: qblv * cqsf +vgjw: rrjn + bltr +ddmf: wrhj + hwmr +vbsr: wscz * vpjr +stwz: 5 +pbpb: 3 +szwz: pqfz + ptrv +lvls: 3 +dhtl: phpq * lngr +zcbz: wbnc + dqnh +chbz: 3 +nwgz: rwlq * dhbp +zprg: srnc * rqnv +vhsp: bwhf - dqcg +fzdj: dgmv * pqbf +tpzj: 4 +hqgf: 3 +hsnf: ltdw - pwgd +rnhg: 2 +qwgw: qrzm + nddn +sbwh: 5 +gmtm: mfld + zfcf +fnmw: 2 +hhqh: 4 +tgjb: djwh / zqhz +jhzm: vplb + ntln +jhms: 4 +fphq: 2 +htjg: 2 +hfhr: 9 +prvs: 3 +jhcl: dctg * njzm +qzzp: 2 +pbmq: bjtv / bnhj +cqqp: 3 +mncl: 2 +rgqp: sgjs * fcmv +ddwj: 2 +nrcr: 3 +qwtw: hhtn * mjnj +qsdn: cznf + bcrd +nfhw: 12 +zbvm: 3 +rtsg: 2 +qrzm: 10 +mmjq: 4 +dqcg: 15 +lqpv: 3 +wnfp: 2 +qqmq: 3 +ghtq: mwfw + gbjb +lvgv: 3 +vvwr: 2 +hsqd: rvhg / rffm +csqb: fltr + bqhf +fjbg: 2 +jqzc: wvfq + dscd +pdgc: 4 +zwcc: 3 +swrp: tdqg + lbnp +mwdv: fflp * vzmd +jrjq: 4 +jgfr: 13 +qhpd: 3 +trft: 4 +gttn: 2 +jnqf: drvz * tzcl +sjcf: wsrd * tbqg +fbnz: 18 +dsnn: 13 +zmdf: bmdq - bfqv +wsjg: 3 +lvbh: 2 +ghnh: hwrf * wcrt +fzwj: 5 +wpfw: 2 +gfvc: 8 +ftvn: slrq + sdmr +vvfq: 5 +nwvc: 5 +dqsh: 2 +zdsd: mcvw + bqnz +nfnn: pzjn * sfrr +dwfh: 3 +cjlv: 5 +drjb: 15 +fmzb: pcff * wvbs +ffrw: 2 +ltgt: tmrb * ljrl +rffm: dtvs + qbmp +thrg: 5 +qdzb: 3 +rzdb: 14 +vddp: 19 +czgh: zhqt * zqbz +mdmg: 5 +trgl: 3 +qwbn: hqgw * gzvm +psbd: 2 +qfvn: 7 +rptm: 4 +qfmr: vprz / qpjz +gpfr: 3 +vnsw: zlvq - szbv +njwz: 3 +qvgf: 12 +lnqb: 2 +vjpr: 2 +gnbf: tfml * fmnd +ltbq: 16 +dpbl: vqlq + gcmc +tdzg: gjqn + qwjz +rlfs: 5 +bmcb: 3 +sbwn: zfjh - slpr +zzfq: wfbj * trft +jdgz: gbjp + hgzh +wvlh: 2 +shsh: 8 +mrfn: 2 +rbsc: fztw / jgnc +cpml: jbvh + jdss +nrds: nqzm - vdzb +bhqn: smzf * rtnj +zzmt: 4 +rpvr: plhc * bgfr +bltr: 11 +jjhs: 1 +zwhh: 2 +tzbc: sdft * mrpt +rndg: dpcn * mjmq +jvms: shpv / lzbr +wchc: 2 +hnvg: 9 +mbwd: gvcm / fbpw +qhqt: zdff * drvd +znfd: 6 +chzp: 2 +zqzm: hsgn - psbd +zpwv: 2 +wjpv: 3 +brfq: lcnj + rhcp +qbcc: lnqt * vjsw +fgmj: 15 +qjmj: 2 +dwhd: sdds + qpmm +phsg: gbql + zbwp +njzl: cqzh * rhdm +fccz: 2 +gsvh: 2 +dnnr: 2 +ndqq: bzpz + rczh +cqsf: thtb + qvmq +qclh: jpmm * fphq +tsrh: 3 +cbhc: snpz + nqbg +cqsn: 5 +qbmp: 4 +dslf: pfvn * rtht +fzrr: 2 +vqph: vqjv - bprf +dvzw: 7 +swpf: jfgh + lvvt +frth: qrsd / hgtd +ljwp: 11 +tzrp: 2 +glph: lmcl + ljhs +mgqn: vqph + zfqs +vrht: 2 +ljvj: 11 +gzvm: 3 +rlcs: 2 +qqjd: 2 +wlzr: sqfv * wwrb +qznz: rjhs + rbtl +hwrn: dlsm * tltf +nfgh: nzsf * sdmc +bpst: fldw * qbcc +ftlb: szqp * ljzq +vhwh: wgqf + nrcr +pzlw: jgnm - srdm +qfpl: gjrc * bjcw +tsws: pvnc * nqzq +dqbd: 4 +ggrq: hvpn + sbcd +hcpm: zbcv * qtms +dwtr: dhnc * vsqw +gvqc: dcwg * nbjd +mpnq: 5 +sbhn: 2 +lhjl: bfhs * btqs +slcp: 16 +lthh: bdfh - tljn +bnhj: 2 +ldjn: prrb * qzsf +fsln: mspw * cfwn +rmnl: hjqr * spwc +mvcg: 3 +gjvp: 2 +qhsj: bpqh * dfqp +rwgb: 13 +vtvb: 13 +cftp: 3 +lnsq: fsnr + ndqq +hjdh: 3 +gzgq: jbbq - stdz +fdrt: 2 +rqtq: 2 +vqmr: pqdp + jhct +qqql: nqjg - drrl +clbc: vjql + zwjp +prcb: 2 +qcwq: prsm * sptc +bjwg: 10 +mvrj: ghvf + qfcz +qpjz: 2 +shnn: mwsq + nqbt +hdgv: zcqh * rnsm +hhvn: 1 +jgqr: wqbh * fvcp +dggz: 2 +tgth: 5 +rhzr: 4 +pbfn: 2 +qhhj: 9 +jhvc: 4 +msfc: dpbz * jscm +vpsf: 2 +qrsd: prhr * pjbf +gzpq: ftvn * vvwr +rgnc: dfmq + drfn +rzmq: lddt + cdms +lzvr: 5 +pvgt: zcvt * zcln +wqsh: chbz * gjzt +vvzv: gmlr / gvlv +lldf: 5 +tzdb: 5 +wbzp: 3 +wghh: 3 +nvvh: 8 +sbdm: 3 +rwgl: ssll + hdfl +rmpc: 2 +htsv: ntlf + bglw +hjfz: 3 +vdrn: wswq * jlhs +jhnq: zdvc * ljsh +pcgn: bcgz * clbr +sqfs: 6 +nsdp: 5 +gtqm: qhpd * ccpz +jfcn: bdbv * wflw +dsjh: 2 +lzcm: 2 +fqbj: rdll - thjf +lbnp: 3 +npbj: 2 +tgnw: jdwv + tpzj +hwrf: 3 +zpqd: 7 +lbtc: vprg / cjrr +dvvm: qhhj * hhgg +gmgf: 4 +ggcr: 6 +ffhh: cpbf + pmvj +mspw: 7 +fqnm: sjcf + svjj +ltwf: 3 +zgvg: 2 +lgrf: 2 +rcdc: 2 +fldw: 2 +wcrt: 2 +pzns: dmqp + mfzw +qljv: 12 +mfnw: 15 +gngl: 4 +zgfg: 5 +llzv: wbtg + rndg +jmzc: 8 +zqfl: mjbp + thrg +hcqd: 14 +phjt: 3 +zbwh: mdmg * bpdd +qrcq: wbwr * zflw +vbrw: cbql * vhhg +npwd: jfrm + wtrc +qnwd: lrsr + hsmz +bmdq: dqtw / fpzb +hzhj: nphh * srjr +mlqw: 3 +nmfz: 3 +gzct: vmhc + zpzg +mhtf: 19 +ngpj: zllz + qsjb +hdvb: pvqc * grrm +rwvr: 3 +jbmv: lrvl * ltgf +qtsp: 2 +vjhz: 2 +gbws: swlv * cbzj +rgzj: 12 +nqmg: dccz + grgg +wsfh: 11 +mplj: 2 +hwqh: lvth + rfcq +wqvz: swpt * crqd +wgst: 2 +gbjp: 14 +sjcl: 4 +nhnw: ftvw / nqvm +tbfn: 5 +sqps: 1 +jhzq: 7 +clvw: 2 +drpm: jbmb * dsvp +gqvz: 3 +ddcp: dpsj + qcqg +lrbl: 4 +qfgj: fqtr * qfwm +rjbs: fjth * zzmt +tjzs: vjph * wdwp +rgdz: psjc + qpzd +dnss: szjv * gwqj +wmgn: vfmv + zsgq +jlnr: vhrh + lsdb +pmzl: zcbz - qqdr +szqp: 3 +qzjf: cjwd * vlgt +plvp: hmnz * vzgn +npmm: 4 +hhbf: wchc * hcsm +qrjj: cdrq + hjtt +jbgz: dwcj + qnsb +hljg: tmrs * lmlf +dbhj: ghlr + cqsc +rjgn: 7 +wmgp: bmcb * ltgt +lgjd: wncj * cddt +ptbl: 8 +hwnc: 5 +vhhp: 9 +swbm: 2 +gmlr: dbbn * qdqc +bwgt: 2 +vgvr: 9 +zbqw: mrfn + vhhp +lrsr: tjzh + ljvh +rbqs: 4 +gbgs: jdcw * tmlv +djdv: lthh * dmzt +qjww: hnvg + cslw +sfgz: mlsh * lfgv +vwzm: nnjf * dnms +hsgq: 3 +pfdg: sbhs + nthd +jdld: rdhc + zphq +qzsf: cblt * gcfh +mrrw: cqgw + hwqh +bvmw: ftrp * sgsf +ndnh: 15 +rnmq: 3 +cdts: 1 +tqbd: 13 +lhwz: 2 +ghtw: ntvz + pmgh +rvrh: zzfl / qljv +lmlf: rslf * ctgj +blvv: qmfd + mnzz +tnpl: 2 +zdvc: fdfs + nlbq +twlf: 5 +hjqh: 1 +gcvc: vhjf + srwd +rrch: rnsp + mrgf +bmcq: 2 +vlnn: ntfb * tqbd +jdwv: 13 +bssq: 5 +vprg: lpdm + gfgw +jhfh: 13 +rldc: 4 +brzb: rsgj + qdjw +bmzn: 16 +rnsm: jgdz + hdvb +dqtw: hhbf + pbsw +bvfz: ntvp * zzzg +vzfq: 1 +ndmz: rsbp + pqbb +qsbn: wnsq * lntt +twqf: mrrw + tzbc +dccz: mgmz + vblr +slrq: wfdp * czhv +rwfh: qdsv * ltwf +rgzh: rlbr * jlnr +nrcp: 2 +qbmt: 4 +fgwf: 14 +dlnn: 3 +lghs: lvlj + dcdr +dfdt: lvbh * mfsl +wlvd: rtjg * mcrq +qpqf: 3 +nvbn: 2 +zrct: 16 +ppvd: tsnc + gpcs +qbjb: 4 +sfcw: 3 +rpft: 7 +cfwn: 3 +sdqr: 3 +bdtq: vslq * swgb +mwsq: fjhg * mlfz +rbrp: 3 +hlpn: 3 +mcml: cjfb - hljg +pghl: 5 +jrtb: 6 +tsjh: wsjg * fnnp +rslp: 1 +qmhm: sglw * qnvh +htws: 3 +pflr: 9 +tmlm: qsps + nfww +fhtp: tfcs * zbvb +mpzv: 11 +hcdb: rsws * frbc +wsrd: 4 +nrzf: fqnm * wgmz +zlgb: 2 +cvsz: 2 +qmws: hnmn * zphv +tqcl: fchw + ltcj +dwqn: phsz - zhjq +wwpl: tnsg - bfpr +mvld: dpwg * gwsq +bvpn: 2 +gldp: 17 +cjfb: gglv * prcb +lsrq: tnld * brcf +vlhb: znfd + fnbv +fddl: fdcc + bnpc +pnzw: 4 +wnhh: snsn + tqcl +rdlm: 3 +qzrq: 4 +hshc: 10 +fvnq: wghh + zbwh +hvld: 12 +scjv: jdsl * dbtc +qsrs: 3 +clqv: vnfh * tqgf +tjrm: qqjd + tlvw +tnnn: wfcw + nrft +jqgw: shtf * zdmv +znbs: rlmb * npjr +vjdr: fnth * dmbt +qbcw: mfvr + wzrj +cwpd: 3 +qclt: 7 +hmcg: ngpj * bmzn +rlmb: 15 +nsfm: hlst * pflr +nrrw: tcht * gvcd +fvcp: 2 +ttss: phpr + nhsz +zlsm: 5 +gchn: lqrl * nzvp +crqj: gmfd + hsnf +qpgh: 2 +djml: 9 +rmbs: 3 +dmbt: 9 +qmwn: 13 +rlbh: 4 +hsmz: bzlc + mpdt +lvsf: 5 +sjll: cljp + hzbt +rjhs: 7 +wdbp: gwlr - fbtw +sptc: 2 +nstl: tczg * cfqd +qqdr: 4 +dltl: 9 +rcjw: 4 +vwvq: fdjw * sjcl +wbqc: tcdr + gchb +wfcw: 1 +stnl: drqh * qspn +zshw: prdl * vgpm +dhgd: tzcd * jcrl +jmdd: jhfz + scjv +tddw: 2 +hhrw: fnwg + fgmq +grdv: 2 +rwwj: qfgj / grdv +wfhs: jplz * mzpl +rsgj: lghs / fnjs +vqbc: 7 +rnsp: 5 +fcpp: fzdn + gvjj +bfpr: zqwt / bdjh +fhgd: jwwz * nsgl +lcjr: pjfs * qmps +ptsd: 4 +zdmv: 13 +rnrm: 3 +dqpp: fdzz / hwnc +rvrs: 2 +cjrr: sfcw * tddw +dsjw: 14 +ctbj: njgt * dlwg +hvmd: rlwf + fgnb +pfqf: wjpg / fnmz +tdlv: vpsn / bdtf +mzqw: 2 +zwlv: 4 +qvmq: 12 +bjtv: wpcg * frth +psmt: 15 +lfvb: 7 +lfpw: 5 +ltfq: 2 +hfgh: 7 +rdhf: fmpr - shsh +wscz: 3 +ltpq: 18 +rtnj: 2 +rtvg: vgrt + wwgq +ldsj: 12 +rszn: 9 +qvzn: jwms * lncb +pjmv: 3 +nmnp: 3 +hplz: vtrg * nslp +qdbs: 2 +lrfr: 2 +nltn: 2 +gmlw: 2 +zdlj: 2 +qspn: mthc + drjb +rrpm: mngc + ntcl +sfgt: gncw * wrcg +dtvs: 3 +fccm: 7 +zzfl: nntd + lgwz +rrzw: 15 +ncnj: 3 +tmqd: 2 +wbwr: 19 +dsbg: bcrg + jmzc +splf: 2 +lhgj: lgrh + gwsb +wlff: 4 +qgbp: vwmc * wcct +tqwm: 7 +twms: 5 +rghp: 1 +tnld: rmbs + qdvb +mgmz: lhmc * gmtm +pmvj: 16 +jplz: 4 +ntln: 3 +ljrl: qmhm + vgrj +rnrt: 5 +dzdr: 3 +qmjf: 4 +zwdw: qcrb + lvcz +cdwb: 2 +htjt: vgbv / rlbh +rfht: ghls * gbhg +fgws: 4 +pfrq: 8 +ctnb: lqhd * rztw +rtjg: qhvz + qwgw +ghhn: zgfg * fjbg +srqd: cqbn / mtgl +sbfw: vbwn * rrbf +rmdw: fbjd + tsrh +hjcf: vjhd - qhlz +vvcs: 3 +qcqg: ltnm * nhjq +gfgw: wwbp * zdjq +vfjh: mbzg - gqmd +fgdw: mzlh / qqbb +pnht: 2 +qnvh: 2 +grpp: vjvv * mghm +prhr: 2 +tlgj: 11 +nwlg: 3 +tdqg: 4 +vjnw: qbms * vlnc +ltnm: 2 +dlwg: 2 +tgjw: 17 +cddt: 7 +qqwt: jnzl + lqlq +jqmw: cprg + slcp +mspc: 3 +jfqz: sdfp + nsvq +vgfm: 2 +wcpl: wtwt * htqn +cdjv: 2 +nwdl: gptn * qjww +jrcz: 4 +nzcg: 3 +pptr: 2 +pbjf: wwzw * lmgz +tjhq: 2 +crgv: 3 +vdnl: rgmm + jpmb +bglw: 3 +jbvh: 19 +zsbr: dwsp + grwz +vtwd: 10 +vwtl: 18 +hrqf: 4 +fdzp: 2 +nqbt: lzlw + lncv +dcdr: tczn * zqfb +jngs: 3 +mghm: 3 +jgdz: hfgh + hpvd +wpzb: hrds * fgqb +rwbs: fdrt * qfpl +swlv: 7 +zqwq: qlmw * gnjt +gvcd: 2 +qsvt: 3 +gvzl: 12 +qttj: 6 +qtcn: gtfn * qhmm +cfhc: 5 +hgzh: rghn + znbs +vpsn: mcrv * ggcr +fmlc: zlld * vqmr +cfcv: njnw + qgjp +zblg: 6 +gvmz: zdfj + ntts +mpwj: jghs + lzcj +sdgw: rtsg * qrjj +lslj: 2 +vjql: tmdt * zjvz +tcgt: qflp + vptp +zrrp: 5 +gtzj: wwpl * lmpq +dslz: 17 +dlsm: wwqw * dggz +lsrc: dhgd + fdtp +scrq: dpnq * bhcm +slgd: 5 +whsb: 8 +zqqq: 2 +znrl: 5 +gtbw: 3 +gvhs: 3 +dgjq: 2 +fggl: rzsg * pgjl +nslp: wjgh + fspm +cqsc: brzb / cjlv +gpcs: cfvr * qtcn +qgdq: btjr + sqrg +hsjd: 4 +tmhv: tpsw + rlrh +jhbj: 3 +vwzc: 4 +cpcc: 4 +njsf: gbsb + qdbm +smzf: 5 +hfnw: 11 +zbcv: lrfr * gnnn +nqwj: jfjc + dblw +hcnc: 10 +mfld: 5 +wlwb: fccm * hrhn +hsgm: 4 +zhdc: jpnc * bwgt +mrpt: bzsp - crgv +fbpz: qhsj * bmcq +wtrc: 10 +jdfh: 5 +fztw: zwlv * rtsq +mhvd: 3 +lbnl: pzns - zbps +dthm: 3 +lvrn: 2 +zbqr: 9 +ltjs: 3 +gwbq: 3 +ncfp: rnhg * jjpq +rfnn: 6 +rzsg: ngpw * mpdd +dhpr: mpql + gnmw +vptp: 17 +cqzh: 3 +rfcq: bsts * hmhz +pbtd: lsrc + cgmz +hpvd: vdsc + rslp +zpzc: 3 +pdch: sfsr * qqzc +mvzp: hsmf * tftl +shbt: 2 +pllr: 14 +twjs: 2 +sgsf: 5 +bzsp: rjds * pfrq +dfbb: pjtl * dwnt +tfhr: 2 +fcmv: wdrl + vdrn +lvmp: psrg * qnnv +dtdn: sgmq * rvct +tndn: 4 +pgvg: 15 +bqsv: 6 +hvmn: hfgr * vjpr +ddjn: 2 +hcsm: fqgb * nddj +mrfl: qfvn + zqsd +dmzf: 19 +nvwc: ndcw * djhl +ltcj: gshw * vwvq +pwgd: 5 +vwvw: zqbf * jdgz +hrdz: vpct * nvhc +fbpw: 5 +bwbp: 4 +fdtp: pfmt * bspp +zwjp: 7 +cjpg: wmgn - fjvt +hsgw: gtmz * qjqf +ddww: 1 +tgcr: 5 +nwlp: fvrp + gvzl +qfcz: vdvc + qqps +rdfg: ltrv + tmbn +mrnm: jmwl + cmtg +mwfh: 2 +fchc: ltfq * zdsd +mvjh: hcnc * dwzf +mqvf: zzch + prpr +pppb: 4 +gqvm: mpnq * jvrc +rvct: ghrt + vwvw +fqwr: 3 +jjhq: 17 +rgrh: 13 +wrnh: wnqs * bbpl +pgjl: 3 +bcqt: tzdb * jgfr +vmhc: lnsq * hdwb +ghvf: zjmj * zwcc +cvrp: 6 +thjd: nsfm + rqbg +chnw: 17 +zqhz: 2 +zssz: jbdn * nqgn +grmv: 19 +twgl: rqdw * lhwm +rztw: 2 +zcqh: sbwh + dndh +sfqt: rgrh * njzb +vfjb: mwrs * cmbl +tvsq: 1 +nspv: zrms * zdmr +ljhs: 2 +pdbp: 2 +hndl: gvqc - csqb +qdfl: 3 +svgl: 10 +qzdt: thjd / dvzw +hqgw: 5 +nddn: sdqn + clvw +frhq: nvch + jfqz +lqwq: 10 +gqbt: bqqc + dwhd +qrpz: 2 +zlvq: dwqn * qbjg +zfjh: wtrd * nzcg +wdvz: 2 +gptn: mlbt + phzf +qjsb: hflz * dsws +phpr: wtdr + srbz +mhnc: 17 +cphf: 19 +qthr: dbvd * lcrq +qvnz: wmmn * wsfh +cdwn: 2 +sgnj: 13 +nrss: lhgj * ncbn +zqwp: 6 +zhnv: 6 +gwsb: dslz + gghs +czcd: wjbn * pbpb +szbw: 18 +lvcz: zzlg * cdjv +fvhc: 5 +cjjw: srlj * thfm +bpdd: 2 +mfvr: 2 +bswp: nrrw - qsbn +fbdv: 5 +snjr: 10 +drlm: hqgf + hrpt +pqfz: 15 +rwrv: 2 +tjrs: vjst + dvvm +tjft: ppjm * gspg +gplp: 1 +mhds: svnv * nhbw +mtqh: pbtd / lqpv +jsfp: jrcd * fttj +qdjw: qwql - ndrw +mzlh: rvrs * fwrg +plhc: 5 +qdjd: 15 +zgbc: 4 +cbmp: 3 +jpmb: 3 +cbjr: 2 +vqjv: crqj * mqqg +ssmm: hpnl * jlbf +fgwj: fbdv * wjvr +hdfl: lztq + mbrz +nsgl: hgzz - fggl +mgrg: vmzm - nltn +bhcg: 2 +gwcn: mzqw * dnwv +tccz: nblt * rptm +rhjn: mcpr + vmpn +tmbn: 4 +wvzf: 5 +rfvw: dbmn + cnjs +pfmt: 19 +jwwz: 4 +wqlq: jjgh / gfjz +cdms: nswh + hfsr +dsws: 4 +ljvh: zmft * hsgq +dhbp: 2 +vnlq: 5 +vdsc: 5 +vpjj: 7 +crqd: 10 +pdqw: bhfp * lvls +vqnl: 2 +wnqs: ntrq + lfrh +cmtg: 15 +lqlq: dztg + zvwg +tmzg: jrwp + hjqh +cgtl: 7 +psrp: 5 +qblv: 3 +bpqn: hwbl / bhcg +lqrl: twgl - frhq +wwbp: mcml / dqsh +zdvq: 6 +vhsr: tcwj * npbj +flsd: qzcr + tqlf +cnzw: 3 +hmrj: hwsg * twjs +ngpw: 2 +mgrf: tvnr - bblg +ttcf: 3 +pswr: 2 +vgfg: bvwb + nrrs +sscp: lbfg + fbnz +hrds: 4 +bvnl: 4 +dwcj: tjzs * pplz +sqrg: ljvj * lslm +shpv: gjvp * rtcc +mbzg: rcnm + rdlm +rgws: 5 +lqfd: 1 +jspr: 11 +lsrm: pfcp + bqgg +pjbw: jqmw / crrf +gndm: 5 +drtr: 4 +zzwj: plvp + npwd +hzgl: mwmf * zdlm +qgcj: vffc * dsjw +bqqm: rwbd * nwvc +cgcp: bcqt + pfrr +nzvp: 2 +ljsh: 3 +vjvv: 11 +lzmm: lhbf + sqps +srnc: jbmv / rswq +lcrq: 2 +tfwj: hthv * flcw +fdjw: 4 +qbjg: 2 +vjtv: 2 +zcqf: bwtq * mcmq +fqtr: 2 +cpjf: 4 +sqtp: 3 +spst: 2 +vzvn: ftlt * rgws +mcbw: 2 +snvp: vntm * nzmj +tzqh: ftpr + ndft +qnsb: ntbw * lvsf +phpq: swpf + pppb +bprf: nprt + dpsf +bnmz: mbrp + gswb +tvhg: 11 +mcpr: jmpj * bhvp +zsgq: ccdc + vgtv +gqdv: 2 +lzbr: 2 +rdll: wnfp * dbhj +plrw: 5 +sfjg: cmjp - fqzs +vrwt: 5 +brtj: pjmv * ddmf +gswb: njjj * hdcw +lwnh: tpsf * pdbp +fjth: 2 +hhlw: gqdv * dfdb +vsvq: snfd + spft +hhqw: wqst + mbff +tmbj: hhvn + qvzn +pqdp: hzms * pgjh +nfww: 12 +nfvg: 2 +jvmf: vpfh + fmwr +nbcb: 3 +jdss: zlzh * qbcw +jgnc: 2 +vtrg: qsdn * mvpv +bdtf: 3 +zzch: rlwz + dslf +vhjf: pvgt * zvgw +zzzg: 2 +twbd: gqcl * gjfj +phzf: sgfd + qmtt +ndft: clqv / vhwh +dqtb: 19 +jscm: 2 +dmqp: prfg + bwnh +lgwz: hsfq * blpc +rltv: mbth * cswf +fjhg: 3 +nrft: tndn * vgfm +qcrb: 2 +pwvz: fgmj + vmjj +zvgw: 2 +zqwt: scbh * rrpm +grwz: jqpd + qbmt +zdff: 5 +lncb: 4 +glcm: cmpw + lwnh +wncg: pmzl + nwgz +mjbp: 2 +bsgh: 2 +zlld: 3 +mcvw: cjth * sfgt +qmsl: njsf + rpmn +nrhp: 3 +njzb: 2 +wdpr: 5 +ggvv: vsnf * qmsl +rlbr: qdzb + qndp +hrgt: 2 +vhfr: nsww * cnzw +gmfd: 7 +lcch: 7 +svnh: 2 +gglv: grpp + tzbz +hnmn: 4 +ptzn: 1 +wfpz: sqmm + qhwd +dbvd: ndrr * mqvf +wqbh: zpgw + jlcl +vwsc: lhjl / gqtq +qdqc: gtdp / mvlg +wpqc: 6 +ltjl: rmqs + fvhc +spft: dtld + sfdq +cvcb: 11 +cznf: vbsr * jdvl +zcgn: 2 +hpvv: 2 +scbh: jhzm + fddl +fnmz: 4 +npjr: 2 +fgmq: stfh * fhtp +jcgw: 9 +rnpq: 2 +bsdn: 1 +zphv: 2 +wbtg: qzdt + hdfn +hgtd: 2 +rgjq: 2 +tlls: mlrm * fjsj +qqzc: 3 +fmpr: zqzm * mwqm +lbmv: 4 +dbmn: dbrm * pzdw +zgmj: 3 +tljn: wlzr + jbgz +qwzf: tlnd * pwrv +lwdw: 5 +zdfj: tdpf * plnc +jtdt: 6 +mvns: 2 +sfrr: lltd + wjzm +zpgw: 15 +bgfr: 5 +fchw: 3 +ngnl: tptc * tdlv +jwjz: qcwq + sbjd +wjbn: nhpp + qlrh +svjj: 13 +jtvp: 2 +nqzm: zbqr + sjll +rwlq: 7 +zdjq: 13 +prrb: cvrp * ddwj +nfdt: 3 +qtms: ltjs + cqtl +tcqt: brfq + cjjw +qwnb: hmlw * jtdt +lffl: 11 +lrgh: vfds + rlht +ldbn: 2 +vgpm: 2 +zmft: bsgh + plrw +pmcv: 15 +dgnv: 3 +qnfp: 2 +grgg: qfpd * wnzl +fshg: 2 +dwpb: fsvl * sdgt +qfsm: 3 +cjwd: sscp * bmsg +swwd: 7 +pbdv: rrfn * sdqr +cblt: mwmd - nnrc +wvfq: zssz - mlqc +zvwg: 20 +zflw: 2 +wndj: 2 +vvrd: rqtq + rbvb +lbdq: vlnn - pgjc +vdvc: 3 +wlmc: 5 +zmbl: wlwb - zjsb +wlrm: cgtl * gnbf +nhpv: 11 +qsrb: mnsz * dhpr +gqtq: 2 +dfqp: 2 +zvvl: gqbt + zrbs +bqqc: slgd * ghnh +lhwb: 2 +cbzj: qdrj + qdjd +fdcm: 3 +glfm: ptsd + ffzr +wrcg: 2 +fgnb: lcjr - gbws +nprt: 12 +vgch: mvrs + tcrw +wjbg: ldsj * dhpm +mrgf: swrc + jbjn +rlwz: nvbn * hbtg +dwsp: 1 +fgqb: 4 +bhcm: brng + jdns +rgjl: 8 +wwgq: dhdn - vzfq +rnvc: 3 +bqfs: fgtp * nfzp +drrn: 4 +tngn: tdnl * ndcb +fvww: lsrq - fdgj +mcpz: 2 +pgzd: qzrq + bqzh +gjrj: 14 +nphh: 2 +mmsv: phsg + smmf +pcsc: jzwp * vgch +jqtr: 7 +vllp: 4 +nvtj: 17 +nspp: 6 +qvvb: 2 +rjdp: 7 +bvwb: 8 +gjwj: gqvm + dldn +dhjg: qmnn - qgbp +drrl: vwzm * pnzh +wfjz: fblv * mfrt +cslj: rgsz * vnsw +ncdq: 4 +cpbf: 7 +wfbj: ltbq / wpcb +bsrh: 6 +pwrv: 2 +mlpt: 2 +gbvp: wgrr * hpvv +bfhs: 2 +gzdz: 19 +fbtw: 1 +lthq: 2 +qwvh: 2 +psrg: wfhs + dmqr +hpsm: nmfz * zwhh +czls: nwcr * zqwp +cblr: pbmq + ljwp +lwgb: ssnv * bvmw +fbws: zsvj * qmwn +mbmq: nhzv - vfjb +hvpn: vwsc * wjpv +zqnb: 6 +jqjq: 1 +thfm: smdc - ldjn +glql: cqqm + glcm +nddj: lbgv + svnh +hjqr: nwdl - zmtb +vjsc: rgzh * fnmw +gprd: bpqn - hrbj +rspm: bcsb * jnrd +thtb: 11 +bnst: zfft + nffw +lfgv: 3 +hrhn: 7 +wpmn: snss + lmmr +zjmj: 2 +dnwv: hvsp + fsln +vddd: 2 +wdrl: 3 +bctp: 2 +hsfq: qznz + vtwd +ndns: 4 +zdmr: 5 +rtcc: vqnj + srcb +cmbl: 14 +pmzf: rrzw + ptzn +jzpw: vtrw * cpcc +jztg: 3 +hzbt: 10 +dpvs: 3 +mgjg: czfw + jvms +rrjm: 11 +cnpg: 5 +wtjj: 7 +tzcd: tjhq * crfw +rrbf: dqpp + hrdz +lzcj: 4 +gtmz: 14 +hglz: jhnq + zzfq +vjsw: 3 +wfdp: 3 +crrf: 2 +njgt: wghz / qbfj +lgrh: 4 +dhdn: 14 +bzpz: zprg * tqlb +pjhb: lbsc - mtnb +wtrd: qdfl * ffrd +cvbp: 2 +bvln: 1 +ghrt: 11 +qgqq: rbrv + gzct +ssnv: 5 +zptd: 5 +qhgt: vrcg * hlgw +jfvp: vqbc * pzmw +bpqh: 7 +zsvj: 2 +szbv: hwgl * zbvm +pbzf: nspm + jjhs +root: rvrh + hzgl +rwvf: wtrj * bvgr +frsl: wwvb * fqwr +hmwr: zfrv * lqpn +ntbw: tjft + gvff +zcvt: 5 +hgzz: stnl / tmqd +wtrm: 2 +gvff: mvjh / lfpw +sdmc: zjsz + rjdp +mjnj: 5 +shtf: 2 +lglf: 4 +bztd: 2 +zwvf: 4 +vqlq: hhqh * rnmq +lddt: ndmz * pghl +qdlz: 3 +fqvn: pfqf - lzpj +qmnn: sbwn + bdtq +ssgq: dzcm - rnrt +bwhf: vbdp + ssgq +qmfd: npsp * ffrw +bgpp: 5 +bblg: qrvz + nbqc +bhvp: 7 +wwrb: mrjn + sbfw +cnvr: 5 +wfzd: lwdw * tnbq +rvhg: wlrm + zfsd +hbpd: vlhb + rgzj +bdjh: 2 +mthc: pbfn * vvzv +jnrd: 11 +lmmr: bsvv * qflv +rcnm: 5 +dzcm: lnpj + ttds +qhwd: wlff + zpzc +smmf: gwsw * vhfr +qjfp: 16 +dqll: 2 +tqlf: 10 +ldgg: 5 +pcgr: rnvc * sqcn +dpcn: 5 +mqbg: 5 +vlwn: qwhd * djgn +pvqc: htjg * hjfz +wthg: bssq * tgcr +cbrg: 7 +wjgh: nczm - bztd +plrq: qrlv * lhdb +ttls: 3 +ngsw: cphf - fgws +wflw: 3 +tvnr: rzmq * rhfv +sdqn: rfht / qwvc +wgmz: 2 +mfzw: 8 +bbpl: 2 +wcct: 3 +vslq: 5 +lslm: 5 +fqzs: jfgq + jrtb +sbjd: 1 +pvgs: 3 +pvlt: cfvm * vqhl +pgjc: nchr * gpsz +dfqc: qrpz * zcdf +dmqr: ggvv * mjtl +tsgc: gngl * vhsp +prrr: 16 +mvdp: 4 +pjrb: jlqd - hcdb +humn: 2116 +qqdv: 2 +qjtp: gqqm + gzdz +nnnf: rwnw * blcz +vvmd: lwnp + gmqj +tcwj: 3 +ntvp: jgqr - gtqm +cdsv: lmbj * rtvg +nczm: fhlv - pnjm +clwm: 4 +bhql: plhg * wdpr +mjjz: 4 +jfrm: fpvr * wwlr +hmrh: gvph * vpsf +mjtl: 13 +hdcw: 2 +fnmc: fmzb / vjtv +tmlv: 2 +szpj: 3 +lwnp: qghv + cpjf +ntlf: qtsp * tbhj +dtqt: ghtw + fwqh +lrjp: qjtp + wfzd +sbhs: 6 +hlbd: 2 +ltgf: rzdb + pdch +dvqg: hfnw * hzhj +bdfh: tbmt * lfvb +lbns: ghhn * bvpn +tnsg: htws * mwrw +gwlr: qwzf * gtgv +nvhc: 2 +gqmd: 1 +gtgv: 3 +ffpm: 2 +ssll: 2 +dphn: qjfp / swbm +rtsq: fbzr + ntgh +ndrr: 2 +nqzq: lbtc - qfjc +gvjj: wwwv * mvdp +rbrv: znjn + ljwz +pfcp: hgpp * pfdg +nnnh: czgh + jmdd +qbwc: 4 +ljwz: scrq + zvmq +tcnh: 12 +jcpn: czcd - hsjd +ncbn: 7 +tczn: rwgb + nrds +hlsz: 7 +fwfp: 3 +zjth: 9 +mbrp: ghrc * bbwz +pjbf: 11 +cfml: 3 +fbbd: 3 +fnbv: zvbf - ttls +wpsr: 2 +wvfc: 4 +hwsg: 5 +nnhw: 2 +btzd: cblr + rqsq +rzbv: fqbj / rbtq +hrpt: rgdz * nrcp +mgmq: 3 +lrhc: 9 +tzbz: lzmm * ldbn +tfml: mztw + njzl +gnjt: 2 +thtr: tzrp + cfhc +chjn: 4 +wmlv: pbdp / hgmg +rgmm: cbmp * qjmj +cvzr: lgrf * fvnq +cfvr: 2 +ffrd: 5 +mcmj: tgjw * fqjf +bmnj: zsbr * wcwr +mptz: gjwj * lwnm +nljw: pvnb + pjbv +ntfb: pqpc - dfbb +tqlb: 2 +wwwv: gtbw + psrp +rqnv: 3 +lnld: tvsq + rhbs +hwgl: wjbg + vjcv +mlrm: 2 +ncsc: zmbl * ztjp +vpjr: 5 +cfzl: 4 +rnbb: 3 +vhwz: 2 +vsfn: 9 +wwvb: 3 +zlzh: 2 +vwnz: hthz * nvwc +gshw: 2 +mlfz: sbhn * wqnh +gjzt: 3 +dgmv: 2 +lnwh: hsgw * nbdg +qrlv: cwzt / tjzc +snss: vvfs * cqsn +srlj: 2 +zjvz: 2 +cdrq: nbqj / dthm +fbtg: btcz * mllj +vzgn: lcch * phjt +wwzw: 3 +vmmb: 3 +bwnh: 6 +dssg: tmzg + ctnb +qsjb: rjbs * dnnr +bgzf: dldc + whsb +dndh: 2 +shmt: 5 +bqgg: dpcq - zbqw +cqwg: drpm + mhnc +njzm: 5 +mlqc: 3 +rczq: mtqh + gchn +hgpp: ddww + rmdw +sqfv: ggrq / whtt +sbcd: rnbb * stcf +vjcv: svlm + qjgg +wfqs: vgjw - mjjz +ndcb: rspm + mlns +vvmr: 3 +pgrf: pqqd * bhqn +jgzm: 17 +nwzl: fzrr * hhqw +gvcm: pfbw + nhdw +pzml: 3 +wgrr: tlgj + wvlh +ghhd: dmws - fgdw +gbfg: 4 +jfqf: 3 +tpsw: hsgm * zgcv +qsps: 1 +qwhd: 2 +hjtt: wvzj * fhdb +qflv: 17 +nrrs: 3 +lsdb: fngv - tfwj +wbnc: cdwb * wfqs +glmj: zmdf / mhvd +drdz: lldf + hlbd +cnjs: 1 +pslr: mpzv * nddq +pvnb: hmts / nrsn +vprz: drlm + qqmq +ghrc: 4 +zfqp: gldp * nqwj +sfhp: ghtq * msbw +vmzm: nnzd * pptr +rqbg: cnpg * gndm +zctd: humn - dssg +dldn: wssv * wpsr +bqnz: qpwc * btzd +tpnr: wzvg + frsl +lnpj: tnnn + zrct +fnth: 6 +nsvq: zphd + vllp +rpmn: hwng * fmlc +srjr: 4 +lhmc: mngq + pdgc +jbdn: 5 +tmrb: 2 +dqpm: 2 +tptc: srjb * whgp +rqdw: rzbv + zfqp +fmwr: bfss + lpcs +tfpm: 2 +tjtn: djml * qttj +jlqd: qfsd * bnst +dcsr: zfjr - bsdn +mlln: 1 +rhbs: dwpb * fdcm +qrvz: rgnc * grmv +cmjp: cvcb * nmnp +cswf: jzch + wnhh +rpgq: gqvz * vtvb +qsvl: 10 +tfms: 1 +zqbf: 2 +fsnr: ncfp + mgqn +lwbj: qmws * zlgb +hfsr: 8 +qfpd: 2 +ccdc: 3 +wqnh: 7 +lhdb: 9 +qlrh: 6 +fpzb: 5 +mszq: 3 +gdbj: 9 +tjwg: wvzf + cbgg +bqzh: 2 +ffzr: 3 +fmnd: 5 +srjb: 3 +scqg: 3 +jbls: 11 +mpdt: fwfp * hfln +gdnq: 2 +bbqc: cwpd * mvcg +gghs: 2 +cvjl: 2 +hwvh: 2 +pqbb: vrdj / fbbd +gjrc: 4 +dggb: 1 +wghz: qgdq * pnht +fnjq: tmbj * hndl +rdsr: 4 +qhvz: mgrg * snvp +qbmj: szgp * qrcq +qhmm: zhnv + wtdp +blsl: 5 +fqqc: 4 +gncg: 3 +fnsd: 3 +fdfs: 13 +wzrj: dhjq * pqzz +mftz: rlfs * wqlm +wdwp: dfqc + hglz +nhpp: 6 +jsdb: 2 +rnwr: hlpn * fdfh +zqwh: 12 +bfqv: hwrn / fccz +rcvb: 6 +wgqf: 4 +tcrw: qthr / zpwv +jmwl: 16 +djgn: tsjh - bqfs +gqcl: 5 +qjqf: 6 +jndd: hfhr * hmrj +lmcl: 9 +cnjn: 2 +vnss: 5 +vblr: gpnz * mvrj +hbtg: zqnb + tfms +mnsz: 4 +zfjr: 20 +lrvl: 2 +vfds: cvzr * rwvr +pwbf: 11 +prsm: 11 +jghs: 2 +qbms: 17 +qvwq: vwnz / swts +nchr: 5 +mbth: 2 +gbhg: 2 +zfft: 13 +nbqj: lpzw * htjt +ftlt: qwtw - dphn +dvdn: 2 +lwnm: 10 +bjcw: 2 +dgqd: 3 +hgmg: 5 +vzmd: 3 +wtdq: cqqp * zcgn +tfcs: 3 +mqmd: vdnl * zmgf +vjhd: gpfr + lbns +nvcd: 18 +jmrj: 3 +qmpm: 2 +wfmf: 7 +zwdd: 2 +rbrf: 2 +qpmm: vhzt + fzwj +dtld: zqmw * wpqc +vjph: 2 +sflz: zvgl + vfjh +vgjs: fnmc * tnfg +qbfj: 2 +zllz: jcgw * nvfb +ghlr: sjvm + fzdj +zcdf: ftlb - rwmd +fpbv: 2 +gqvj: trvw / mnwm +hrbj: fhgd + qjfh +cjzf: 8 +bvgp: szpj * qflg +tqgf: zwvf + vvcs +frbc: zzzt * mrfl +rwbd: 2 +mfrt: 3 +dscd: 4 +hcwn: pjhb / bctp +gfrh: 19 +sqcv: mlqq - tsws +prpr: nwlp * jztg +gbfl: fssn * dhjg +vsnf: qgqq + lnwh +slcf: 1 +pctv: 3 +jlwl: jsfp * tnpl +rgdr: 5 +rrjn: rwfh - nwlg +npsp: dmzf + rmrt +hpnl: pmcv + cbrg +gmqj: 5 +vvwh: dtdn + qzjf +cbnp: 5 +scpz: 2 +ttds: gfvc + ggwf +nhbw: 8 +lmgz: rgjq * bvnl +fnwg: wrnh - wdbp +tglj: 5 +wtsb: tjsc * mcbw +jdwl: mlln + hpsm +wwqw: 5 +zgcv: hgqv * drrn +ccpz: 2 +crfw: vgjs / sfdg +fhlv: mngr + bqwj +ngtd: 2 +mbrz: hlsz + bvln +rtcl: pwvz + ltpq +jfhp: gzpq * rdhf +mngq: 9 +pzdw: 3 +cgmz: dggg * mqbg +plnc: 3 +jjfn: vvbf * pzml +rhcp: rltv / mplj +szjv: scpz + dflb +mztw: 4 +lpmt: 6 +nblt: 4 +zphq: clbc * qpqf +bdbv: 3 +wpcg: 4 +frcg: jslt - rjpw +wncj: 3 +sjvb: qtdn * hmlr +tczg: 2 +wjjh: 18 +rmrt: 1 +pbcn: mmjq + nrhp +sdmr: 4 +zsvr: 1 +smcz: dqtb * qclt +wqlm: 5 +drfn: qsrs * cvjl +czfw: wtrm * qstj +mzpl: hczv * dhfz +tsnc: fgwj + dpbl +dpbr: wvrz * prlq +zhjq: hmrh + bgzf +jzch: 13 +prlq: qjsb + gwbq +qqcw: lbdq * drpq +fpvt: dlzr * jdfh +bqwj: tbfn * pbcn +mvrs: zqfl * mspc +vgrt: 4 +lpdm: rczq / hzvq +hmlw: 8 +sdds: 5 +trvd: 3 +vbdp: 12 +ntgh: 3 +nhln: 2 +nlbq: vddd * nspp +ljzq: cjzf + pslr +jmpj: rmct + bvgp +tqcg: gbfg + ncnj +blfn: vpbd / vrwt +czvw: cslj + glmj +hflz: cftp + rpvd +mjwz: 12 +btjr: 4 +cfgj: zqwq - wltl +dpwg: rjsz * lchr +dhjq: 4 +dnng: 5 +qjgg: jrjq * rldc +vffc: znrl * nndb +dfdb: 4 +znfn: njwz * cvbp +srwd: gprd / qzzp +gjfj: 8 +wjvz: chzp * qvnz +jpmm: 4 +lpcs: qmcp * ghhd +btqs: mcmj + jdwl +ppnh: gtzj + smcz +swrc: dtqs + lsrm +qpwc: 3 +ztcl: 3 +jcrl: 4 +mqqg: 2 +nspm: 6 +nhzv: jvmf / mwfh +rrgb: 2 +fnjs: 2 +ghst: jwjz - bqsv +qtdn: 5 +rlwf: wlvd + vvwh +tjsc: 4 +rmct: 8 +gnnn: 5 +ghls: zshw + mtqf +nqbg: tjrs - dcsr +mtwt: rhrg + rcvb +fbjd: 4 +wztl: jhbj * swrp +nvch: nfhw + bmnj +wthm: 3 +jlhs: 2 +tdhw: nvtj - fnsh +mpql: 4 +tzcl: 5 +zmvg: 6 +vtrw: 3 +vmwv: mcsr * dnng +fnsh: 3 +fqgb: 3 +mcrq: 11 +mcsr: 2 +vmjj: sgnj * vnfz +hsmf: 3 +rnng: 2 +dvtm: 11 +swgb: tgth * spst +gjqn: trgl + lnld +wzhl: 9 +nntd: sqcv * dgjq +srbz: 4 +ltdw: jcpn - cnvr +vlgt: 11 +mlns: qhgt * rbqs +jwms: 10 +dgfz: lrhc * pvgs +qdvb: tglj * jtvp +qhlz: 4 +fmfv: tngn - rghp +vpct: 4 +ntvz: 2 +qlmw: pwbf + nvvh +tjvs: 2 +mwrw: ppvd + hcwn +zbvb: nhhf * zrjz +jbbq: 18 +clbr: 4 +gmzv: 7 +tltf: rdfg * vnlq +cmmh: dsbg * cbcj +pbsw: ppwb * mbmq +wqst: 6 +wjqm: nvcd + dmjz +ctjn: twbd * ngsw +wrhj: dfdt + dtnj +lfdp: qsrb - qbwc +nhzf: 3 +rjpw: 1 +rbtl: jfqf * hrgt +pzmw: gpgr + sbdm +drmh: 6 +zphd: lvgv * vsfn +gfjz: 2 +szgp: 2 +rslf: 2 +lvlj: wsth * bgrg +hhtn: 5 +vjpt: 13 +mwmt: 6 +nbwj: 2 +ggwf: gncg + tccz +lzpj: lhml * vhsr +bvgr: blsl + qwvh +mtnb: qvwq * tfhr +nltc: 13 +ljzp: wbpv * qpgh +mqcz: brtj + sfhp +zfqs: cdts + hvld +zcln: qbmj - sflz +dtqs: mwmt * pctv +mpwb: 3 +wzcd: 7 +phsz: ncsc + tsgc +nbbm: rfvw + pcgn +gqjw: nfvg * nhpv +vjst: gqpr * jhvc +gwqj: 2 +gtfn: ndnh + gcnp +tqhr: sfjg * wgst +ctgj: 13 +cqbn: hmcg + gczq +hmhz: zggc * rnlr +ftvw: psmt + jspr +lvvt: gsvh * qsvt +jrcd: 3 +qmcp: 2 +wltl: 9 +drpq: 5 +mtgl: 2 +znjn: tqhr * ppmv +jdvl: 3 +prfg: nspv * gwjr +hmts: fllg + fvww +gvvg: 2 +rghn: tmhv / frbl +nbqc: gzjp * wvfc +nmsw: wpfw * nsdp +fwrg: tjtn + jhhb +sdgt: 3 +njjj: jnqf - czls +jjpj: 4 +dpsj: rdbb + vwzc +rhrg: fzhh * vmrg +zrdq: qfmr + jqzc +qwvc: 2 +dfmq: 5 +zvmq: mdgz + nljw +jzwp: 2 +svnv: 2 +vqnj: cbhc / gfwz +gspg: msfc + vzlp +rlht: 16 +zhqt: hjcf * rjzg +mcmq: wbzp * jqsv +nwlh: vvfq * wmlf +ftpr: gttn * vrlf +pqpc: ptbl + dtqt +jbjn: 1 +rwmd: 20 +qqbb: 2 +wvrz: 3 +djhl: wlmc + lslj +psls: 2 +hzms: 7 +fllg: vlwn + gbfl +qqhr: 2 +tmrs: 2 +tjzh: qvvb * fhvm +nzmj: 3 +dmjz: 5 +vvfs: mjwz + hbpd +cljp: jqgw * rmpc +vpvb: 3 +snpz: rjgn * rrjm +mwqm: fsqf * nnhw +rgsz: 3 +ppjm: 3 +hfgr: fnjq + gjgl +fpvr: 3 +jjpq: 3 +drvd: 5 +nzpc: 3 +stdz: 4 +zjsb: 2 +qflp: 6 +lcnj: ctjn + cmss +hdwb: dqpm * zlsm +sqcn: 3 +rczh: zcqf + pbzf +sgnv: 3 +bfss: mgrf + ngnl +tmdt: 3 +vmpn: gqvj + glql +ztsf: 4 +nndb: 2 +sgjs: gszf * ldgg +zdsq: wfjz + ghst +nhjq: 3 +rzjl: mpwj + jbls +jdcw: ztsf + gdbj +ntrq: vvfn / nhln +dtnj: 15 +gchb: nwzl + zmvg +pjtv: 1 +tjzc: 4 +cmpw: bvrc * vcnn +dlzr: vzvn / twms +zstn: 4 +cprg: 16 +sdft: wcpl + ltjl +fhph: rbsc + prrr +lpzw: 3 +zrjz: 3 +bgrg: ffhh + wqlq +bzlc: dgbn * dhtl +lbgv: nfwh + dvjh +wcwp: 8 +jhct: cjpg * vnss +hhgr: 2 +rbtq: 5 +qfwm: jfvp + htsd +swpt: prvs * vddp +fqjf: 2 +tdpf: wpmn - dvqg +bnpc: 1 +nhdw: nnnf * wfpz +gcmc: tjvs * dqbh +wmlf: 3 +vdzb: 17 +bsts: ttcf * rgdr +wlfz: 6 +dbtc: dwtr + fcpp +hthz: bjwg + lqfd +frbl: 3 +ptrv: 8 +fdzz: cbnp * rdpw +vntm: 11 +qflg: 7 +fzhh: 5 +cbhr: rwbs + rpvr +hdfn: zgbc + mhtf +vbwn: 2 +fjsj: 4 +lzlw: 14 +gwsw: 2 +trvw: pswr * mgjg +jfgq: 1 +cfvm: fhgn - pgzd +szmv: 3 +rhfv: 2 +lbfg: tjwg + znfn +mwrs: jdld - vwtl +gczq: lwgb + qqwt +drqw: cgcp - wtrg +vsqw: 2 +sfdg: 2 +dqnh: 1 +zphl: 14 +lncv: zgmj * glph +gzjp: sjvb + pnzw \ No newline at end of file diff --git a/data/advent21a.txt b/data/advent21a.txt new file mode 100644 index 0000000..7993b87 --- /dev/null +++ b/data/advent21a.txt @@ -0,0 +1,15 @@ +root: pppw + sjmn +dbpl: 5 +cczh: sllz + lgvd +zczc: 2 +ptdq: humn - dvpt +dvpt: 3 +lfqf: 4 +humn: 5 +ljgn: 2 +sjmn: drzm * dbpl +sllz: 4 +pppw: cczh / lfqf +lgvd: ljgn * ptdq +drzm: hmdt - zczc +hmdt: 32 \ No newline at end of file diff --git a/problems/day21.html b/problems/day21.html new file mode 100644 index 0000000..8ba51e3 --- /dev/null +++ b/problems/day21.html @@ -0,0 +1,159 @@ + + + + +Day 21 - Advent of Code 2022 + + + + + + + + +

Advent of Code

Neil Smith (AoC++) 42*

   int y=2022;

+ + + +
+

--- Day 21: Monkey Math ---

The monkeys are back! You're worried they're going to try to steal your stuff again, but it seems like they're just holding their ground and making various monkey noises at you.

+

Eventually, one of the elephants realizes you don't speak monkey and comes over to interpret. As it turns out, they overheard you talking about trying to find the grove; they can show you a shortcut if you answer their riddle.

+

Each monkey is given a job: either to yell a specific number or to yell the result of a math operation. All of the number-yelling monkeys know their number from the start; however, the math operation monkeys need to wait for two other monkeys to yell a number, and those two other monkeys might also be waiting on other monkeys.

+

Your job is to work out the number the monkey named root will yell before the monkeys figure it out themselves.

+

For example:

+
root: pppw + sjmn
+dbpl: 5
+cczh: sllz + lgvd
+zczc: 2
+ptdq: humn - dvpt
+dvpt: 3
+lfqf: 4
+humn: 5
+ljgn: 2
+sjmn: drzm * dbpl
+sllz: 4
+pppw: cczh / lfqf
+lgvd: ljgn * ptdq
+drzm: hmdt - zczc
+hmdt: 32
+
+

Each line contains the name of a monkey, a colon, and then the job of that monkey:

+
    +
  • A lone number means the monkey's job is simply to yell that number.
  • +
  • A job like aaaa + bbbb means the monkey waits for monkeys aaaa and bbbb to yell each of their numbers; the monkey then yells the sum of those two numbers.
  • +
  • aaaa - bbbb means the monkey yells aaaa's number minus bbbb's number.
  • +
  • Job aaaa * bbbb will yell aaaa's number multiplied by bbbb's number.
  • +
  • Job aaaa / bbbb will yell aaaa's number divided by bbbb's number.
  • +
+

So, in the above example, monkey drzm has to wait for monkeys hmdt and zczc to yell their numbers. Fortunately, both hmdt and zczc have jobs that involve simply yelling a single number, so they do this immediately: 32 and 2. Monkey drzm can then yell its number by finding 32 minus 2: 30.

+

Then, monkey sjmn has one of its numbers (30, from monkey drzm), and already has its other number, 5, from dbpl. This allows it to yell its own number by finding 30 multiplied by 5: 150.

+

This process continues until root yells a number: 152.

+

However, your actual situation involves considerably more monkeys. What number will the monkey named root yell?

+
+

Your puzzle answer was 21120928600114.

--- Part Two ---

Due to some kind of monkey-elephant-human mistranslation, you seem to have misunderstood a few key details about the riddle.

+

First, you got the wrong job for the monkey named root; specifically, you got the wrong math operation. The correct operation for monkey root should be =, which means that it still listens for two numbers (from the same two monkeys as before), but now checks that the two numbers match.

+

Second, you got the wrong monkey for the job starting with humn:. It isn't a monkey - it's you. Actually, you got the job wrong, too: you need to figure out what number you need to yell so that root's equality check passes. (The number that appears after humn: in your input is now irrelevant.)

+

In the above example, the number you need to yell to pass root's equality test is 301. (This causes root to get the same number, 150, from both of its monkeys.)

+

What number do you yell to pass root's equality test?

+
+

Your puzzle answer was 3453748220116.

Both parts of this puzzle are complete! They provide two gold stars: **

+

At this point, you should return to your Advent calendar and try another puzzle.

+

If you still want to see it, you can get your puzzle input.

+

You can also this puzzle.

+
+ + + + + + \ No newline at end of file