diff --git a/2023/day25/input b/2023/day25/input new file mode 100644 index 0000000..d206b21 --- /dev/null +++ b/2023/day25/input @@ -0,0 +1,1261 @@ +bcf: jjs hzz +ppv: pgt htv kmq +fcz: vbk csq pmc vgq +skh: tbs tfs fxg bps +qjh: kcb cdf ngk +rmt: rnj qld snc nvc +gvb: vfg +lxs: fpb kmr +xdk: rfp pft pkt dlx gtv +zjd: krv tfs xfv +pcq: kfk tff khl bzt +qdj: hbb btm +khh: clh sps vrd +dgs: svn trp fxg pdx +zjc: cgv qhb +rcv: sps nvd brv vzj +gts: dvp rbl hsp +npj: fkl hxd lqg +zjn: qrp txr cxg dng gjk +lcj: mmq xnj +pbp: vsj hgp lcn vvr +pqp: ccs lzg rjm +ctr: pgt zgp +vhl: hzz hzf tbj lbl +ttg: xfr nqn fbj hlz +fzq: zjf +zhs: tds bjs vnt zqh qkh hkr +smx: svn jgm lmq sfr +dpx: trp pkm vtq +hpf: fxc kst tdr bhc +dvf: bgq lfv dcd +kfg: pgz pft +gzg: psj mbq lbb vlk +bfh: vgq kds +qqm: lfm tff vrq vcs +rfj: rck hzg pdr +pdk: ljj dmp +vhv: tlz +srv: bgp qhb spl +blj: lzg gpm +tqd: tvs sbq gcp bdp ddj +jdn: vhv xxj +hdp: pvj tpc +qcv: grl hsp lmq +dfx: vrh +qtd: bnq rdl svz knz +snf: vqt jdn kcm hkf +rbl: fhg rhb +qrp: psj dcn gtj +chg: pcc tbj njv +xzq: vfg rsk njt psj nlk bhc +xnl: hdq kmr +ltm: cpt kcm dvp +lcr: gts pqg qhj qbx +xdl: cft kdf +trr: vch zsg ffc +tct: tgc dgq +vrr: rgx cpt +jln: xfd csm gmt +mkn: bgq fgx psc +ftt: lhv +hgx: xfd rjv bzl +jgq: zsg tnf bnb lkh +trb: zlq lbc sbg hnq +pft: mqt +jnr: txs lmp vkx +lrl: tfm zrp +jhk: vbf +qhm: ncm +znl: kdk hkz srk +znx: zjk +jlb: lbc +rxl: zmh bbg vrh qsf +fcj: bzl dbr nqn +lsm: psc qzc ssp vnx +nkj: bvq +djm: ltg lrh tvd pdt +qkc: qxg +nzf: blq lqn zlk qrr trr vxl +hzx: qld dss vlv +pdt: rnl +thj: vjc bgp +lpg: kpn llx cxc +kdf: vbk +rph: qqv lxd +mfv: mct smq +ctf: ggt ccs fdh +bsx: vqv hnf gvq lnb tnf +zsg: rnj +zzd: ppr pqp mzs zrv +cdv: lld qkg klh ppf +tnh: smv zht +fqg: szb +nfg: vxj pkg gbj fkq vlv +xvd: mgh bvq sgg +gph: bmv qsf hht jzd +nfx: sls qcc nhr qnp +lcn: nqq xrr +tqr: chc +bhd: vtq +zxh: zll +fdv: tgc zrv fnk vnm +txr: vmj jmz +krs: php ptq +jtf: srk mct +rtc: bsc xjd +kvx: czn lng lcn +sdh: dss tbj +hsq: nln jdh qcp +zpq: mnh qnj hfk zdk +nqk: gvg cjs npj +zlp: dxr lkt +mhx: ssd +vjg: rzq kns xxf fzv +brb: qrl hfx czr +sql: bbs gsg tcg lnq +nvd: vjc +pqz: lng +rcd: pgp zzl +qsk: bgp kvr ktj +qcc: qfq pkt +qbh: lgj smv pmn cbg +qql: bkl +grl: gcz +cvg: bsl sps vtb +xqc: fcd kst vrs +lvv: cjs rrp hrc +bkj: njt khv xzh klh znh +qfr: zfq txb mzk cpv +hst: vbk kvm qqj pmn mmv +lpb: bxs tzn tps +prq: dxl rhs gsg +ppf: xld phh +klf: sxd hbb bxs bhd +cdr: snj +kmj: hzc +fxs: vrh vdj +jcv: cmn fvr dhr +qzh: csq nlq vrg +tmg: nlq thd zdk +ksj: hfl zjb xks +dpz: xvp jqq lsf +gtt: npt hkr jcz dmm +xpt: jrx +zps: xcm jgs xfl kgh fvb +csd: klk gmn qdj slz +xhg: fxn lns cqk qhk +fnq: zkx dbv +xgg: tkz xsf rsb dkq +zpv: vhg dpv kqn +lvl: fhg mrp +gpv: tvg xld dfv vhx +vpz: dpv mjd tvd xml +dmp: tcq +dmj: sfv +hht: vhc kgx glv +crs: fxs nvl bhd cxg +blq: mzb +jkg: krm jvm zcq +qdz: ljm +ndz: tcz lrl blh bdf +nqj: rkh mkt zhm +pzx: lxd rnl hfx +lgz: dcg ncm +bdp: zjk +dqs: sll jkz nvh mmq +tcr: bmr xrj txj jzm kzh +nch: xfh vbf hsq hkz +bgh: btm xtt dcn mdx +thd: xmb +tcs: fzk sqd bxs +hdl: srk +vql: mzq plx +zlg: tgr btd +ccz: gjc +vzh: hsj lxs shv +lpn: dbr rtd kds gpm nkf +dhq: qrr +dkn: nmq slv tkl qrl +cqr: rgx jmv gpz fcb +jxz: vzt snk mhx knn +kcb: nrl tvd +rdl: qfh qdz mjk phh lnb +dbg: hzf bps tcc nns +bcx: mkb lpr mds rdx dmp +vgh: nqq +tdz: khv xjp ncm cdr +qtv: mgv +tnr: bss tfm njv +kdk: hrt +xkd: rcj bbg pqt tcz +plx: qjr +cvp: zgn tvs +hsx: qsx bhd +vhp: khh trq dnz ltd +xlv: bcm hdp tcs mvx +btf: fnb xmb rdh kvf +gjk: fzk xqr rhq +lhv: dfx +trp: dzs nkm +qzc: kds +rpg: fnl kjj znh hft xlt lnp +bdx: xbq gvb +txj: xtt qjr +qkh: zgv rph chk +lqq: ntj gjx hkr +qfj: clj llm ftt +gfk: gcm djm jsd pct +hrc: jtn smq +svs: snc jmv +hzq: llm dlx tgt +lgj: xtp +klr: czq qkg vhc +zns: zxl blt tfh +zmc: hdc zhb nhm rls +qgf: rvs jhh vrq gzq pzd hzz +qnj: bxc +rsb: tps xjh +dcz: vmc +mbc: chr rqk trc hnq qqd +cpc: pgz zjb gbj +ltg: tlq kfq zlj +psx: vtf qsx bsc zzl +lmn: tfs fxs xbq +bzb: cpt rbl zjd svz +qqk: npm bnr nnf nvs +lfp: ctt tff fsl dzs +fcd: pdx +tnn: chg +xfx: szt krp +mjg: fxm +hnr: njh rfl ztj +sll: dmj bdk xpt +bbk: zsq zhx dst +tdj: szt +nzj: jdh hql hkr +str: frp +rmg: mnt vqt +qbs: dss +rqz: ccz kmr gsm +cbj: pms zmz prr vgb bdk +ntl: szx qsx ccg jrl fzk +nhv: bvp xdl hsj xpl sgq +ghr: zsk sqd +lxb: qcv ccb fzq +vlk: pgp +xvr: mbz pkp spg +kgx: rnj +kzm: xjh ltm pjc +nxn: nks zfv ttl +bnr: shx +qhj: jlt hvn +fsl: mzq +xxm: pkm kjj tlm jdj +pqj: gqn gpz kgf mjk +vvj: gqn +frd: fnc hzf xbx zbq +mds: xhf bnr +tvm: cft hgp lrh +pvb: hgp pmn jrx +gbm: dgq rbb tvd dmc fpm +htp: khh xmk sbv +hrl: cgp pct cbt dkk fmx +krr: fsl qbf ncb qfh rcm htx pmk kzd +xtb: vrd vnm ngr +sqv: qtv bxc mdl dsl chn +zvz: gkk djf bzk dpz +zdq: rvc czr jxd grd +hbn: mrg vzr mtk bgp +xsx: qdz mqn cgf nhr +zxb: smv vpg qhb bgv +rcm: fvs xks trp +lsb: pdx +xxq: xjh bgt rpj +mzk: lvb qcv qql +rcx: nqk tzg nlg blj +ltv: tct zlq jlf xpp +jpb: bmp trp bnq fnc +bqf: djf +fmj: xnv +nmk: npm blj jtf lsh smm +xhd: bjd nbs qnp +vrx: hhj +llh: rlt tnh +bgb: vck vmj lhq prq +mrg: tfr gpm +sxv: lfq dhg mgh kkt +xgz: fhj frv +rck: vqv +smq: jxd +hlr: bdp pqd kll +xms: plg vqt ncb +zpp: str stg +kvb: pzk chg +jcf: ssp smq bvq +rvq: xbx kxc dfv rxd +bbg: bbs zsk dbm +mhb: zqg lsz gml zcz zmz +pfs: bjd mcc gbj +fjf: lfp ncm +fqp: hvt +nrd: qfx +kpb: kmn tcc kst dhk +lvs: bzk +drs: tdh frv zdk bqf +tfm: xnv +fpm: rgb nqk hfx +xnv: slz rnj +vcc: hkh smr jbp +xgx: pzk +npg: bvx bdk ngk +hzm: qph cxc +lpt: cxc pdk +gqg: ntj mhk kvm +ptk: nnf psc gdh +bzg: djf +svp: cdr xtt qzj +ftg: xtp xzr qkh tzg +hgr: vvj bdl hzq +sjn: tqr pbl +hld: jhd hhj qcm +mrc: mng tcm vhv +hvr: czc lvl rtc qth +qrt: fxp vzj +bzx: lxz bmm qcp sjn +chm: rqz nhm ldc tlq nxx +mrp: dvp +kvr: frp szt +ctt: skj tcm +tfh: xzv bnb +qfh: kjp +njd: pgt dcm ngr +vft: hlz pbl nkj +ndm: xvr fjf gzd tgr +hbb: btd +lfm: ngf cxg mbq +jhl: spg tpc +cbf: glm gfs spl +tmt: btj lpg nkl pqk +nst: svs rsk jdm +tqk: hll ndk rbb +hdt: vch mkh cxq hhk +xth: rqr ntj +bss: jbk bkl fgm +prg: zqh lsh nhm cvg +qcp: hcv ggt +kqt: njh +gcm: hbj lfv +fbj: bbd srk zcq +bxq: jjp jlb szb +gqs: tcz hzf txj bbs +btd: rfm bfk +sgq: nlv +cbg: brv nxd +jlt: hvn +jrx: xfx ppr +rdx: frv zpq cgr +kzv: jmv +xhf: dns tqr srb bfh +bsc: zvl +hzg: tgt lhv jfs +tkc: dhz tzs +qbx: qvv bkl hnt +dkp: zvb psc vzt zvv +ngp: tvm qpq pms mxf +nvl: vdj krv jmv +tpk: xfr rsr cxc fnq +rxd: vhc cvf pmk +jxs: phc xhd tvg rcd hzf +rrd: pzf mzk qxb rsb +cft: hcv str +qqj: vtb +ghk: hkr +lmq: btm +psc: xpj +cqn: llg rvf mkt znm +dcg: grl +lff: tzn mgr +cps: zbr phc bps jgm +qgx: bmm thd bvp pct +xbc: hcv tnh xcj +snx: chk qnj sbq +vzc: hhk +jmk: vlf pgs zjf ldh +vrb: hjd krj +nlc: spl snx cbg +glm: ssd +npf: zln hzn mks +ssd: cgv +jdr: jls jjt rkp +hlp: tlq srv +kns: tgt jjt phz +bsl: ldx khc +ckf: vgh fpb ggn bzg +nts: tvl hfc qjh hxs xdl xvd +qhk: fvb +rsg: kqx hhj qrm ptj rbd +gmz: pvq mdx vqv jbk +sgg: pdv hsj +jpn: pbp rqr mkn +xzs: cxk frz llx zhs +smn: zll kmj bzl hxx +qfk: vpg drn nxd tpr +lsh: tsl +npn: dmj gqg hgp lxz +rhs: vcs vrx hfl +vnm: nrl rqn +mmh: hrm krs +sbq: pbl +nnd: cbg mkn bbd +mnc: fkl rcb hnq cxc +xsf: bzt tbs vrs +mbz: hnf +grn: nzm hgr bnv kbf +qqd: szt nks +prd: dxr lpr zjk fnk +pqd: ttl lxl bxc +gqd: pft nsh nzm +mcx: qrj szb tct lrf +jdm: fqp rvm xqn thn mts +dfs: nlv jhk +hnq: vjc +gzb: kvb tcs +pcj: zjf ldv +blh: qdp dhq +rnb: zlk kgx nzm tbj +ktg: xsb jqq sbv str +ztx: zgn hqk fxp dcd +zbt: gjv kjn +krl: gvz thd +htx: ccc +gfv: lng cvp shv +flj: dhr pdx +kmq: lrh dns pqp +zvj: dxl hdp bfk +tlr: dfx kjj pvq +fcb: ftt +dnv: llg hnt dcn zsl +chd: dmj fnb +tmk: pkg kjn ftl xqc vnd rpj +xgs: cpc sdh plg kpb +vdr: xpl zpq prt zdm +ssr: tds hlz qsk jhk xbc +jtn: kvn +zll: rnl +fzv: fvs xqn snj +rjg: jll lmq jdt mcc +zkn: chd mjd pqz mql +ckx: qpq gcm ngr vrp +cld: rcv hrc dtk gpm +nct: zzj dmc sbg ttl lxl rjv svt jqf +lnb: jlt kkg cpt +htj: bjd lsk hzg ddx qfq +hql: rnl +bkn: mdj vgq brl xrr tbn +sjr: qtv llx dvm jlt +ftd: qjr +tnt: xpm vrt qdj flj +hgl: bzt rfj gvb nrd +dgq: vzj xfs +kzh: xld lsb zbt +vcm: srb fnz mct kmq ctr +rkt: ztj vph bzg mzs ckg +tvd: ttl +zxg: frp +tfr: vgb +lcp: txs jsb spt lsv +lmb: pqg klh ldv rmg +nzm: zsg +cfr: hfl vqt gzq +prr: sph bnr +vss: zpx lfp qql +xpp: nlv nqn +ljt: nmn jjs rvf rtc +rjv: xrr +vzt: sbq svv +pkg: jhd vmc +zcq: hfk +chq: fkl lpm qps sbs +xtt: vrh +ggs: qrl gfs vnt +bbs: hzg tnn lld gsz +spg: qpb +lns: qhk zpx +dkb: fmx jxd vgb sgq kvx +fvh: hnr ggn mqj +fgx: vrp zxg +ctq: sjn zcq gcp kjq +lkt: zrt +trz: grj vpg lpm gds +dmz: rtd hns cft gsm +rrp: nfs ssp +zzq: spg vcs +bbt: xcj lvs tvx vgb +cmn: qxg +khc: rfl dmc +vzs: ftd txn vfg +vck: pzk nrd lnn +ssl: nvd zpp +dst: pkt pft +kzj: jll gkl +gkx: zqk qnj +mhh: vss dcz vrs zjb +pkp: tnn rvs zsq vrs zqg +kqd: jgx stq kfg gtj +plj: fdh pqp glm vnx +mcp: csm chm bqb grj +lnk: lcv fsl +hmh: vmj fkq vhx +gsm: xfx dns +xpj: prf sph pmc +dkk: vtb nhm chk +jbh: lpm sfv gkx vdl fvh +kkc: zmp rph +pkh: qhm zjf fnc +xtj: gzq vpm tcm tnr +jfs: bnq +lbm: pdk zrt qdg mgh +pks: ghk zkx zgg rmv +tkl: tgc +ppj: tvj scp dbm klk +njt: mkt zbt +hcg: jcv jdd vrh mbq +xdr: skj +nbk: xpp gml ptk trq bdp +vqc: vql kzj ngf vzc fzp +xqs: vgb jlf sfv +grh: pbk kvx vzr hlr qsn +cdf: gdh gbr rlt +xcg: fzq xjp bgt fjm +bdf: vtq +nff: hzz tlz rkp frd +dxk: qks gcm dbr rgl fjg +vrj: xrj zrb +jzm: txr +lkh: pkm ngt +fks: cdf nvs hhd gfk +gzd: qfh szx kjn +ftx: hkf krs nhb gtf +qfs: zkx ldc cbt dpv +ktj: zfv +php: bps vgv gsz +qzg: rgx bkb tmj lhq rtc +nxf: lxd shx +hzf: qfx +fmd: ffc bnb +qgq: klm jkg lcj nmv jff +gvz: npr rmv +kmh: sdh lnn qzb +zht: bqb +brl: nnd jkj kjz ddj +sdt: jln tgp gkp qnn +dhg: mqj kjz jpf nvg npg +vlv: xks +dnd: lsf sgm +vtf: blt qqm htl +bdl: cvq +tfx: grl tfh thn jdd jfs +zhb: gfk qqj +krj: zll lkt +bzn: pzd cvq hsb qsl +hkj: cjg jkt ppf mvn +nkl: smq bfh +cfb: krp gsk +fvq: sgz tsl cbf nzj lpt +mcl: cgr zlj nlv nxx +rft: nlg nqq dbd zjc ctf +xhb: nmk fdd sgg zht +mgv: prf +nrl: qhb mln dfq bvp +ljj: dqp sph vft +khz: trp jzm ftl lzd +kjm: bgh sfr hgr nxs trp +zln: tjj nbs vjm cxd +jnj: rtd +kmn: krv mqt +klh: cfc +vnt: dmj +kpn: kjz bzg qvn +sbg: lvv +bzz: psj mzq +pgq: mbq lld hvn rcd hsx cdr +vrp: zgn +dng: blh jhl rfm tlr +txn: zzq jfs +mmf: vhc cmn +brv: nqq jkz +dfv: jtl blt sqd +hkh: stg +hzz: kkg +vpv: dvp vrl xsf tlm +jvf: kmj lgj zcs mnh +drn: str +zsq: phz qld +frv: pnk +tqh: znx mtk rvc llh +glr: sgq jnj kvm stm +hdg: pms rbb smv kkt +ggn: xtp dbv rjm +qxd: rhb pkt +lqs: pvt mbq bdf +mdl: hrt kdd +hpv: qhm rrd xgx hkf +zvn: lbl qzr vgj xmn +fkl: kvn nfs sgm +qsn: rjm lpr +mjd: jdh njh +qtc: jjq bgp nxd +zhc: nln lzg qps nfs +ldv: zvl lsk +tnb: bhl +vjm: jsb xbx +xfh: jng +cjt: zbt fjm tbs kmn +qnp: vhx vmk +qth: dhz dzn +jjt: tcc tlz +pct: lqq +dbl: zxh fjg tzg +rmp: czc mrp lfp tvv +dtb: tsk qrl qzh hlz +kks: bhd kgx qsf czq +xml: kfq krm hzc +kqj: krp lfn lvv sgg rgl +rpt: bxs qxb zpx jmz +hns: csq pqp sgz +cxq: plx ftd vvj zsl qdj +rvc: kdk vzh +jlk: dvf lpc dbl bzk +hft: mhg mng +tjt: fnl jsk cxg fjm +bqn: zhb mmq jjq tvs grd +phc: lfp ccb +tzg: zpp +xsb: dnd gds mln +nlv: rcb +dvm: dbr qqx +jqq: gjc +szd: vjc hzm fnq gkx +dvn: ngk qzc jkg hjz +tps: qld +lxz: mhk pbl +pvf: pdt tvl jtn +mkh: nhb +bkb: mkh qkg qrk +bzv: vql bmv qdp vcs lrl +qqv: vbk +sgz: ssp +ckg: zvb jvf lcj +rqk: clh fjg nxf +fmx: hdc +tcq: cgv +ccn: czr hdl dnd +qxq: kfz gdh ppv bgq +qcm: pvg dfx +xjh: zvl lvb hdp +fkj: rvj thj xfs jhk +scp: tkz +cgf: phh dcz jzm +ltq: vjc grd chd njd fqg xcj +lsz: dcd +bsm: krl sbg dcm jsd rrp +hhd: prt cfb gds +cxd: hkf +svz: vxm rnj +gth: lzg dpv mjg +kzd: lkh rjg klr jsh +thc: tgp xpt +gvg: pzx tfr hls +vmv: hxx mmv znx +kxx: mzb krv kzj ngt +fxc: fzk hsb pjc +lbc: jxd +trc: nkl qqb sjr gml +hls: xmb hql nnf +pfq: qvn vrd drn cbj +bmp: tcm hnf +qmj: jdn vqc bcf bmv svn nbs +nqf: mzs +spl: ghk zkx +xrb: qcc ndm kvv kcm +zmp: ktj +bfk: dzs +ghp: xfv qhk mhg +qsm: cxq rhb kfk +htv: gmt jlf +mqn: tkz tfs +nsh: cvq +xxf: jsk fnl vrl +cbt: prf +zcz: clh zgg gds tvd +svt: jqq tdj snk +pqk: dld qqv kfz +gjv: mvn ctt +jgm: qbs bzh +lrr: pvg gbj jkt mmh +shv: lxl +tsk: dnz qll +knz: cxd zfq pgq +mmv: zjc +lkp: gjv ghp jmv lbn +bms: xqr pgp vhv +qzb: vrh +rvm: cvf glv nsh +mnh: zjc +jcz: xkj rgb vtb +jbk: nbt +pxt: vbf xfr pnk +gsk: rtd +cjr: xqs nqn bqf mqj +hjz: kvn hxf +tvx: rqn tnb nln +dfq: drr +nfz: fmd kjj cmn hhj +tlm: khv tfm +hzn: rfp zlg +hjv: chr qps cxk +rnt: pbk fxm hll fqg rqr jcf bvx +hdq: pgt +kqv: mfv qps qsn +ppr: fxm csq +qvv: njv htx +kgf: vtq svp zqg lhk +kfz: hjd chr xpt hnq +thn: lvb +hxm: zzj vzr +rql: hdq kvf slv +tzn: tff trp +grj: krp nks +cgm: txn pgp kzh fgm +njf: cmc hxf mql jjq +psl: qdg mjg pmn lqg kmr +phz: hnf +ckm: pmc nmv nfn qqd +ztf: gsz vnd kxs zmh +zmz: kll hjz +tcg: vml +xkj: dbv lpt xnl +npt: jpc lxs sdv lxc hqk +qsl: dpx lmb fvb fzq +jtv: qsf lqp bfk bms tvr flg +jhh: cfc flj hjm +ncb: gqn +qxg: ddx +lqg: vrp +lsv: mbz +ssp: lrh +rvx: jrl qsh rhk lcv +dnk: krv lsb tvr rjg +jts: qdp +jls: rfp zlr +vgj: rhd fqp lsv +cxt: gjc pqz xfs xgz +kzs: ppf qrm ftt pvj +gbr: ggt gmt +rcj: zzl zbq tkc +bqp: chk khc qqd sbs hjz +mts: cmn zxl +htl: vrr +xfl: kmh kfg qfq +zsk: xgx +vrt: kjn sdg qvf +xfd: zlp zzj xfr +kqx: vfg rhd fvb +xfj: nfr dhr vjm tlz +bvx: jhk gth +jld: hjm hhj xgx ftx +kgh: ktp xzv mng +sfr: xdr ptq +vsq: bzl hbj bxc +gqx: mqt btm gvb sls +qnc: lsh ssd ccz kdk +rkd: gjx vbd dbv hfc kqt +czq: vmc htl +ttc: tdh zlp dmc hqk mfv +qrm: qxg xbx nns tbs +qjd: blt xqr fvr vmk +sbv: fxp zlj +fqf: pgz xdr lqn bcf +lrf: fpb shv +bzh: jsh bmp +gtj: kjp qrk tcs +vrq: xks bnq +ddt: qxd kfk qdz kgf +bjs: jlb zgn +gvq: gsg xms vrl +jqf: lxc jdh +qhc: mzb cxd qzr qlt +shx: jjq +jlh: qtv kpn gvz rcv +zgv: frz jjp +tmj: bzh zxl +jpf: rfl xth +fpb: lng +jbp: jlf zjk gds +sls: fxg vgv cvf qcm +lqp: tps +hfx: dbv qqg +hzt: kvr lfv vnx htp +ldx: qqx +nxs: ngt rxl fmj jls +vbh: bhc rbd htl cgm +bzt: qbs +mrz: hvn +snc: tzs mkt jts mcc +zhx: nrd tcm +gkk: vgh qzc +nrz: lxc tsk jtn zlq htb +qvp: tzk rpf mln zmp ddj vrb +cmb: mrz dxl phc qvv +jll: txb qxg +rbb: qqv +rvf: dcg mrp +qfb: jkm vbd cjs +nhm: hxs +qsh: qdp ppj ncb +rlp: nqn glm qvn +gcp: sph qqx +lmp: vml slz +lxd: xnj +xqn: vgv hvn +jkt: gbj pzd tzs +fnb: hcv +qdm: ptj bkb mrc bdl +zjb: pmk +sxg: fhj chd bmm +pgz: lcv +lxp: ghk pvf lzx +cxk: ccn lfv +glv: jrl +ksp: hvn qjr lff jhd lxb +cfc: bjd dss +fxn: dlx fgm +jjp: dld fcj vrg +tdh: jnj nxn +bzl: qqv +vkx: qfq txb lld +rfp: kzv +nvs: smr kkt xfh +ccg: rgx vdj +lbl: sdg xld tkc +xzr: zpp gbr +jdd: fxg +qzj: vrh mvn +rgl: cgv kqt bbd hlp +jvm: czr dns hkh +mdk: bmm hfc kqn +dkv: qfj lmb jts fkq +lcx: tdj dsl lfv gcp sxg +gtv: scp krs +vbd: frp +rdh: hdl hrt mtk +xpm: dzs zqg +sdg: xld rgx +hvt: ccc +sgj: vrd +frz: mct +hll: vgh +tmz: mjl fnc vlv +pkt: cvq +gkp: ggt jhk drr +bmr: phh hvt mcc gqn +jng: bhl rfl +hdc: pnk tmg qqb +fhg: vrl +hxx: mzn +xmk: dmm qdg +kvv: jsh pzk +gps: rkp tfm qth spg +ndk: vrp +qqb: cvp rmv nvg +mzb: pdr +gjb: nqj cfr jhl jcn +bcm: nrd zsk +hbz: lfn lxp tnb bsl +bjd: nhb +bqr: mvn znm njv +nmn: pqj cjg +zrj: gml jkm zfv znx csg +rkx: mdj vmv vrb npr +prl: nkm pcj chg vhc hld +zqk: lkt lxs kll +mks: qlh pcc mmh +lzk: tfr clh +xvg: nns jnr qcm fbf +fjg: bgv +rhk: gtf rck fgm hzx vqv +hff: vhg hzm frz +tbn: sgj pmc svt +xlt: qnp pvg qfx +zrb: zsl tmz +gtf: stq fmj +zml: gtv txn lsk tmj rvs +nmq: krl kjz +zcs: bgv zvq ljj +chn: lzg +ldc: cfb +sbs: mjd vrg +pvt: txs bsc zlr +kxc: lbb pcc svs +xjp: bqr plx +xsl: vvr vft rgb vph hsj qks tzk +hdj: tcg hzf bjd tgr +lzd: mpn +bxg: vmk slz szx jrv fxn +spt: ddx +xrr: mgv qzc drr +fdd: xtp ffl hbj +lhk: hvt +tlq: klm +frs: fqg tdj ldx zlj mrg +pbk: zpv +knn: ssl trz gkx +pdv: mgv hbj str +kvm: fmx gsk +tfv: dnd qqd fcj +nfr: bdx qkc +cvr: thc sbg cfb ghk +vcd: qdg rsr brb qqj lbc hdq +qgr: bzt xfv pcc +hqk: chc +ngf: fqr +dcs: dss xpm mmf +xst: pvq vrj lhk ktp +tzk: qll +rsr: nkj ktg +pjk: qfb sps srf hsq +dkl: zpx khv nbt vpm +vhc: ptq +qmx: nkj mmq jtf shx +bhf: vpm kkg +vlf: rvs jsb zsg qhm +csf: nrs tvj jgx vch +zkl: lbg fmd gsz +nkb: hlp xhf vrg fxp +gmv: tgr zxl lqp +ztj: xfs kdd szb +ffb: znl rjv kqv nfn +lpd: tzg zkx mkb lds +fpf: vcd svv hfc jlf +qtg: ksj pgp qvf jls +flt: dld xsb npm vgh +vnd: fhg phz rck +jgs: qzb gmn +ckt: rdl qth hbb tbj +klx: nbt mbj zbq hzz +ljm: lzd txr +ntc: tkz gjv bxs rhd +gsg: ldv +zrv: dmp jvf +fgk: fvb blt lmn bkl +jgx: xgx +zbr: blq ccc lkh +smr: zft ccs +sdv: hxs lrf +vxj: fvs zfq ffc +hfl: rkh +ffs: pzk +rsk: pjc tfs php +nns: xzt blt ddx +mgr: vzc bnb +vgq: zxg +nnf: rcb stg +stq: gzb tvg +rhb: xzv +nxx: cvg lkt +rzm: blq lhv +cgr: shv nxd bjs +rxt: xgx ptj jts tdr +nhr: gmv jsk +cpv: vrr krv +lmt: tgc zft sdv hjv tvx gvg +tdr: fjf vmx gpz +kvf: chn lpr +lhh: nln rsr nfn +xvp: htv xth vjf +mvz: chr rqn thd sbv pbk +scs: vcc lvv xzr trc +mcr: dxl dzn nst bqr +skj: zlk +mtk: rqn hzc +lnp: scp pvg +gjx: zrt +tds: dbd kkc svt +fvs: tpc +llm: pmk hkd ptq qhj +sbh: jlb zzj cgp fkl +kxs: xxj nmn +xxj: mkh xdr vlk +mzs: fpb +qvn: snk +svv: xfs +cmc: czn btj vsj ntj +zkx: xnj +dqp: sgz lrf qqg +jff: sgm +qrj: vzj kfq cbt nks +jzd: pdx vmc vmk +ngr: prf +pzd: znm +rbd: ffs lsb cjg lnk +jdj: mhg bdx mgr +gmj: vvf hnf vlk jgx +kjp: ftd lcv +xrj: txb xnv +hsb: mqt pqg +pzj: xmk htb chc cgp +ljx: lnk phr rhq zbr +fnz: pct zlq +kbf: qxd jrv xks +phr: gzb jdt lmq +vch: tvr rhq +flg: vfg ffc bqr +htz: ltd kdf gjc jnj +hkd: mpn lmp dlx +lxc: bhl tcq zft +pnj: hxx rqn grd vnt +zmh: bmv zlg cvq +jcn: bzz klk rmg +bqb: bbd bzk +hbj: qps fxm +jqr: jkz ssd ltd prt +clj: lgz gmn zjf +zgf: tjj bkl pjc nfr +npr: zjc qph +svl: ccs rlt xnl bdk +mbj: jdd cvf +rls: sjn vvr +cmh: kcm qfx mhg pqg +csz: tkl llh fnz zvq +bnv: tzs nkm vtq +xbq: dhr lnn +frn: vvj lsk lqn jtl +jtl: hrm fjm +lbn: dhk cfc xjh +lds: sjn klm mrg +rgb: xfs +qkg: ncm +llj: hff zvq kvf hxm nlc +lzx: qpq lpm rql +qhx: zmp vzr qps rls +hjx: xtb vph lgj csq +fvr: bcm szx +gzp: bdl pfs kfg kzm +tvv: vch qql rzm +ccb: fcd dhq bhf +rvj: zft kkc fnb +zlq: tsl +trq: kdf ctf +zlr: dlx fqp +svn: bgt +ldh: lqp tzn vpm lzd +fzp: rzm +bgv: qpq +jjs: xzh dvp +nlg: mdl jng djf +hnt: znh vrh +tpc: mnt qzb +ngk: zxh kjz nmq +pzz: xmb tgp gsm spl +bbd: lsf vph +rhn: dtk gjc mhx kfz nvd +gzm: bzz nzm xxq ghr +nvg: kkt +bgs: tlz pkh fbf tfx +zvl: hhk +nvc: lqs qfh jbk +xcj: kvn +rkh: szx tcg qkc +qxb: tnf tcz +bnb: vmc +bmv: zfq +rlz: vzs qrr tvg jgs nrd ghr lpb sdg +csm: dfs lzk jpf +zbq: vzc +ngn: dcd nlq xfh jqf +hjh: kll zqh gbr jjp +kvp: qrt jkz mct sbv +lxl: jjq +qqg: qrt hkh +lbg: fxc lzd znh nsh +zxk: hfk ffl vsq dmm +flx: qpb mpn bhf hmh +krm: hxs rnl nqf nkf +vxm: dhz vrx qfx +txv: cxc qqx dfq pqz +nlq: qph +hkf: pvg +nkf: gfs htb +zhv: fpb lhh tgp hll +cjs: npm hxd +qvf: mrz mnt +mvx: plx cvf bhc +xqr: zhx +vmj: pdr +jdt: qfh xld +lqn: thn +nfb: xrt rmg vgv hzn +qrk: dcn +bgt: fmj txb gqd kcm czc +lhq: fzp dxl +fdh: kfq +hxf: vbf vgb +dhk: ldh gkl +ddj: rjm +jpc: lqq qnn rqr +khl: bmp gps dhq kgf +lfn: mln +llx: snk qph +mhk: gfs mql qnn tlq +fbv: zgv pvb dkk mhx +ktp: xzh +pzf: lvb rhq fcb +pnk: sfv zdk +slv: gjx hxd lrh +fns: qkc qsx hhk tbj +vvf: bdf xfv +nrs: zrb zns tlz +zrp: spt gcz qzj +sqd: nkm +dxr: qnn qrt zjr thj htb +pqt: fcb pgp kzv +lnq: gtv lcv +btj: hxd dld +xmn: zxp dcg qgr +xzt: vvf klk +hzc: rcb +prt: smv hjd zxg +mzq: tvj lbb +cqk: hsx +hsp: lsv +xpl: mds mmq mxf +krv: nrd +jkm: krj tzk +qks: dnz lvs +chc: bhl +qlh: vdj mng nzm +fnk: dnd bvp +lpc: rlp vpg trz mzn +stm: vcd xsq zpv +qsx: dhr +dkq: tnn xzv nrd +nfs: zgg +nvh: qcp bqf dfs +qlt: htx pcj bnq +jsd: tqr tvs jkz +dld: pgt +kgv: fnb drs flt mxf hgx +tjj: skj stq +zqh: vhg ndk pms +jsk: dhz +kjq: kcb jpf ldx cxk xgz ldc gkk +kfk: qxd +mzn: qtc fgx +cpt: nsh fqr jlt +qfq: qrr +mjl: gvb kvb xqr +nmv: hxm vbd dsl htv +pmd: cqk pqj zrp ngf dcs zzl lbb +rmd: gdh tfv nch tcq +zgp: vvr jff dmm +hrt: ssp +rpj: glv +srf: klm kqt vgq +kqn: drr nvg prr +skm: vmk nbs czc mts +vmx: fqr vrj cjg kvv jts +qbf: ffs vvf vgv +csg: vft zcs pdt +cdh: kxs pzk lnq qdj +smm: rlt lzk lfn sgj +kbr: pxt tnh dvm hkz +zdm: kdd lsz fxm +xxc: qsm glv mjk fzp pdr +hjm: zlk npf cqk qpb +jpt: vhg dsl bzg jpn +vsj: qhb dns +xsq: stg mgh nvh +zjr: lqg klm +xjd: vml gpz gtv +sgm: dcm +xrt: dst jtv +srb: bvq +mdx: zxl vhv +zhm: ljm jpb +fjn: mxf hfk thc mzb +rpf: fdh frs nfn ndk +jrv: qkg mqt +jkj: drn xpt vzt +dbd: zcq hdl +mkb: ltd nqf +snj: gzq jsh +pvj: kzv zzq +hvn: phh +ftl: ffs lgz +czn: lvs mnh nxf +fnl: dzn tfs +ltz: hxx tnb kds cft +tnf: jjs mpn +mjk: fkq +xfr: zxh tsl +mqj: qps mjg +qpb: gcz +rzq: bdf jrl bfk +zxp: fqr jsb pvq +rrq: vml hft cpv rkp zvj +frm: klh bbk sxd cfr +lfq: dcm mql gth vnx dfq +kst: rpj spt +nlk: crz zkl qgr +ptj: hrm mzb jmz +gkl: vhc mzq +crz: ccc kgf lnn +fbf: tvr tcc +fhj: dmm vgq lds +bvk: vrx mhg kgx gcz +pgs: dzn mbj mrz qvv mnt sfr +hsj: jff +tpr: tqk gfv bxq +ftn: pdk zfv chc qll +sxd: hsp bxg +zsl: ccg +plg: ngt dcz +llg: vhx kkg +txs: xzt +kjn: nbt +qzr: pft mqn lhk +tvl: xfr mmv +rfm: nbt vml +hjd: lsf +dtk: tkl srb nqf +jbn: lns dxl qkg fhg +chk: jkz zgg +rhx: slv hst jrx ssl +lnn: rhd +zpf: sqd zhm mmf znm +xcm: hrm ktp lff fcd +vjf: vnt mdl njh zrt +nhb: mbz +vdl: kmj mdk kdd +fjm: dlx +lrs: ccz sgj xfs zjr +vbz: ggs xsb sgz lsz vzh +vvr: rmv +grd: lcx hql +dnz: hkz +dbm: lvl tvj fnc +qll: zrt +czs: zvq chn qnj mdj +gmn: zpx +trs: pkm rhd kmh lnp +mdj: cgp npm +vxl: gsz qrk qbs jmz +ffl: lqq zht +hhn: ctr vvr bgq ttg +nnj: ftl tgt xzh ctt +xrh: tpc sxd jdr xrt +zvv: kll ktj mzn +jfg: trb svv xnj sbh +zvb: gsk gmt +jhd: jts diff --git a/2023/day25/solutions.py b/2023/day25/solutions.py new file mode 100644 index 0000000..f9b559b --- /dev/null +++ b/2023/day25/solutions.py @@ -0,0 +1,13 @@ +import networkx as nx + +with open("input") as f: + ls = f.read().strip().split("\n") + +G = nx.Graph() +for l in ls: + v, *us = l.split() + G.add_edges_from((v[:-1], u) for u in us) + +G.remove_edges_from(nx.minimum_edge_cut(G)) +a, b = nx.connected_components(G) +print(len(a) * len(b))