From 12ae6d1fef42e44591614a6a9bf0cd3363364462 Mon Sep 17 00:00:00 2001 From: Eric Mertens Date: Sun, 22 Dec 2024 23:28:10 -0600 Subject: [PATCH] 2024-23 --- inputs/2024/23.txt | 3380 +++++++++++++++++++++++++++++++++++++ solutions/solutions.cabal | 5 + solutions/src/2024/23.hs | 43 + 3 files changed, 3428 insertions(+) create mode 100644 inputs/2024/23.txt create mode 100644 solutions/src/2024/23.hs diff --git a/inputs/2024/23.txt b/inputs/2024/23.txt new file mode 100644 index 0000000..9164c65 --- /dev/null +++ b/inputs/2024/23.txt @@ -0,0 +1,3380 @@ +jm-oz +el-mn +aa-jt +ag-mt +fg-bt +tm-xh +ag-si +tx-mk +ig-zj +fd-tp +sj-ln +rp-zo +np-mr +qq-ny +tf-ku +fp-fo +lp-pu +ht-zn +sf-pw +ln-aw +mt-tg +ft-ny +sw-rb +fh-vq +ec-xk +fo-ko +if-ka +uv-bl +mv-ph +ua-vq +yw-tj +lb-pp +yr-nv +rm-km +yf-ww +tx-ij +dz-oq +wn-qv +yw-ow +ay-cp +ps-hv +ke-lj +dq-xi +na-pu +ux-cn +pb-vb +th-pg +va-ut +em-mc +mi-un +jk-bg +fc-bo +ke-ei +yf-fp +ec-yc +om-ip +ss-gd +lp-mk +jj-sj +ru-je +fp-sd +wg-gj +dj-cm +th-ue +zf-cz +wg-gb +xv-ss +uw-ms +up-hc +pp-sp +my-bh +mp-hj +yy-ko +dm-ru +ax-ja +up-vh +dr-sp +fg-fy +wh-or +bl-mb +ic-wn +ws-sg +mm-nk +dq-ti +kv-yh +cc-ev +jg-vr +ga-fj +kp-jb +me-nf +ad-jd +wy-qp +fj-uz +my-tw +fu-zc +xq-cx +hs-wk +ah-zv +sn-kb +ay-ch +la-hr +qj-jn +ae-gt +mb-eu +mu-yg +ei-fd +rh-gp +rd-ua +vg-ou +jd-on +fo-ww +ue-sb +rz-so +fa-cp +wl-jo +ko-ww +si-nx +rz-jf +pb-zi +gd-kc +li-wo +mw-xf +mj-dv +vl-rh +rk-bp +ew-in +dn-xd +ka-ip +ws-jt +eb-ho +ez-ow +wa-hw +aa-vy +cb-fq +ll-xv +lb-qs +dz-zm +fk-ss +qs-xw +yd-wo +tk-zg +kv-kn +wg-ld +nk-av +ry-fm +td-km +bu-fa +lo-mz +xw-pp +zj-ew +he-nx +bo-ya +wv-oy +yu-pd +mj-na +hc-qt +mv-ej +bp-yg +wl-hc +ya-fg +kr-wn +yt-ij +xm-sp +kn-yk +uz-qj +hv-uu +nt-wq +in-jx +ge-up +te-uv +bs-ku +gd-sa +cj-xo +yx-nd +ds-pp +ba-nu +tg-xe +fo-mg +bn-bk +fw-nj +mh-jj +vy-tp +ua-ic +az-il +ee-yi +rs-ju +rw-wf +qh-js +so-dz +es-xo +ha-zv +ya-wh +ln-jj +kq-nu +ya-vk +gz-bf +bl-ra +wz-jl +fd-hj +yb-pj +fb-fv +df-ir +xm-qs +rs-fq +au-sh +ah-oj +ax-ds +cb-wy +zn-xx +dv-tx +bj-mb +ph-uk +id-yi +sh-rb +hi-yn +yq-bp +pu-tx +qc-fh +ho-zj +lh-xx +tk-js +rj-we +ml-we +qx-yc +ax-af +pl-sg +ur-ho +pu-pi +xw-ds +io-te +yi-tl +ts-lt +zn-fz +sw-ft +pr-uz +mh-qw +yn-bz +wk-rw +ve-ti +ha-fc +oh-ib +lw-mw +ys-pi +tm-sa +qb-yw +du-sx +jm-ha +dw-mk +qm-dn +pm-wx +wn-ip +rc-jd +jn-ql +gl-us +en-bn +ub-ch +oz-ha +cq-dj +kh-ty +yx-xv +pj-ww +hz-zv +xk-pm +wn-bu +zz-dz +dz-jp +yr-az +na-yt +nf-zx +ln-vr +lq-zz +sg-ju +mg-gv +jh-bs +wm-cl +sm-wo +fa-ub +cp-ch +qq-se +lj-gl +fw-wo +nt-co +ya-be +pr-df +va-ok +ml-nz +mb-yp +rs-hf +hz-eu +vk-be +wu-mi +js-gi +ib-jf +fo-eb +ln-nt +cm-ns +wn-za +ad-ru +lg-zi +bd-vl +em-mo +qt-up +kp-sm +vg-gu +fv-jh +qh-zg +ik-pu +se-vk +ss-im +pj-zp +fy-mx +gl-ti +ro-zn +xt-en +ku-jh +fu-lc +ai-sv +kp-kq +la-xq +xh-oe +vy-yc +tx-mj +uk-zo +rc-zc +ad-on +rc-gv +aa-sg +zz-yr +az-en +zv-nz +hx-az +md-kd +wg-fa +ru-ms +fv-jz +ch-tr +sg-cb +ef-rd +kv-xx +th-fc +cf-wb +id-vw +lq-bc +nx-mt +cv-ok +ez-ip +mn-nz +ky-ht +wi-tq +xo-su +id-tl +qj-pr +zr-mm +uz-re +oo-cx +yy-yh +th-kd +xv-do +ke-gl +yr-il +pz-jh +zf-nu +iq-pt +vg-lg +gq-jm +on-dm +hl-ao +id-er +ur-ew +fj-tc +xd-bu +oo-ao +pi-yt +fx-bz +no-uz +ym-ea +gx-qo +li-zf +uw-rc +pw-yy +vw-wu +mg-eb +xf-of +fj-no +rq-tp +ur-in +it-zt +rd-bg +sm-nj +ki-te +vv-kz +cf-aw +mv-rp +ko-ar +wc-yz +of-rm +sv-mn +uy-oa +tz-ax +pm-mn +oy-sq +lq-if +jz-hv +jh-zg +nl-ci +bi-wn +up-wc +gu-xo +ze-ky +gq-jv +yj-fv +jp-so +cz-jb +ti-zb +fa-iz +uk-ej +ae-hv +oe-fk +cq-oy +om-bi +ph-rg +et-bc +wz-st +cj-zi +mz-nl +bn-ub +ar-uj +ku-yg +fp-ko +km-ux +ag-mz +ds-dr +vr-cf +bi-ow +wv-dj +wq-sj +sn-rp +wy-df +ff-qy +tr-ld +vy-sv +fm-gz +hz-pe +bt-yc +eq-ne +si-lk +kt-hv +ui-ka +et-gb +yr-hx +gn-is +lv-qt +df-cl +kn-vn +nf-km +ki-bl +pt-ff +xf-um +td-yq +zx-oa +ti-ev +jw-gh +en-pa +oz-jv +kw-hj +wz-cc +ok-yy +nn-kj +cp-wg +sl-qp +wf-nn +xu-ts +rs-cb +se-ya +lb-ja +ba-sm +es-gr +lp-ij +hm-id +cm-sq +ut-yy +xd-ay +wv-aj +bg-uy +fl-vn +hn-rj +qy-ek +ex-ww +bi-tj +lj-zt +fy-wh +vy-rq +dj-gz +kb-rp +bh-tw +lg-av +ne-qo +xi-st +fc-mm +ua-qa +ch-et +pz-ku +ei-gl +kn-ze +st-ti +ee-wt +hc-xt +lq-qe +ec-hk +cb-hf +sw-cl +xv-iz +nv-pa +vh-hc +zm-gd +ci-be +yt-ys +nf-gk +ld-gb +kz-lm +xf-in +sj-co +zc-jd +we-hz +vj-gt +kp-li +go-nc +no-lx +lp-tx +ns-wu +wg-ef +en-ce +xq-rs +lm-ab +mh-xu +mi-ac +ch-xd +ui-rh +xp-er +ko-yf +om-kr +qy-lr +ea-va +th-bo +pg-au +go-oh +th-mm +xk-yc +rh-fh +wi-je +qy-kh +io-md +mr-wc +bd-qc +ci-or +ys-pu +ut-fe +ho-ig +yu-im +wy-ir +qe-ib +vu-fi +qz-vd +mx-be +fl-ht +fq-ju +yw-zh +nx-nl +wq-aw +ss-pd +ay-fa +ce-pf +jj-co +px-la +fx-yn +vq-qc +fw-li +ml-jv +md-eu +ag-tg +ki-eu +jv-ah +ns-vw +ic-oa +gk-qa +ci-mx +zz-qe +yu-kc +gs-oe +fe-ct +lk-xe +hw-tw +ir-qp +xu-wa +av-th +oe-zm +ll-ph +fh-ui +vv-vd +wv-jr +iq-lr +hs-wf +zk-pf +bm-gh +zg-gi +og-bk +su-zi +pc-rs +pa-yr +iy-wy +tk-gi +zp-eb +yz-xt +wu-hm +rs-ws +km-yq +cb-uz +nu-wo +ze-fz +md-bl +ms-cp +ij-on +zc-lc +rd-gk +vt-vu +ir-sl +tr-xd +ra-ki +ft-sl +ni-xf +rg-hd +cl-zl +ph-rp +jg-wq +fd-vp +wl-np +hb-zd +ea-ct +jx-ig +wb-qw +zy-ue +et-ub +ke-vp +kh-hi +bp-rm +lw-ig +dm-uw +pt-hi +kb-mv +bi-za +ur-jx +wl-mr +jg-jj +hn-rs +ve-xi +tf-tk +hv-fv +vy-mn +lo-yd +st-cc +ek-fx +qb-ez +tt-dz +xl-ay +yw-bi +uz-ql +qy-ty +vd-rt +vj-bh +fz-ky +ap-tk +cp-xd +mu-km +it-pg +ou-zi +on-ms +xu-cw +gi-pz +mv-sn +jw-jn +bn-pf +ll-ww +zj-lw +jd-rz +om-qe +kt-ps +hx-pf +vr-ik +la-iv +ae-yj +mn-qx +jv-nz +si-xe +vm-ke +hz-jv +fw-hc +tf-jh +ss-zm +ir-hj +ec-sv +sh-df +ad-tm +rq-xk +lp-dw +ej-zo +ev-zb +we-gq +mj-mk +eb-ww +xv-go +pc-ju +iq-ty +mm-zt +fm-aj +pm-rq +td-gd +ab-hs +kz-rt +va-yh +pi-dv +fm-cm +kv-ze +ua-gk +ro-ze +zd-xo +qo-jg +mb-uv +ml-ha +hx-og +pj-fo +ur-ni +xf-zj +sp-tz +gb-fa +qv-yw +yu-ss +ro-lh +ha-pe +qh-jh +dz-jf +ln-co +um-ur +ni-jy +pb-su +ne-ae +oy-vx +vy-qx +vu-vq +ba-li +aj-sq +kh-lr +nf-ic +ea-yy +iy-hk +xm-xw +fj-jn +qa-rd +fc-nk +mq-pr +yd-ge +yx-kj +gs-xh +iq-hy +hz-ah +mb-ra +hi-rd +ps-fb +oe-ss +iv-ao +jz-yj +ui-lu +hl-bm +tc-pr +ve-ev +dz-ib +ne-ps +pg-ue +ge-nx +ai-hk +tj-zh +wb-sj +fu-dm +lj-mp +ec-rq +vb-gu +mc-se +mw-ig +id-ee +rm-mu +yp-eu +xl-du +ew-xf +vr-wb +ap-qh +oj-nz +of-wi +vj-ze +or-vk +uj-la +et-fa +ou-su +ct-va +xq-sb +eq-ae +pm-sv +dn-tf +sx-zo +va-hb +jo-vh +fo-ac +oq-if +qb-ow +te-bl +an-gn +qh-gi +mr-qt +gp-vu +ev-jl +ii-kd +sw-wm +bg-me +zz-ib +oh-kj +pe-gq +wa-cr +jf-tt +ag-ft +yh-ok +om-ow +xw-dr +av-it +su-eq +kr-ez +wa-vj +cz-nj +xx-fz +nn-vv +mh-jg +vw-yi +dq-ev +yx-nc +ht-yk +lq-dz +bo-it +oa-qa +hc-mr +bs-tf +kq-fw +mi-tl +fc-ue +kw-ei +ct-sf +ke-fd +ao-sb +rd-zx +my-ts +bn-hx +xo-zi +rd-me +wo-zf +pt-gp +gs-tm +zl-lx +qq-bt +mx-qq +wo-kq +kw-lj +ez-bi +pc-cz +ry-jr +qp-wm +sn-yu +io-mb +mu-am +up-pk +mo-vm +du-ej +bf-sq +ue-zr +fu-jd +wq-mh +ez-zh +qt-jo +qc-ka +bm-sb +ym-js +hc-ke +zn-zx +kj-do +df-ft +es-qs +be-or +kq-zf +wz-be +re-it +aj-cq +na-ij +eq-yj +ds-ja +lu-qc +sg-jt +nd-iz +nu-jb +pc-cb +fz-ln +cz-nu +uw-zc +xf-ho +ml-jm +zx-qa +kc-xh +ra-ai +st-mf +kt-yj +fq-hn +td-mu +jr-sq +sx-xl +us-ds +uv-bj +vw-wt +pi-dw +gq-nz +ew-jx +ek-yn +fe-cv +np-pk +zr-zt +qj-jw +dm-jd +io-ra +oh-yx +ff-yn +cw-bh +ig-xf +nv-hx +ht-lh +it-zr +na-dw +id-wt +fd-mo +qs-ja +im-xh +an-yx +tj-qb +er-yi +gk-zx +ag-xe +qz-hs +mq-gh +an-rk +kr-zh +yx-is +nv-bn +vl-lu +hw-xu +ah-jm +qo-uu +lm-nn +wh-fg +fi-vq +pr-ga +yj-uu +fi-fh +qy-hi +ps-eq +gr-xo +zb-xi +og-nv +qj-mq +bf-wv +ty-qe +em-lj +qq-be +oo-la +hd-ej +we-nz +ui-qm +ki-uv +rm-am +rk-oh +bo-zy +hd-uk +fy-hr +mf-ti +ek-ps +wf-kz +rk-yx +mt-nl +ff-ty +mc-be +st-dq +pl-zt +rp-sx +lx-zb +wh-be +rm-td +mg-ar +bt-wh +pf-en +iv-hr +kt-jz +fi-vt +on-uw +hy-wk +cf-qw +wi-rm +eu-uv +wl-lv +yk-vn +vg-es +ch-gb +uu-ht +pt-lr +ne-uu +fd-lj +zk-az +ua-me +he-lo +kc-sa +gv-uw +je-dm +pe-ah +bl-eu +oa-rd +sh-wy +ce-zk +an-iz +ou-cj +vb-zd +nn-kz +xk-tp +ns-ee +vu-ui +ce-il +bl-bj +zg-il +qb-za +tk-dn +jg-cf +vm-mb +bi-yk +lm-wk +sp-ik +he-io +er-wt +kw-mp +vg-pi +ge-lo +zf-jb +pl-aa +pr-jn +yb-mg +qp-df +wz-dq +sl-iy +vd-ab +sa-ys +zh-ow +sx-sn +fq-sg +dr-af +lt-wa +hs-vv +pf-og +du-lm +lg-su +kw-us +px-io +sg-rj +kt-gx +wt-un +ze-yk +ge-mz +id-wu +sj-jg +et-cp +iv-cx +sf-ym +np-jo +um-jx +ys-ac +zv-jv +tc-uz +tq-rm +vd-uw +fj-tf +th-zt +au-fc +aw-wb +px-bm +zo-du +px-hl +hk-xk +il-en +xm-af +ek-kh +ac-pu +zb-cc +iy-cl +hd-sx +az-pa +fi-gp +nu-mm +rj-mp +pp-lh +rw-ab +ii-mb +ba-jl +jn-re +ad-dm +pu-mj +ax-xm +zt-bo +nl-lk +ft-ir +sd-yb +cv-ym +zd-lg +mo-ke +go-an +zr-fc +nz-jm +ip-bi +uu-fb +oh-nd +wx-bm +fb-dr +yc-pm +nc-nd +tm-pd +bk-nv +qc-vl +nl-lo +oj-ml +jr-cm +jn-ga +lv-mr +np-up +cc-ve +gj-cp +mj-ij +es-gu +qh-id +gb-xd +cv-pw +ei-vp +hr-hl +fq-hf +wi-am +mq-fj +sd-mg +yb-ll +ky-bd +ko-pj +hz-oj +rc-lc +sh-ny +uy-zk +lq-ib +do-oh +ea-ok +nc-gn +ol-rt +ja-an +yn-iq +pg-mm +en-nv +wa-tw +zg-bs +vv-rt +zk-en +jj-wq +je-uw +wn-qb +ux-wi +sp-ds +vp-kw +km-yg +ny-ir +qz-jk +rh-ka +pd-lw +of-td +kj-an +za-zh +pt-kh +ux-rm +zz-oq +vk-bt +zg-pz +oz-dm +bn-pa +jf-oq +gs-fk +pw-fe +rt-qz +wf-lm +ek-pt +iv-uj +cm-vx +wg-xd +et-ay +gk-zb +iy-sw +ha-jv +yz-jo +lj-us +zc-ru +hl-uj +kz-ez +xw-tz +bk-hx +vd-wk +ym-fe +gx-fb +un-tl +wl-tc +tm-fk +lb-sp +tq-yg +hs-kz +vr-sj +wh-qq +wq-cf +vw-tl +pp-af +kt-uu +fx-ty +sj-se +ci-qq +bg-zx +xh-zm +so-jf +wu-fe +we-jv +je-jd +sq-ry +bj-md +io-kd +kt-qo +fy-ya +er-fl +hw-bh +wu-er +wq-wb +fv-ps +ni-fm +gd-tm +lo-mo +rj-rs +yh-ym +mx-bt +im-tm +ik-ds +jf-jp +mk-ac +og-bn +ga-no +id-ns +ss-tm +ds-qs +cc-zl +ns-yi +ab-wk +ef-jk +uk-jp +st-zl +qc-gp +un-xp +gl-vm +ku-tk +jt-hn +fc-pg +tx-yt +mo-lj +ge-tg +vh-np +ur-jy +aa-ju +um-jy +rw-vd +zn-ze +bm-cx +ny-iy +af-tz +mj-ea +jn-tc +sg-lv +ze-ht +oy-sp +xh-yu +pe-jn +st-jl +tq-am +oh-gn +fc-av +kd-ra +ip-ow +sd-ll +ei-lj +cw-cr +sd-ww +cl-rb +wh-vk +lg-vb +tg-nx +ad-rc +vb-cj +lw-xf +ci-fg +yr-zk +ww-mg +or-fg +dw-pu +mg-yf +nt-wb +az-nv +rh-vu +sw-qp +is-iz +pc-fq +ll-ar +au-mm +ic-zx +zh-ip +fz-ht +ja-xw +hn-cb +rb-ny +tm-oe +dv-lp +kr-qv +wq-vr +qv-ow +sd-eb +bu-ch +og-vu +dn-hi +yw-va +pm-qx +zk-bk +bt-mc +tr-bu +xw-ik +yn-lr +yb-fp +jy-in +kc-im +qq-ju +md-ii +fi-mr +pr-re +sa-fk +jt-pc +kd-ki +su-gr +wz-ti +ff-bz +mf-dq +bh-gt +lw-ew +ts-vj +mq-jw +dv-ij +sw-sl +dn-gi +oy-aj +fg-vk +se-or +vg-pb +iy-wm +zz-jf +ae-kt +ag-nl +np-xt +uy-zx +rp-uk +kv-zn +ft-rb +un-wu +fm-bf +qm-js +pj-wv +xv-kj +gu-zi +an-oh +zy-fc +af-ad +ec-tc +du-hd +ej-rp +lq-tt +wy-ft +zb-ve +ar-fo +pc-rj +wo-ba +gu-gr +vg-gr +jx-jy +fk-bf +kz-wk +ge-si +kc-pd +nf-bg +dw-ys +ip-qv +kb-hd +oq-qe +rb-wy +qk-vp +rg-mv +fj-gh +ex-ts +eq-qo +zi-vb +yn-ty +rq-hk +wa-bh +mf-zl +yp-uv +cx-uj +ga-gh +vn-iq +cr-ex +mw-ew +aw-vr +pe-zv +zf-nj +ha-nz +ki-mb +xm-ds +ej-ph +ln-qw +du-kb +ra-md +ee-hm +ff-hy +wu-wt +rb-qp +lm-ol +aa-rj +co-mh +zg-ap +oa-ef +jo-up +cl-ir +nc-mw +ka-vu +pg-av +nd-do +hz-gq +gr-zi +ai-tp +zv-ml +il-pf +ww-yb +iz-rk +lk-mz +ph-du +kt-ne +jk-oa +fv-gx +ah-ml +dv-mk +ml-gq +rw-hs +mr-pk +qv-bi +rt-wk +gz-cm +wv-vx +qz-ol +sn-zo +ja-ik +my-tz +ct-hb +bc-ic +sq-ut +lg-xo +cf-ln +dm-ms +oz-nz +jb-nj +aw-qw +lb-ax +jt-rs +px-wx +fq-aa +ym-ct +oq-bc +px-ao +af-xw +xh-fk +yt-pu +ua-ef +fh-ch +va-cv +ft-wm +ag-he +wm-sh +bz-iq +we-oj +zk-pa +mf-lx +wt-ns +lt-cw +rq-sv +qj-gh +za-ip +si-yd +ce-bk +gs-lt +yd-ag +et-wg +hs-lm +ts-gt +bl-vh +tw-lp +cp-gb +ky-zn +lv-xt +re-fj +wc-jo +sl-cl +hl-la +qs-ax +yf-zp +jy-ho +ic-bg +zt-fc +vm-ei +gr-ou +gt-hw +so-ig +tx-dw +na-zo +ac-mj +qm-tf +co-jg +jz-gx +zl-jl +ve-jl +mz-si +mm-bo +gx-uu +vm-fd +hw-lt +ad-je +tg-lk +fu-ad +jo-hc +rd-jk +zx-me +qj-fj +vm-us +ut-hb +rd-ic +hf-aa +xp-id +bs-gi +xm-tz +xd-fa +yd-lk +np-lv +bu-yn +oz-pe +wl-qt +wn-ez +nd-rp +cj-su +vl-fi +hz-ml +rw-nn +mw-ni +rt-ab +cm-oy +dm-lc +uk-mv +gp-ui +oj-zv +bf-oy +yj-qo +ya-mx +ke-hj +fk-zm +ti-cc +st-ve +ou-lg +mr-up +iq-hi +xv-an +md-mb +ut-ok +cq-sq +wc-pk +oj-ha +rc-ru +fm-cq +md-ki +um-in +ea-ut +uy-me +yg-ux +ee-gx +xp-yi +em-gl +hb-pw +tq-of +aw-sj +xu-lt +lb-xw +xh-gd +yz-wl +ke-us +na-pi +zp-mg +lt-my +nc-is +jy-cr +bd-vt +bi-zh +fb-jz +eb-yf +hw-ry +fe-sf +kc-tm +yd-nl +ok-pw +rb-iy +ty-hy +lx-jl +qx-ec +hf-sg +el-yc +yp-bj +uj-sb +do-an +lk-lo +uu-fv +az-pf +eb-ar +mn-ec +lx-dq +gp-vt +li-nj +ro-ht +rz-oq +ac-tx +rj-ws +wc-wl +vt-vq +bn-il +mw-zj +zt-au +qz-vv +qy-pt +lp-mj +rh-lu +hc-yz +gj-fa +jt-pl +cr-tw +sl-wy +tq-td +ax-yf +xo-vg +cr-my +js-ap +xd-ub +ay-ld +lb-af +bg-yx +ei-us +yt-mk +of-ux +qz-lm +ll-fp +tf-zg +ar-yf +hb-fe +hk-el +go-do +gv-ad +va-fe +nx-ag +me-ef +lv-jo +su-vg +js-ku +ms-lc +gl-fd +em-vm +ir-sh +hv-eq +wx-cx +zh-qv +nx-lo +wu-ee +nt-jj +ll-fo +bo-nk +ij-ew +ut-ct +kc-pw +hk-tp +hw-cr +ve-wz +ce-yr +du-rg +hf-pl +fk-yu +li-kq +cl-qp +qp-iy +fj-jw +yp-ii +vm-kw +pl-fq +iv-sb +ju-rj +js-zg +or-qq +ra-eu +ge-ag +vh-pk +tg-yd +xt-mr +qa-ic +mg-ll +or-fy +vj-cr +sp-ja +nf-uy +bt-ya +ki-yp +jw-pr +qp-ft +wv-fm +jv-oj +xi-lx +yw-om +kj-gn +na-dv +it-ue +bm-ao +zi-im +hd-rp +oh-is +mu-wi +vr-jj +ej-kb +zh-wn +ua-jk +vw-un +ax-dr +vq-ka +hm-un +ba-kq +pe-we +bp-km +wh-se +ww-ar +il-nv +pr-ql +fp-eb +gn-vp +up-wl +wn-ow +qm-jh +kz-ol +se-be +pm-hk +et-wf +vn-fz +ht-kn +an-nd +vd-ol +oo-bm +qb-qv +qh-tk +pk-qt +km-tq +bg-gk +ym-yy +zc-ms +au-it +vd-wf +zp-ww +ky-fl +fb-kt +ct-jt +ny-cl +mb-te +tj-wn +ef-gk +nv-ce +qe-jp +og-zk +yq-mu +aj-gz +xv-gn +ga-tc +pz-dn +ga-uz +qt-np +fy-mc +gn-do +gt-cr +ko-zp +xp-hm +rh-fi +zy-av +uy-qa +ut-sf +el-vy +um-ew +vq-bd +ka-bd +qv-pf +sh-ft +zt-nk +qm-qh +tq-yq +pb-ou +rk-kj +yj-ry +gp-wb +av-bo +pt-bz +el-xk +th-au +sh-cl +bf-dj +yj-ps +ph-sx +il-hx +sh-sw +kv-fz +vy-hk +hs-qj +gd-yu +hv-yj +gb-rm +xi-av +of-am +sv-sm +pc-hf +mx-mc +xq-hl +zc-on +lv-wc +ws-aa +ve-zl +gv-fu +ga-mq +za-qv +or-mx +pi-mk +ru-fu +vp-hj +tw-xu +ue-bo +kn-fz +sn-hd +hn-ws +qb-zh +of-cn +zm-gs +yr-og +ol-rw +ay-wg +fy-qq +ub-wg +sx-kh +cb-pl +he-lk +td-cn +av-ue +lr-hi +nj-kp +bd-rh +zb-st +fb-yj +is-go +ha-we +lb-tz +xl-uk +vk-mx +jf-ab +mo-gl +pm-el +we-ah +pa-pf +uu-eq +ki-cq +vv-hx +ko-mg +vl-ui +bj-ki +dq-zl +tz-qs +uy-gk +sv-el +sf-va +aj-dj +hi-hy +mx-ga +yx-iz +lv-vh +sm-jb +yf-yb +ra-ii +zj-bk +gb-bu +zy-mm +qb-om +sb-px +wk-eb +tt-zz +yu-zm +tk-pz +ik-dr +oq-so +jb-qk +rm-yq +yx-gn +dq-cc +us-em +te-bj +bs-ap +rw-kz +jl-mf +kp-cx +vu-bd +er-ns +wo-jb +wz-mf +bj-kd +gi-qm +sm-nu +sf-ea +pg-zy +kz-qz +js-jh +qe-if +zf-sm +gd-pd +qb-cf +rz-dz +ss-gs +ib-rz +is-kj +io-ii +qc-ui +bi-kr +uj-xq +ae-jz +xp-vw +ue-au +jp-ib +ay-ub +em-ei +az-bn +oo-xq +yr-pf +zv-jm +vy-ai +ge-nl +cv-ct +sv-tp +tr-fa +li-sm +pd-xh +ym-ut +qa-jk +lc-jd +oj-np +yz-zr +oq-lq +ns-hm +yn-kh +oe-yu +pr-fj +rc-ms +fg-be +ni-um +hc-pk +be-fy +vk-mc +eq-fb +vr-co +pg-zt +lh-fz +ky-kv +qa-ef +yk-lh +lq-jf +zd-gr +xu-gt +mt-gh +qp-ny +ln-jg +kh-ff +yg-rm +sp-xw +wx-iv +bh-ts +tr-ro +uv-md +xq-wx +su-gu +oz-gq +ay-tr +wv-sq +cj-zd +yw-ip +nn-rt +px-hr +jx-kb +hy-pt +kp-zf +md-wz +vk-fy +am-km +ry-dj +gd-gs +gk-oa +ru-gv +ej-sn +jx-mw +wc-qt +zk-tq +nu-qk +ff-lr +sb-wx +ut-pw +mg-fp +lc-uw +qx-rq +an-nc +ph-sn +yg-cn +wm-ny +zb-mf +uk-rg +ts-tw +pd-gs +oe-sa +hk-yc +kh-iq +vl-vu +lt-cr +zo-kb +ja-af +ho-ni +jm-jv +te-kp +nc-xv +ai-xk +aj-jr +ql-fj +fv-ae +dn-jh +vu-qc +cq-cm +iq-ff +hc-wc +bc-tt +ut-cv +qp-wc +gq-vm +il-bk +th-zy +ub-gb +bz-qy +uk-du +za-tj +yh-ct +ao-fx +vn-ze +rc-bh +hw-ts +wm-xq +ds-tz +og-il +qw-vr +ky-vn +xi-cc +ws-fq +wz-zl +oz-im +fh-gp +mp-ke +nf-jk +wc-vh +hy-qy +co-cf +uv-ra +xp-me +mz-yd +ub-ld +fu-rc +uz-gh +gp-vl +ax-sp +fw-nu +sa-zm +hr-bm +pk-lv +ok-ym +yp-kd +hb-sf +fi-lu +ue-nk +gq-ha +ex-bh +pk-jo +qt-bm +sx-rg +pl-hn +ua-nf +cj-es +ql-nj +rb-wm +ej-sx +zz-rz +mn-ai +jw-tc +ni-jx +kz-vd +cz-sm +ao-wx +fu-on +em-hj +yr-en +pl-ju +th-zr +sq-vx +zn-fl +vx-dj +ba-zf +et-tr +gp-vq +lr-bz +of-km +kr-pz +qe-dz +aa-cb +vn-lh +el-tp +no-pr +um-ig +ei-oo +ci-ya +ue-zt +jk-ic +ln-wb +co-wq +sd-pj +tq-cn +zp-ar +fo-yf +jv-pe +sa-pd +lr-ek +co-aw +bc-jf +xv-nd +my-xu +cc-jl +bg-qa +md-yp +rb-ir +qv-ez +xl-rg +vr-mh +vp-us +tc-mq +wc-np +pp-tz +im-fk +iz-nc +pw-yh +ga-ql +lu-vu +zy-nk +qo-fb +uv-sl +ab-ol +vh-qt +ml-wh +ek-ff +hf-jt +qy-yn +qw-sj +ce-az +fx-iq +zr-nk +lc-gv +go-iz +dj-sq +ba-qk +bd-fi +pw-ea +li-cz +mw-ho +vv-lm +ts-cr +kw-fd +tt-qe +gj-ub +sd-gr +gj-ay +ms-pa +jb-kq +cj-pb +vp-gl +sf-yh +ho-ew +wm-sl +ql-qj +ho-jx +oq-tt +lg-gu +qh-ku +fl-ro +ys-mj +jn-gh +lg-gr +ah-la +tl-ns +cz-kq +zk-bn +qx-zj +tp-qx +dw-ij +eb-yb +sj-nt +js-dn +vt-qc +hd-zo +xq-hr +zp-fo +kr-qb +cc-lx +pp-ik +lq-rz +yz-up +ae-ps +fl-yk +ld-tl +he-yc +ch-ld +sn-mz +hx-ce +fc-it +oh-nc +qk-zf +pb-gu +he-tg +fq-jt +zl-zb +vx-fm +rk-gu +cl-ft +ml-oz +my-wa +re-ql +pj-fp +jj-yt +qk-wo +yz-vh +pb-es +oe-gd +mt-ge +xh-sa +za-om +mb-kd +ax-xw +er-tl +bz-hx +sh-sl +wx-hr +my-vj +bc-jp +fh-vl +so-if +gt-cw +ux-cj +ae-gx +ol-xh +jj-aw +xm-ja +pi-ij +fg-se +ib-bc +nx-xe +hj-vm +xp-tj +jw-yp +hl-sb +qp-sh +sx-mv +ex-hw +ty-pt +ap-rw +ad-zc +pa-og +om-zh +kc-ss +ze-lh +gi-jh +mp-mo +wg-bu +ui-fi +em-mp +hm-vw +hn-pc +ea-hv +uy-ic +zb-jl +tz-dr +ou-es +ge-lk +xm-lb +sa-im +zc-je +nj-nu +vm-mp +gx-ps +ds-lb +bm-la +ow-tj +bc-rz +vj-cw +jp-if +ha-hz +zn-yk +uv-kd +bc-zz +lu-vq +ex-cw +td-am +na-tx +it-nk +tf-gi +cz-qk +av-au +tr-cp +qs-ik +hl-cx +wt-mi +un-er +ti-zl +tl-wt +cv-yh +me-oa +yr-bn +ap-jh +gj-ld +lw-in +kn-fq +ys-dv +dr-ja +rk-do +sx-uk +tr-gj +rg-kb +am-yp +rt-hs +ik-lb +cn-bp +wt-yi +ur-mw +df-sw +ee-xp +yg-yb +og-az +me-jk +on-gv +up-xt +tp-yc +fy-bt +ka-fi +ph-kb +jd-ms +jk-zx +dq-hz +ky-ro +yn-pt +yy-sf +ou-zd +rp-rg +wx-uj +jb-fw +tg-si +fe-ea +oq-ib +bj-ra +ur-lw +px-cx +wy-cl +je-ms +jr-oy +rg-ej +iq-ek +xk-vy +jl-xi +yp-te +cq-bf +jd-gv +fo-yb +ff-fx +pu-dv +vn-kv +om-tj +om-wn +xi-ti +ec-pm +sm-fw +rq-el +ch-gj +mt-lk +gj-gb +tt-rz +nx-lk +ni-ew +wm-ir +rs-pl +aw-mh +mx-fg +jg-qw +ko-yb +jt-rj +zm-pd +un-wq +vb-su +oq-yq +mg-pj +pw-ct +ar-yb +ol-vv +rk-go +zi-zd +kh-fx +ao-xq +ps-qo +hk-qx +na-mk +zb-wz +uj-ao +tw-gt +ns-mi +mh-oa +vy-ec +mu-bp +bd-gp +yf-pj +yg-yq +vg-zd +ts-sf +qs-af +rc-je +pa-ce +uw-ru +wz-ev +xf-jx +ab-wf +rk-gn +gz-cq +fa-ch +of-ty +vx-ry +ax-pp +iv-nx +yi-hm +ps-uu +fl-lh +qe-jf +fh-ka +df-wm +fv-qo +ev-lx +vw-er +tl-ee +vk-wo +sg-rs +hb-cv +cp-bu +pk-yz +si-mk +zm-tm +us-fd +lq-jp +uj-px +cc-mf +ro-xx +vl-vq +km-wi +ny-wy +zr-au +fp-zp +em-fd +na-ac +ro-vn +js-tf +ne-hv +go-yx +ub-cp +ir-sw +fm-dj +cr-bh +ow-kr +bf-cm +ce-og +jr-bf +pp-ja +kh-bz +qb-bi +xt-vh +ve-lx +fg-np +do-tx +no-mq +ci-fy +rq-mn +zo-rg +tz-ja +is-rk +vj-xu +ka-vt +lp-na +ti-lx +si-he +nk-pg +ik-xm +du-mv +tg-mf +rg-me +gv-je +aj-ry +dv-gz +no-tc +qo-jz +pr-gh +hf-bj +yt-dw +ii-eu +fg-mc +hl-st +cz-wo +jv-xe +do-yx +ik-ax +hd-mv +df-iy +pw-ym +nz-hz +us-mp +wb-co +st-ev +xx-fl +ky-yk +wl-pk +cx-ao +zg-qm +rd-nf +is-do +wg-ch +qj-ga +oz-ah +im-pd +xt-wc +kr-za +pu-mk +sv-qx +aw-nt +pg-el +gq-zv +cn-mu +wf-wk +qm-pz +zv-oz +bs-tk +dj-oy +sp-qs +lw-ni +yt-lp +ok-hb +ns-xp +bu-ld +wf-qz +ez-za +zr-zy +ew-jy +fi-qc +lg-es +vb-gr +kn-xx +vh-wl +qy-iq +ht-xx +za-ow +ee-un +ju-jt +xh-ss +wa-gt +ra-yp +wv-cq +il-zk +df-ny +fu-ms +bz-ek +oj-pe +ti-jl +ab-kz +jz-eq +cf-sj +ty-bz +fb-hv +lu-ka +wg-tr +sj-gi +pa-bk +qa-nf +mu-of +iv-xq +dn-ku +bt-or +pa-il +vl-hw +jw-uz +qy-qw +zx-ef +jt-cb +ho-in +lr-fx +kb-xl +si-mt +gv-zc +om-ez +ze-xx +mi-yi +lj-vp +nd-rk +sd-ar +lg-pb +ct-yy +qw-nt +ne-jz +xt-qt +jn-no +ua-oa +bj-eu +tk-jh +ai-yc +ky-kn +cj-vg +in-tz +ef-nf +gq-oj +la-ao +ej-xl +bs-qh +dn-zg +sv-xk +ah-gq +ae-qo +ro-fz +yq-wi +jx-lw +dn-bs +rw-qz +mm-ue +ju-ws +wv-gz +ko-sd +um-xo +jj-wb +rt-rw +xm-dr +ll-zp +ux-mu +kw-mq +sf-cv +rz-jp +wl-xt +ru-lc +ba-cz +pg-bo +sl-ny +wh-ci +gz-vx +cb-ju +bp-ux +uv-ii +mk-ys +gv-ms +ez-tj +kp-ba +vd-nn +wu-tl +xm-oe +vq-ui +ig-ur +tw-ex +mr-jo +pi-ac +qc-hm +yc-mn +va-ym +jm-oj +in-ni +nd-is +nv-zk +ww-fp +ic-ef +qc-rh +jn-uz +dr-pp +ii-ki +rh-vt +tl-vj +fw-kp +qv-tj +ac-dv +zf-fw +hv-qo +td-bp +rg-sn +io-ki +ph-zo +vp-em +ad-uw +rh-wv +zd-su +hn-sg +bn-ce +um-lw +oe-pd +my-cw +lx-st +vw-xw +am-yq +ex-my +mq-ql +gb-tr +of-bp +af-ik +wk-qz +lv-yz +hy-yn +ay-bu +he-nl +eb-pj +nu-li +hx-pa +no-ql +ky-lh +az-xx +md-te +ju-hn +ha-ah +hf-hn +pc-pl +ko-eb +uk-ru +hz-jm +oq-jp +ig-in +kw-ke +ds-af +xv-oh +ae-fb +ld-fa +ij-mk +im-zm +xt-pk +vt-lu +sw-ny +aj-bf +bo-zr +re-no +zp-kt +rb-zv +ai-qx +cn-am +ex-gt +et-ld +ct-ok +fv-ne +tf-pz +vj-tw +sd-yf +hr-ao +ys-ij +qm-bs +cn-rm +zj-jy +mq-re +or-ya +zr-av +ut-yh +vk-qq +zb-dq +on-je +ro-yk +js-bs +so-bc +tg-nl +gv-dm +cp-ld +xk-qx +te-ii +qs-dr +ry-bf +so-tt +pz-qh +gh-re +hk-sv +bh-xu +kd-eu +tt-jp +pp-xm +yz-mr +gn-iz +zp-yb +lq-so +gs-kc +rs-aa +dm-zc +no-qj +ne-yj +zj-um +ru-on +mn-hk +wf-rt +yh-hb +az-bk +el-ec +so-ib +rw-vv +ok-fe +ci-bt +ws-ev +kn-aj +wh-mc +rb-df +ry-cq +cf-jj +er-mi +ex-wa +nk-ne +et-xd +hl-oo +do-iz +it-th +cx-la +un-ns +ku-gi +kh-hy +sx-kb +zo-xl +ow-xi +ol-wf +uu-jz +ws-pc +um-mw +wy-wm +gp-lu +qt-yz +gu-ou +td-ux +vv-wf +vk-ci +yr-bk +ux-am +fm-jr +vw-mi +ev-zl +ya-qq +ll-pj +yd-mt +lo-tg +jp-zz +ec-tp +mq-uz +im-gs +hr-uj +ir-iy +jr-cq +gh-ql +zn-lh +sn-du +jb-yi +ku-zg +xu-ex +mv-ce +jj-qw +rq-yc +vt-ui +sp-af +pt-fx +cj-vx +go-kj +nc-rk +pz-js +bj-ii +jr-gz +bp-wi +hr-oo +rp-du +mr-vh +kr-ip +ol-nn +lm-rt +gl-hj +un-yi +pe-jm +vb-xo +iv-bm +gi-ap +nc-kj +hl-iv +we-zv +hr-sb +oj-oz +zy-zt +my-hw +xd-gj +fu-uw +xp-wu +if-rz +fq-rj +ne-gx +iv-px +qa-bs +qm-ku +uj-bm +hy-bz +qz-nn +bu-ub +ur-fu +xd-ld +hw-cw +cj-lg +mx-se +au-zy +ic-gk +mi-id +tg-mz +va-yy +or-ii +sh-iy +wi-yg +yp-bl +yw-kr +gx-yj +lu-bd +kp-qk +tw-lt +jw-no +fp-ar +yu-sa +ph-hd +hi-bz +tx-pi +ll-ko +sd-zp +lh-kn +yd-zy +ty-lr +uw-jd +sq-fm +lo-mt +gk-jk +tm-yu +ol-hs +gz-oy +gb-ay +aa-pc +cm-aj +iz-kj +hs-nn +qm-tk +ai-rq +ee-er +we-oz +kq-jm +iy-ft +if-zz +ag-lo +xl-sn +fl-kn +wo-nj +cz-fw +bd-ui +za-ff +ac-dw +wi-cn +jb-ba +wq-qw +mh-cf +ib-if +uu-ae +gt-lt +oe-kc +mc-ya +kv-lh +ts-wa +in-ol +pi-lp +ai-pm +xx-ky +co-dj +vx-bf +nv-pf +sw-li +uy-jk +ys-na +lc-on +ze-fl +gx-hv +uv-io +pb-zd +xu-cr +jr-vx +es-vb +zi-es +ig-jy +yy-fe +em-kw +ju-hf +jf-if +eq-kt +hy-ek +lw-ho +lt-bh +lc-is +mo-us +ro-kn +bl-kd +np-yz +fu-je +yt-ac +if-bc +yt-mj +fw-qk +nu-kp +xx-vn +se-ci +mc-or +mi-hm +nd-go +jy-xf +sq-gz +an-is +ok-sf +nk-au +hi-ek +ec-ai +ab-qz +nt-vr +ou-vb +kt-fv +lo-si +wt-lr +oo-uj +jy-mw +ig-ni +uk-kb +ph-xl +no-gh +jo-xt +mn-tp +nc-do +we-jm +he-mz +dq-jl +lc-ad +nt-ok +nz-pe +cv-ea +ga-jw +gu-zd +jr-dj +re-qj +vx-cq +kc-fk +uy-rd +fz-fl +hj-ei +cn-ej +hx-en +wx-oo +pb-gr +ux-tq +he-xe +pj-ar +el-qx +cf-nt +tq-mu +gk-me +on-rc +aa-hn +ab-vv +sm-qk +zl-xi +bk-pf +nz-ah +dm-rc +td-wi +pu-ij +us-hj +xi-ev +ts-cw +vu-fh +pl-ws +hc-lv +xl-rp +sg-pc +fy-se +vp-mo +fd-mp +vj-lt +qv-om +oy-ry +jo-cc +bc-dz +pb-xo +mo-kw +hd-gr +im-oe +ht-kv +dw-jz +hd-xl +zx-ua +bd-fh +ez-yw +sa-ss +hj-mo +ml-pe +mz-nx +mq-jn +ur-zj +ry-cm +hi-ff +gn-go +fk-pd +hy-fx +tl-hm +av-mm +lk-ag +wa-mc +lm-rw +cz-kp +xq-px +ys-tx +yg-td +er-hm +kv-yk +ys-lp +ex-lt +dv-yt +zc-vb +bp-tq +hi-fx +va-pw +jw-ql +ga-re +fz-yk +mj-pi +wk-vv +vn-ht +ef-bg +tt-tk +lo-xe +mf-ve +kv-ro +wy-sw +sb-cx +ho-um +lj-hj +ux-yq +gd-fk +fo-sd +ve-rq +rz-qe +zy-it +mf-ev +zj-jx +te-eu +ql-tc +bu-gj +ii-bl +ws-cb +sv-pk +qh-zn +se-bt +ac-lp +ek-ty +me-qa +kq-sm +gx-eq +tw-cw +qh-tf +cw-wa +tf-ap +xe-mt +ap-pz +gj-et +zr-pg +wu-yi +qy-fx +he-ge +yd-nx +ln-wq +bl-io +sl-rb +vn-zn +pl-rj +nt-mh +ru-jd +nd-gn +vl-ka +yw-za +lk-hn +xe-mz +xk-lq +ou-xo +vb-vg +qb-ip +tt-if +oh-iz +yd-xe +ke-em +ry-gz +qj-tc +he-mt +lm-vd +yq-of +bs-pz +mh-ln +ne-fb +xe-ge +vy-pm +nk-th +zi-vg +kr-tj +nl-si +mp-vp +cx-hr +ym-hb +id-un +jr-zh +so-zz +it-mm +yg-am +xk-mn +dw-dv +rh-vq +mt-mz +fl-kv +vl-vt +lc-je +aw-jg +fg-qq +so-qe +mj-dw +mv-zo +la-wx +sb-la +es-su +bg-ua +ew-ig +qm-ap +qs-pp +yw-eq +cv-yy +lw-jy +mh-wb +ba-fw +nj-qk +rt-mu +au-bo +rj-hf +hl-wx +mi-xp +te-ra +mv-xl +co-qw +jz-ps +ba-nj +re-tc +xe-nl +jg-nt +zf-gj +mf-xi +qk-li +ex-vj +fp-gd +vd-hs +uy-ua +gu-cj +xf-ur +bp-am +yy-hb +lx-wz +dq-ve +vm-lj +iv-oo +re-jw +mp-gl +hy-lr +yk-xx +zm-kc +pb-cw +ef-uy +mp-ei +ap-ku +bk-en +cn-km +fh-lu +in-mw +cv-vt +pm-tp +hf-ws +te-kd +gl-kw +lb-dr +fh-vt +ub-tr +xp-wt +cn-yq +vx-aj +fe-yh +my-gt +yu-gs +wh-mx +mc-ci +nf-oa +ni-zj +yh-ea +ap-dn +jb-li +zd-es +tt-ib +hm-wt +aw-ou +nd-kj +ei-mo +dz-if +ll-yf +xv-is +ee-mi +nn-ab +nj-kq +wb-jg +oo-sb +qk-kq +fm-oy +nn-wk +og-en +bt-be +df-sl +eu-io +bg-oa +lv-up +ai-el +bj-io +vw-ee +lb-hb +oo-px +go-nv +cm-wv +fv-lu +gs-sa +tj-ip diff --git a/solutions/solutions.cabal b/solutions/solutions.cabal index 28232ba..f1adf7b 100644 --- a/solutions/solutions.cabal +++ b/solutions/solutions.cabal @@ -1218,3 +1218,8 @@ executable sln_2024_22 import: day main-is: 2024/22.hs build-depends: array + +executable sln_2024_23 + import: day + main-is: 2024/23.hs + build-depends: containers diff --git a/solutions/src/2024/23.hs b/solutions/src/2024/23.hs new file mode 100644 index 0000000..e4f4c2b --- /dev/null +++ b/solutions/src/2024/23.hs @@ -0,0 +1,43 @@ +{-# Language QuasiQuotes, ImportQualifiedPost, BangPatterns #-} +{-| +Module : Main +Description : Day 23 solution +Copyright : (c) Eric Mertens, 2024 +License : ISC +Maintainer : emertens@gmail.com + + + +-} +module Main (main) where + +import Advent (format, ordNub) +import Advent.MaxClique (maxCliques) +import Data.Foldable (maximumBy) +import Data.List (intercalate, sort, tails) +import Data.Map (Map) +import Data.Map qualified as Map +import Data.Ord (comparing) +import Data.Set (Set) +import Data.Set qualified as Set + +-- | >>> :main +-- 1227 +-- cl,df,ft,ir,iy,ny,qp,rb,sh,sl,sw,wm,wy +main :: IO () +main = + do input <- [format|2024 23 (%s-%s%n)*|] + let nodes = ordNub [n | (a,b) <- input, n <- [a,b]] + let edges = Map.fromListWith Set.union [(min a b, Set.singleton (max a b)) | (a,b) <- input] + let hasEdge a b = Set.member (max a b) (Map.findWithDefault Set.empty (min a b) edges) + print $ length + [ () + | (a, bs) <- Map.assocs edges + , b:cs <- tails (Set.elems bs) + , c <- cs + , hasEdge b c + , any (\n -> head n == 't') [a,b,c] + ] + putStrLn $ intercalate "," $ sort + $ maximumBy (comparing length) + $ maxCliques hasEdge nodes