af91bed748cd
2016/06
author | Steve Losh <steve@stevelosh.com> |
---|---|
date | Wed, 11 Dec 2019 19:08:00 -0500 |
parents | ebd2a1bb4889 |
children | aff841dca184 |
branches/tags | (none) |
files | data/2016/06.txt src/2016/days/day-06.lisp |
Changes
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/2016/06.txt Wed Dec 11 19:08:00 2019 -0500 @@ -0,0 +1,650 @@ +xgadmpyq +kzgagqyc +otfatqvh +kekjvmlr +qxxvcuoh +bifbhgtb +uxpfnggn +qnakexes +byccuuwj +rvkwuxlf +epqyjyiq +posoinqg +hvunvxwg +frgcfzji +rkwukgyj +cpgrpgfm +xkjnjatw +swridxtz +jiiiazrf +dijnntzu +jmkyrodm +kuezboov +tgoaibdv +bpzkzgxi +eanilzds +gkgsjyrm +cqrevmee +ewsmlhmv +xdlqofvh +ywbqvrdt +ypkhibfp +wtxkstoq +dqfwcdyf +cjifwqzo +ttexnmrk +meytfnvv +xqceryna +kswooshb +hpyconub +kmfkvuri +qstxefrp +mpdpvgsf +vvhbzmah +ahviisrm +bmgnbbil +mfmazhvw +jbijywws +ftegpitc +gkypspqm +nalihksk +yvsloxhn +xhtkaygb +skefhfxl +kdcgbajy +nlunchnj +vnerqzru +aymsrmny +bhnomjil +uxezpkzd +mvrxbpzu +zobwxuxn +ocvalnph +akcgftxz +wgwdhwsb +rercbvyn +vnefwyex +uproahgr +gjgblwit +nqbwqbwl +obdbnmtq +emddyrct +djtlaszk +uljpvetj +slusptbd +hvqehwpf +rwnpldbi +bldwnwlb +hkchdjnd +eciccupf +rbvulilb +qxroiexb +ydmjbyvf +mnxcxawa +qcvossqu +hxpdpysw +pxsnbtun +whnqgttg +xjrwouxr +qhqcfffz +pjjphsns +mqbiptgh +mnhqyjwi +qonbkpyt +gmsheklm +efdvdlzo +cinqlnzd +bpzagbdn +vhxprhjk +dejmtaas +nwgrajri +bdpprghq +uztezext +aqrpgxbt +vyozivkl +bjsezpou +degbadvh +lwtayyyq +hiykerlh +dvuddydy +jkzxwcht +zkczbjtd +rhwxaikb +nnamyrqo +bqhfaspm +fymlazrv +lzaxyeou +tazxovad +xkkvlzqi +hnpafvwx +pichfzxd +prnrkgkz +qvcfsjmy +ladckjva +khuqzlwe +lcibbgpt +gxvkvcvu +gkpidpdd +bjyvxkse +rijmbclx +foymqppm +lakumtch +avuckrtf +zqwonavc +mrrptfqv +wobozvjf +xnfswxoi +gcydjmel +aomeibcy +ipzzfvsu +vyaymlys +fcijbflt +vypinowa +nudzxilj +xhuuteve +juehbebw +limdcogt +hcbmaazi +kapjfkyh +pkrgxtma +uqxwmkgd +cxophxvc +tjflydes +cmclhlqz +gqpeoocj +siqvhikz +dzaqzemn +vvghkuno +sxwedmqh +xaxrzoqm +xrlgwbhx +mcxgtmsp +swnugfqp +hflyfbjs +jyrluszh +motfgcri +irxilajp +axnmifbt +rwjzveit +crnyvjdy +zsdzhbfw +nconskto +ihmtqkvv +fszrpodn +ksskjmbn +hosdovpq +tdvjgzyz +mawhctyp +sxfhdmnw +gwtgggdq +kyyknchs +oeesyjil +ozwboezd +ebvfbjlo +disynwdr +ydrlwcgp +rgdbqecz +ydxdecgr +zvffoney +eooumanw +kauxxbmx +twlginux +eoeqqpdj +xdkguahi +brudoqak +mmiipppm +bjvkmhhe +yyydmxrv +puptgubn +zajsejzp +ncrlwhuw +dzlvdqwb +krlawmml +fvmftwxr +ibexxmjf +woswbfrx +rplxvrxi +phcxhtla +qvlcaofy +qfzqauir +ihigcfsb +ygymvszg +ohhvsvzb +ijotjlfk +lfbgpowb +tzqgucgs +yggrlixh +psmhqyhw +oqnksfgo +yyqucpip +orhctkuc +qerkbwba +uxtwsybd +trkthahj +ulvpezvb +rivecoma +xtusbhqq +phutsoym +jfmeujty +hnoszupk +dbxsxkrt +irhredlt +unkpvpwy +obkfkhqy +aljgsgcp +pzavjlap +kqxmjxno +qzxyhtwv +scmvwnjo +sukisgrs +ziyaaydv +uwipsdhp +wqkbpoog +zvwsclpk +fcmnqjzz +ppdeziad +hahbxcty +yaptaqov +skbhtsgf +ugazdacf +oaisqifm +sbeulkel +dfxalhfb +iynthmbf +xyjaqkcp +wdgjtyea +mkzsirav +anctwwmv +pthgdxpz +umgantku +lfppyniv +cetxtlby +qtdvnuau +wnblzhun +wrbigukd +isnzfdcx +athilhwu +ynrkezlp +mzfifcfu +yrlwgkej +meniblei +alpwmbhu +eobgbbrg +ftoxsxgb +jjdljknr +thqdbqnz +gujotiye +nevxtunx +ldrcngok +nluhauvw +aixvkasz +qngaqwuj +jzdhdiwx +famjkjiz +jdunpuqw +eehhjqzb +grjakxbk +rgsxwsvn +afbtyqbw +wluohbkv +uucusxwg +qgjbozaf +znlqkqpp +wxkhynpc +ddpegdwd +ngccckfh +yeitinog +jvpnncdy +vwyjrpsw +lvtkadjc +glzughoz +gmtbybao +cvuqoqap +wbyxilvx +ytropedk +zsscudzt +fvayrjap +uztaclaq +nypzevjv +huywvvzu +dfznjnos +fcfsxkco +zlzbptzb +idhrigkx +pvyzmjxh +mfwjyfcc +bmlxsdqr +upxbxbdu +zwfgtnkq +okdjeeew +azogdfhi +fmdqovur +vubejany +aiunuuho +ypvvqaah +qkurlgbz +wcbaxexb +cqvdhjlf +pofuszzv +tavjnzwd +cymnymlw +bwxpvefw +kbitgyjk +iludwwmi +hgjtulco +eabboulu +fzbzasto +lortupmy +engnogsb +hnjmphyd +ixcbzvex +lzazteko +yvzekhuy +sawxeaoa +ssgvlskf +gjiltkxg +hiewcigz +fxskhmih +vjqqsdem +ekbebvar +xtlrpinp +sqsdnuuc +hpvdcxke +mztppmyk +iiinlgug +sgngwsag +ndhofrms +vpbulfkf +dkffehqz +thnadkiq +pmdvifre +gqnqrknx +uevytuir +ljqrzvtk +lyxxirrm +wwdxbtgc +cidcsmko +pdktxdqn +nkpgzbik +twxamhnh +cgwjldqu +gyqewojz +xfhvbqgy +uijffkse +qjboqxip +btybxwol +aarovdnb +jmzkmlyj +hxwircty +jnbtromt +zwvhcyjg +vfjhqwxh +ehalxwxg +gkwyeuph +zzzifrmq +kjbsfntw +lhrsgukn +hmozyfbq +wrydtrkr +cvqnwogv +smzhqsru +hhuorcbq +wggaglua +xpyqnyms +dxwrvwio +tgiilznx +gccfrooa +oeqmgahg +uclycrlr +wommohqj +ousymqbt +yxyivgsw +tkasmozv +zdgolnmu +atdjmflc +vbiygfdf +xznlwxca +nokqqqnt +igdazsik +hlglxbhw +caoqxzwh +cbiqxjoj +jaabadyv +dfqdkhpo +cwokcgfc +cjkcrikw +umfnzlxa +ftvxqkvl +sgzwgckq +npquqlcw +vogkkiox +jzmfmgmi +rfzzqfam +sgifdwdy +gpenxvnn +ngtbmamn +klvjixbo +nufsxpzo +cnsoosol +itxrflcg +saqnjjpr +bhbmftml +oyhherjs +jjsiprhr +igwlnrct +kvosjzuc +symsvnab +wfsyyeck +rtsgywne +tdigfspz +gfaogiwg +lhvedecl +zrskzmje +uklzldrw +juarmjnr +yenenbmw +esgtggid +rtttzxpe +qmknqcde +eoapiijl +dbfkuzhq +tlndotty +lfqrmauf +tbacrjgo +bljhlcot +qxondxnq +dpchurpu +wwarvepg +rbjakxbi +bpgdhffd +onmomxks +gdzpqsyp +xubpfneg +tmtldpxi +eijywlgr +mqxlubiq +vynpdiys +siexhnsv +eyyeobon +jfkddtur +mmxyudcw +cctfygsi +optwfvup +hoespdwt +adcehlbc +fskrkcsd +ipipyiae +qlzqwzmi +ecovvqgl +yjilfveb +eamwrpqr +gvusifhg +lkasapuy +eiflbbue +iifreoor +cncpnzse +vlitmdfu +oytvyrfu +plqqsuhc +clbniohs +dmetamfx +cbrqznfi +brherevu +dxlungfu +wxoawzwa +fezmkvkj +dswnzrkp +qcqfilra +tzabtwyk +vqyfbbiq +mekujnbs +iwfqgptl +dongfavd +wnkfjjsv +yelyvfvl +qevowinz +tmvuihpb +zaspgauj +lehjrkhq +zsvxrkrq +vmpyusal +qioofusv +ldqgxmrj +mdeupniy +zhxhdjmk +jnhvkhgg +ftymssbm +jbdbfwlx +xkwjvylm +rrkuwmzh +zdyduiee +fcyqxyvq +ggernyeo +ylejhgbr +itwvabcj +bhuvewlg +vphsdpxd +dswupfxd +yzsyynja +yeawvyic +empmastj +llrirhuj +xudlcepn +ozbmzqrn +kuplucrx +wbeewdwg +ydlrntql +xuqjnyei +qqgueile +pyobjxjc +vwfzjeje +leurpqtu +rcbnpppk +ufhwdqcj +nbkluaoj +eezhsvkj +rqmjqlyo +pwghmwht +jullvlxt +nctvmwca +iozeddaa +cucmkcys +sbgyplyk +zsgocegq +jccuylup +gacygofc +puhoefms +hrnkjffe +ofleyysf +aumluajy +arkizzad +jzpwjclk +ftttwxij +sthaczsn +sxwmhjsi +fscspufp +muqhetjj +weqrjdve +iwsvshjn +oprfabdx +uaegzhtq +tjiouvut +dmfktocl +nujncwma +sududcia +fsjchtnx +nwikgirm +abfiktxc +vbweqlqn +otlmyrfc +rdqkrzea +tbqmukvf +lgwyozox +qduuwdsm +tsaamdhe +cncprqkd +fbtqjadk +rljhtoks +beawuwgi +zrotuqdt +kbacsqvl +rrowqeos +usofenqf +pcnqsnde +bjpmhvxc +vjjvlezf +dzmvmoev +zqytloxz +lstfhstm +juozoiso +nwliylwc +ptscqmbi +kxcwfvum +kjwvnszy +xozgtpor +gpfcdzcl +mshmiwgd +ilqmcoys +baodbyuc +nfdkjslw +ayetumur +zrzjpxtx +xlnuiikr +ikuzxqea +phlwwptm +rutotajz +uscueqih +kjxcjpzn +vtxzkrfx +offfrqsf +rsojcrpz +mgwiarem +vgmtlsdk +krrcoqtz +ovmjajhm +wxdzupgg +aqffckpg +xozxtael +tsvjoyba +mgkxevxc +bnulkbdf +aoacrrvz +rqrdevma +nrhbxhjh +hfljxnag +zipwkvce +aqsdntes +ucpwocqc +komyctak +wsvpqryl +ezeykefm +ltiyergn +hxxzzifj +jfeziulo +iyhzsymn +kqjsttqv +nmobrgqb +fjhckmee +pipmrccp +ohpricwx +tylgtpaw
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/2016/days/day-06.lisp Wed Dec 11 19:08:00 2019 -0500 @@ -0,0 +1,22 @@ +(defpackage :advent/2016/06 #.cl-user::*advent-use*) +(in-package :advent/2016/06) + +(defun freqs (lines) + (iterate + (for i :from 0 :below (length (first lines))) + (collect (frequencies lines :key (rcurry #'elt i))))) + +(defun freq-extrema (predicate freqs) + (_ freqs + alexandria:hash-table-alist + (extrema predicate _ :key #'cdr) + car)) + +(define-problem (2016 6) (data read-lines) ("nabgqlcw" "ovtrjcjh") + (values + (map 'string (curry #'freq-extrema #'>) (freqs data)) + (map 'string (curry #'freq-extrema #'<) (freqs data)))) + + + +#; Scratch --------------------------------------------------------------------