Day 3 part 2 & Day 4

This commit is contained in:
2025-12-04 13:46:32 +00:00
parent 791e374f33
commit 9ac4656d4d
7 changed files with 682 additions and 127 deletions

View File

@@ -1,4 +1,200 @@
987654321111111 2232133233333122223222321121432322323324333234233221423334362333113343833132233313523312322224432234
811111111111119 9544718948279477416294977734546287758964484675984344448638555429875995525496945633428322464129775449
234234234234278 2342431222323242222322132121222212212132223222221322252221222222422212122222231227223222421241422222
818181911112111 6244953925232293122334482643333513353336433435373235433333433333344373324258246634153623454355543453
7736344447654414443368344654254336514625323365763557557347345633456536654753356543554224337423655645
7678256455884537672778638766849667285882535872669457673757574863687675953957763739884526852357676358
6418138815172751627482363178142568277778573255724443532712835875457855664165654688176581654473178739
6854446345485434355456557454552353525455763235344855551758634555554555645555644535645534531743242554
2222222322322223322332612212222225222322331322242221255172251455232132122221223222221221222241222221
3522465222652563115529464642233332216344152233612263521373322232245234334452353472671944353144627333
5545321222222522222344243223154223534233224542342331245267254214331654424232831423343325435272544421
3542524122211624341522322226153222251432222222223323326252321225121362141322235161225221111222227241
2455322717243462411254243226323523121523342233134641142441394244224254232641451244318434422422224383
4553343324447136364342223433344524634414373234332183266461265223446463254334435343223462442245322567
6563436486136355463655575366345554384456562545629262586425424652243626548657625466455656653543945665
7535454577563343346435454343443457475576543343854334614444838455344744678754354444737744257755677424
5564445435564444634466844337565445844465549459245334613233554632368925514334436545333343645355776454
8687888777879988878786888689883788878676787767787678887576788777889856868587889748756884386837718787
2232412541224222322223222276932221124212222125272222222211222152123223225321262122552222226222425222
4367133344544422433442443532453333443413434346523142232414343334324332325334334344244542343334544237
3333352232143322323333322333313212323124323333333344323233231333234333263223423333332233323324333333
3413221222121422224313122242223232422123223114221342223232222113722222222422342323332232242313233343
2333245223264434343533344443342324333344512585354324463634444223333444444444314323334344443944441334
1321263414534312232212221232224263311122443321313323123542213232222213122211333322133342142442322512
5234832322232222341332323232223423322353544163291633234233432333233323421323132323426422212322312243
2222272225322222521313431322212652311262252232321522122312222123132225324154112232242423632352323232
1233322333332233324333323222323234333332242125322233332233135232333343331233133333333332323223413332
1312424453343532223551344364432434354347433354424723733371315333224226424334434614235534445274332431
3333222231433223233328333143332343233323313231223323333413325234311233222233254111233223342433224413
3333222655333336333322323255253323533335253333652336321225333233224452233423332325333333253323223333
5442432232322344133222221323243283242223312342542332152332352351236334222332422231332432235543252524
3533343334332332529234332635513353343333312739332332563333213353323121263322322323325226163333269332
2122222244442433423244142412444333335443132364364534743313414423244243245343424211134123233441243732
4633963376156266384333658525662638893353359263721347373868352835376452436935238733834236233534373967
2868546568874346646545656477657574895553666666558685549546665585686962555965744696697655946493595695
2424225323222312222223222152333122224122412215154212252311412222247265222212525114212422232122122412
4122125146221433231332322546242212133253432131543424113132355232443113244544336232221214432244331542
4316244124525612322532522225222222523221664223522294732225222321222441382426222447462326223431346222
5464524566374845443775253524262353365414473446366263943245443654534643234274644327649441535672314333
2222226211121221331222221522224252212122322222122212222243222221643222132222322222221326263232142232
3333252553243533452223224422312333322233213232324543232252125425312234413225543223321933125342423142
3332223222222433147322232631122323433333223331233133332232133231313331312234134243113322422313332323
3352113432568212214452342423233422512652142236263412243242444223222554315232212432252432223462242221
7333543341233454333343233343333364334313464323334291434332344333638433574433417333432823333334433833
3264323365333111323333343336334333333224343233252323333333322231145335333333123233233335232334333533
2432322325121422112312235223112123222222522232222733313233433224212232223232131221423123342235222122
4322122333221422312325222324131434225242432232913422253233241331422332232314322353311222232125223432
2724243234112245242225422434212431122341124421154322328252112244221525272534232222234424223252272222
6263444344135654233444434353424513343334244643543244344552442244473444344534444335444243223333444344
5652456451676873241633354363633342254384434464235654741335434444443364444349248666733344414676344424
3332234444433333132133232334413433434342544333333333332133433324334351233235333213234412432355333433
5253244864383445455545484741654848745663334656346555654783452554459476247734877397397479436544545535
8847848634467769875277674783864637763348776585487564877575446789458658887576743878774573537768857846
3465232634212442535222152333343332414424443235324424245225244656253234443454326334233233343712233242
2526424327586513436454654476775737662269387645787541237764227642652736745535462656515468637462462272
2435133332535344754333243263585245556234826664432357313443546253542483751473335539432333256263939333
8382382578536859647359748967547585734844587735757947889135698988238798976595788728827485377567664443
2323333232332224332333333132132223332332233334333134322223332322322331323223342212211342323423133112
2222223231325222321233222222232235322222131322134223434372222513322651221231121523323221222433421122
4343333333353433133333432533433534423434442333344142233435324333432233343333413433234343443332444133
3435843213132344233334752343345344336253342532313323325472445232541333328233323334423541324432222453
5344384444237343444782523452775445754348886564424435585784776766424342433744438325484356577344888333
1224244324222262324522232424222642321661225332423222223231222122222223122223251414233371222214244224
3543443335325823355433332433232363341313324563431344435344334634224312333333143434333333343693437623
3222444622443242233334533343431223432343263144442444242344413342243411444323111333422334172843235313
3233243443233433233232333344313433332321342333333334333332322334333324324224233333335134433232343313
2322382122121323222232222224422355232222223232212122222223222322322212222212322232222222222222222211
4438874627283769846545858477542757538887557577785678557696594525464885577588345473865884555825561648
7324232222222223222327122222222333124142233231222221222213623122235281121154322132231522522312221232
2333433334433422333333433433412334433334523334443333442543323423432335444141133424433334329334222422
3134463377323343243327234347364223313333433142833225473216361353553398231433232233134221371355315334
2286532255124664377635386342833365262327225754851573844435254235445111322654684446255426313359435562
2332221234222223233225242232333231341432233433313215322243233232332331433823432243433223332282413422
4452645222243142511223334433245244322342425224221373244442233412443521333664343443244123333552252344
6342492286728826426533414885485313383365538228643655268866833443862544644641653154644262754544665538
4348222441234532331362213144243172444641324435312344445342524624344244334537324313348132332536622632
1312343222332333342331132332222313523432333323322613133333224212322342151431233322333243233323342221
2432343233323222322412213232342333224322223143332232332324232323232332223322332222542332412225243222
2452344334433343323244445245322257264463432342324322134422221321224314133334353354524452342424143224
4442333443444454443442443444443434533244354446444443443344445322433454242343332344344424333434644424
8634324339339317534223333323739328623427333734521177196243735432834223827834436832731312246232273785
6485236322212732224522124122122252242252126221211282288242279272225242442642278527645921222194723223
3615215333285423223433333532642133413313532352344233263453434225344523343343452434433224335235441422
2422544126132223324321252211123142222233213322231312222322112122232433423283224233222121323124242261
2344463434152382333281434454344553345433362453133442343344445443543324392453343439443324324763633442
3437353315538337595346532555635436876443356345954234333432342327246437754343343335325354283333534437
2452212263422223574224222423225223423433651242252355232223626336323325426253433434623433274324474216
5765276675264696695461433224346233783941273322233552212723372159556463264643637125566446246446333751
3732223222221552433423122222122443232222243442122452922332422212133222247236721143422123632722356222
2363434624333134423342523424343332246312346134473384231393741244763633254642436332242324232232237352
6647421644234223129224541461443174244433333345533642413652347443544544333735247415613455436354433343
4425834244465436335445345632343233424345425444442346382432242336236441342233344461354245646534344742
5743433673433313638653536582345321453457651837423642123458226734277346423997436443274433233333666648
2322465252234422122212243222232312124251421223122231432222132319527222264211322226221245522911222111
4132544322238334333235333252282333243543433333423435144535222226223364345423181323324531343342362332
6395732553634323536534635664454563666335534687635322745452356365676654356865366655543558761452346463
8525333555554553354625353535661444334216356565765655347495733536664755363546554556655675334665345632
2224222223412322662244223232425261752321222222226595213212115242532344225522486216122231222742326333
4344445434433371234434444237244241324422432333382443122234325144245365444452241273223442333442464534
3225334632332322633326544153233322232363522334723123331243322134221335232423333533223251127322333236
6286125832212222224332231722212222722222122312222152228113212222311223632422225222512242221222212222
2622233222222442111322422244125322211322122122221423461222222132212442943623136145262312122322262222
2422272424326821663242123334232322242561943233452352322263216846337363646625544232212142221223692322
2222323332324212311332331122122333222223233211223312322231133124322323322334322322233823242322232233
3371333745646334334582444935636634348123863349243334762443545833343369542293533743454247388843454335
6537724565567775777467774785767414549447727266273565567747667766444476766567878157655753673663544567
4232456132623232124482415652321558451214723562396612244136524425122125765455552424223244422146222532
2212323232122322222322113332433323522472132233232332343233336133211312212231232333521114232222232122
5155553546841455454558325264555553434375556552555257235515455534455515535535525544612654551556453524
9722515125324323362444125472327421252358654235635924222635231244315621287234335525325576533463224849
1668336355465725434223666523665616453433664366665644647241246212551332582536336235544653338583343525
2342313322332521582422234378343223122233333212153252233326562322353443222534132143235631222243225231
3512333132246411343713435343335333335134243322323234423253343242463434234133342434353423243323541236
2455375222533521242123424433216423384424242442312521232359426424132423124225424483242432223241412437
3233218222223222112222312222232212222212122222123222212222132321222322222223221312212253122211223222
3234532211453232241212332322222243442412123922323322223141422421223423322324442222342355445523212331
3429536326344342532553888333258463373336453332333234433333335537325237137423534323744133635593353433
1434363334311314233411433264324535442213456833323132422333223343323434414343231414426223345135344335
3222322222222222122232212232232242122233213222322411222243222421222232233233232422222211222212222514
6245324443534665534554336746249753563335341556444551723734362444643464344474745553444253347339624453
5334426434433344534332343143438432432335433324463233234221334323468433944352243324231363434332625232
8835353872326366238572332425353324479424422434333346836423292341543941333134553678322426837372329372
3353353533434332533732453332323332653233444333665433535362635253376331553353453332533343753423532332
3343243356114224312352353422632522434115634344445422323511425423314221221433522323356223423225255632
2131222191232122222212222132222242322422222222222122222622222121311323322232531223112212232316222312
2611324436312524222533222646396144443463214214855314424162675322243512222352222445432472255223323232
3321544624337424523342534434446442223443444852334474733733453347434543434247424241449444324392444414
3232232122231222412322554334342222225242243221431313242333235232421342242444532333422232232212223143
2235543354323222423532241735522524422433353321334432454254235522425133355446542154332373422331222322
6656555559464658486564666446555555958585543486575355545856447758556755747565596255555657556545666643
3427121822212112122524323222422442222736172215222531143142252533823222221215614162522316266442225222
2118213211352282332213226223228122142262542422222222221522227223334212554222247222352222322213224222
3144232433314411535242444333342145242444623322445244434143422434423543324232351334133423424211334444
3216432126534223385221653121423325142416433252224592351254332242343442122112124243172322248634423422
8232224118222323245252122234212612222232232222243334227235223222322623333122822231222442722214641521
5225453455364344623154425264523386354642337433564515232333324534423324233424444233445243425411233426
2129343373333483292343353333723633533722324323233576454932343124233235332494433273254332333363323223
3132237211131224222323222232233112513122242322323331222321222322362323314212323251122122142321314332
4754225344465673553443332554442234332368453223434322243554338472333376322322323373264335834444444454
1136836833853233743825433251843363363773263235234234436336233123333822323634323732233628834362573344
4844243444444551634446643424544135465684324528815345344224634234224549498346492425564256444423334644
3422823122474323322211211254233232242225113311222244651822522625442272221125622442222422332281437221
6623252422332233132333335332333332244232349323342345464333133432235323413344143243122423326233443233
2242262441326222126522262538422244221311432233276326222662122251577211323433432322272254237218227255
1522262322523152212423563322522212212254632142224423643515523222221221124424533333236365124123422163
4242444771425444442434324143363324444462243374423432343434743443433325334244444242663444542333332364
4467443545345563442425445446144526644534454645534344422432453362525386241432143354236394394455643442
6343374593516625614864577324773453644234545343335665954344436954943544863347328561423354849629433463
6454554753858656445365796554643561451495685364644648447664466634661655686334288549414845625665536336
4232223224223322422223222242225232232192241422224242342225222242424232212342134212122432222125232222
4334423968793346242226322514232422321226553255315372343155358422135233422454522342335118123474233432
3472434344433651194343225239333452324232557832655444224444434422433262332942445234324383555182422444
4424351655527244337373445455333533736563356654243556467635353733355335333646623435448534356333545735
3232222225222424231212121223122225224224225422122252523121122251222222321221452622226222222522122224
2122212232422222231322222222212221121222222222232321232211222622222235722272211335212221222212232315
6454725483654746576544566678744754568736666737374787768825686646756657486465676458756567577645549754
6543332464452892654265421473452246152323334243132461133232268432326464344224434241334347224223637423
2625625445315322983553485264538578269825762565283434262436532372363665472636353672583331262724383282
3232873321113226222144282428233322212428413493131222282337243214426225432312212464183227223215322622
5533353553464424514343342332242153433523454444333321443556343543325535242335142343654353353454554552
2232234232322134112222233232222131322421223112222322222322312222122322121422221222223132223222421221
2542714544725485233345575425263952272367274717554242355655462443557222473293232951342343442452324423
1522272222252132246221322112223226252743225122222221245222123121226621223522223223222222252252222112
2222325482123525443465251443231132323225535255131422551222625533222225254232153225134255222122243222
6656454363343651412324333545111113136525316222354554652432154354434131665442413114245242521545146789
4442322122221211111142431111423134131114232312212433444323424121424432331422121141332422343232356789
3212335244334332433262134213122321124252125232331433231143313223122235224431221423232261233323231242
4735243252264454742487242145543733424454475231547442975364451544354542541564536434255546274455744268
2231333322232223222332242321222223213222223212355253221312232111223222343232333221422222222522332233
1211433622312212212252257222812222298229429222234222222272222222232227219221222121422422123212322722
4232445421241534473275551254233253262432233593325542424423222323312234235422461255251554212224221394
2332221333232122335822323313352132222332523221332337122231331282323412322322232344233222223343434232
2725485313222257742465511364531545622523277422426227222232736162236656569732283124765582223755732564
2422422232232222231293223211214131221333322214223422221241221232223223222422133221343123232222211212
4423356255222445231344243352545445254524241242223343454331311552242422314224432453144352242224445432
2423222112524244313125332315155211253125555344355233321155112141531113141441113132323412443334156789
2132222232222222322323425223212233214222323222221212431223222243222212322222241223222232311222233212
3233323244222222223133244314225325253125542422222225433336144222413422222435123533244422532542733532
3179924698386238367236593939527652322332466621532864535417839339549568538333386378572432732335294933
4556625964624535444457459976684768643867379699957697477636867849789767443477999249975628749748535594
4629452241643442562722514324244522252334424122221442154624212436246324434432222446882442858183638814
2762633653564553234324556522227332322287612643631342575896463774526327166372715867363623524434541342
6354275125434124325317724755566423441362644754622366364521264253744362443226444235265644424464421425
5685441376483994474989626583976445565259674397656552955383597645927397356293554543768262246758236737
3355743464265538557364156954953826744564335659344225554364562673453556857364557845562528462524532648
2362233223421632223453484622242433341232273332325542322263251323724722123733237174753332323244476511
2223212212222222222322222211223223122232121452523223223221222423225232122221122222622321325322221225
2232722133422322222122222221232225311222212222333312222331212321136222233241321352225623324234222122
2122122222221223212221222222322221522222122325212252222211222222112252222312242121231224233324522212
2223132337112363331242233333233452222523212322133631228262514223262121583222722631526321222222163139
4263448542324314343424413363325543434433334323134243243423633624444423334244343343421363444344453444
2333245422112423332222554513223345313442243431132323334323233222241233235321254565235234453221354432
7122232324231443228212622222222811323422231442226922122722222193132286284324226229232424221722326323
2332333635333393223294339443286233343344333354433323346333333343435484332344635232331535134363334334
4342233233223235333442222354362232461233325223213133322335223322232162123352235334432323835145224146
5325724624322453232513342246246424252324311563425123725212653322744243224221343256233543532546328374
5167221272721721513145417116271723735472261435635543175711143567436751671556535526773233635213713589
4222217222352426574636595434452626345767335635745413424952434246665862444324244533526544264882645424
3363134416249632478713332445322358253276633544356437455435523166425363424223275532472253554853752493
8433153548467574565345443536354435745576547444746273754765547465643444685959385677525454323444357566

139
2025/4.txt Normal file
View File

@@ -0,0 +1,139 @@
...@@@@@..@@@@@@@@@..@@@@.@@@@..@@.@@@@@.@.@@@@.@@@@@@@.@@@@@@@...@@.@@@.@.@@..@.@@@@..@.@@@@@@@..@@@@@@@@@@@.@@.@@@@.@@@.@.@@@.@@@@.@..@@.
@@.@@@@@.@@@..@.@@@@@@.@@@@.@.@.@@..@.@.@..@.@@@@@@.@@.@@@@..@.@@@@@@.@.@@.@.@@@..@.@@.@.@@@.@@.@@...@@..@@.@.@@@@..@..@@@@..@.@.@...@@@@@.
..@.@.@@@.@@@@@@...@@@.@.@@.@@@.@.@@@@@.@...@.@.@@@..@.@@@@@.@..@@.....@@@@@@@@@.@@.@..@@@@@...@@@@..@.@@@@@.@@@@@.@@.@@@@@@.@@@...@.@@@@@@
.@@.@.@@@.@.@@@@@.@@..@@@@@@@@.@@...@.@..@.@.@@.@@@.@@@@.@..@.@@..@.@@.@@@@..@@@@@@@@@.@@@@@@@@@..@@@@....@..@@@.@.@@@@@@@@.@.@@.@@...@.@@.
@..@@@@.@@...@@@@@@@@@@...@@@@@@@@.@.@@@@.@@@@.@@.@@..@@@@@@.@@@@@.@@@@@@@@..@.@.@@.@@@@.@@@@@...@@@@@.@@.@..@@@..@@@@..@@..@.@@@@.@@.@...@
@@@..@@..@.@@.@.@@@.@@.@...@@@@@.@@@@@...@@..@@.@@@@@@@@@.@.@@..@@@@.@@@@@..@@..@@@@@@@@@@@...@@.@@.@@@.@..@....@.@@@@@@@.@..@....@@@@@.@..
@@@@.@@@@.@@@@@..@@@.@.@@@@@@@@.@...@@.@@..@@@..@@.@@@@@.@....@@.@@.@@.@.@.@@@@..@.@....@@@.@.@...@@.@.@@@@@@..@@@..@.@@@.@...@.@@@.@.@@@@@
@@@@@@..@@@@@@.@@@@@@@@@@..@@@@.@.@@@.@@@..@@@@@@@....@@..@@.@@@@..@.@@.@.@@.@@@@.@@@@@..@...@@@@@@@@@@@.@@@.@@.@.@..@@@.@@..@@.@@@@@@@..@.
@@.@@@..@.@@@@.@@@@@@@@@@@@.@@@@@@.@@.@..@@@@..@@@@@@@@....@.@@@.@@.@@@.@@.@.@@@@@@@..@@...@@@@.@@@@..@@@@.@@.@...@....@.@...@@@.@@..@@...@
@.@@.@@@@@@@@@@.@@@.@@@@.@@@@@@.@..@..@@@@@..@@.@@..@@.@@@.@@.@@..@@@.@@@@@@.....@@@@.@..@@@@.@@..@...@.@@@@..@.@@@.@@@..@@@@..@@@@@@@@@.@@
...@@@@@.@@.@@@.@...@.@..@@.@@..@@@@@@@@@.@@@@@@@@..@@.@@@...@@...@@@@@@@@@@...@.@@.@.@@.@@@@@@.@@@@...@@@@@@@@@@@@.@..@@@@@.....@@@@@..@@@
@...@@.@@@@.@@@@@....@@@@.@@..@@@..@.@@..@.@.@@...@.@...@@......@.@@@@..@@@@@@.@@@@.@@@@@@@@@@@..@@@@@@.@@.@@@@..@@@@.@.@@@.@@.@@.@..@...@@
@@@@.@.@@.@.@.@@.@@..@@@@.@.@.@..@@@@..@@...@@@@.@@@@@.@.@@.@@@@@.@@@@@@@@...@.@@..@@@..@@@.@@@@.@@.@@.@@.@.@@..@@.@.@.@@@@@@.@@...@@@..@..
@.@....@@@@@...@@@@@.@@@.@.@@@.@@.@.@@@@@@@@.@@.@@.@@@@.@.@@@...@@@@@@.@..@@@.@.@.@@@.@@@@.@@@..@@@@..@.@@@@.@@@@@@.@.@@@@.@.@.@@@..@@..@@@
@@@@@.@.@.@@@@....@@.@.@.@@@@.@@..@@.@..@@@@.....@@@.@@.@.@@.@@@@@@@@.@...@@@@@...@@.@@@@@@@@.@@@@@@@.@@...@@@@.@.@@@.@....@@@@....@@@...@@
@@@@@@@@.@@.@@@@..@.@.@..@@.@.@..@@@@@@@.@..@@@@@.....@....@@@.@@.@@.@.@@.@@.@@@@.@.@@.@..@@.@@..@@@..@@@.@@@@@@@.@@.@@@.@..@@@@@..@@@.@.@@
@@@..@.@.@@.@@.@@.@.@....@@@@.@@@@@.@@...@@@@@@...@@.@@@@@@@@@..@.@...@.@....@.@@@@@@@...@@..@.@@@.@@@@.@@.@@@@@.@@@@@@@@..@.@.@@@@@@@.@@@.
@@@.@@@@@.@..@@.@@@..@.@@....@.@@.@.@@@@@.@@@@@.@..@.@@@@@.@@..@@.@.@@@..@.@@@@.@@@@..@@@@.@@@@@.@@.@@.@@@.@@@@@@@@@@@.@.@.@@@@@@@@.@@...@.
@@...@.@@@.@@..@@.@@@.@..@.@...@@.@@@@@@@..@..@@.@...@@@@@.@@@.@@@@..@@@@.@@@@@@@@.@@@.@@@@....@@@@@.@@..@.@.@@@.@@@@@.@.@@@@@@@@.@.@@@@@@@
@@@@..@@...@@.@@@..@@.@.@@.@@.@@@.@@@.@@.@@@.@...@@@@@..@.@@@@@.@@@@..@@@@.@.@....@..@@@@@@@......@.@@..@.@@@.@@@@@@.@.@@@.@.@@@..@@@@@@@@.
@.@@.@..@@@.@@@@@@..@@@.@@@..@@.@@@@@@.@@@.@@@@@@@@@.@.@...@@.@.@.@@.@@@@@@..@@@@@.@@@@@.@.@@@...@@@...@@@@@@@@@..@.@.@@..@@..@@@..@.@@@@.@
@@@@.@@@@@@@@@@@@@@.@@@@@@.@@@.@@@@@@..@@@@..@@@@@@@@.@...@....@@@@.@@...@@@@@.@@@@...@@.@@@@@@.@@.@@@..@..@...@@@@@@@@.@@@@.@@@.@@@@@@.@@@
.....@@@@@@@........@....@@@@@..@@.@@.@...@@@..@@@@@@..@.@@@.@@@@@.@..@@.@@.@@.@@.@@@@@.@@@@.@@@@@.@.@@@..@@..@@.@.@.@.@.@@@.@@@.@@.@.@...@
.@@.@@..@@@.@@.@...@@@@@.@@@...@@@@@@@@@..@@.@@@.@@.@@@..@@@...@@@@@.@@@@...@@@.@@@...@.@@.@@@.@@..@.@.@@@@.@@@.@@@..@.@@@@@@@@@@.@@@.@.@.@
.@@@@..@@@@@.@.@.@.@@@@@@@@.@@.@@@@.@.@..@@@@@@@@@.@@@@@.@@@@@@@@.@@@.@@@@@@..@..@@@.@@@..@@@....@.@@@@@..@@.@..@@.@@..@@@.@@..@@@@@@..@@.@
@..@@@.@..@.@@@@@@@@..@@@.@@.@..@...@@...@@@@@@@@@.@@@@@@.@@.@@@@@@@@.@@@...@@.@.@..@.@@@@.@....@@@@@@.@..@@@.@@@@.@@@.@@@.@.@.@@.@@@.@@@@@
@.@@@@@@.@@@@@@.@@@@@@@@.@.@.@@......@@@@@..@..@@@@@..@@@.@.@.@@@@.@@@.@...@..@@@@@.@@@@..@@@@@@@@@..@@@@.@@@@@..@@@@.@@@.@@@@@.@.@.@@..@@@
..@..@@.@@.@.@@@@.@@.@@@.@@@@@..@@@@@@..@@@@@@.@.@......@@..@@@.@.@@.....@@.@.@@@...@..@@@@@.@@.@.@....@@.@.@@..@@@@.@@.@@@.@@.@@@@..@.@..@
@@@@@..@@@@@@..@@.@@@.@..@@@.@@.@@.@@@@.@.@.@..@@@@@@@@@@@@..@@..@.@@.@@.@@.@.@@.@.@@...@.@.@.@@@.@@@.@@@@@@@@@@..@@@@@.@.@.@.@@@.@@..@.@@@
@@.@.@@@@.@@.@.@@.@.@@.@@..@@@@@@...@@@@.@@.@@@..@@@.@..@.@.@@@@@..@@@@@.@@@@@@.@@@@.@.@@@@...@..@@@.@.@..@@..@@..@@....@@.@@@@@@@@..@@@@@@
..@.@....@@@@.@@..@@.@@...@@.@@@...@.@..@@.@@@@.@@@@@..@.@@@@..@@@@@@@.@@@.@.@@.@@@@@@@.@@@.@.....@..@@@@.@.@@@@.@@@.@@@.@..@@@@@.@@@@@.@@.
@@..@@@@@.@@@@@@@.@@@@.@@@@....@..@..@@..@@@@...@..@@.@.@@@@@@@@..@@@.@..@@@@@@@..@@@.@@@@@@@@@@@@@@.@@.@@@@@.@.@.@.@.@@.@@.@.@.@@@@.@.@@@@
@@@.@@@@@.@..@.@@@@@@.@@@@@.@.@@@...@@.@..@.@@@@@@.@.@@.@@@@@.@@@..@@.@..@@@@..@.@.@..@@.@.@@.@@.@@@@...@@@..@@@@@@@@.@@@@@@.@...@..@@@@@@.
...@@@@@@@@@..@@@.@@..@@.@@.@@@.@@@@@@@..@..@@.@@@@@@@@@.@...@@@.@..@@@@.@@@@.@@@@@.@.@....@.@.@..@...@@.@.@@@@@.@@@@@.@.@@@@@@@@@.@.@@.@@.
@@.@.@@@@..@.@@@@@.@@@@@@@@.@.@.@..@@.@.@..@@@@@@@@.@@@.@..@@.@@@@@@@@@@@.@@.@@.@@@.@@@@.@@@.@..@@...@@@...@.@...@@.@...@@@...@@.@.@@.@@@..
..@@@@@..@@...@@@@@...@@.@@@.@@@@@@@@..@.@@.@@@@.@.@@@@@@@@...@@.@...@@@.@@.@@@@.@@@@..@@.@@@@@@@..@.@@@@@..@..@@.@@..@..@.@@@.@@@@.@....@@
.@@.@.@...@@.@@@@.@@.@@.@@@.@@@@.@.@@@@.@..@@@@@@@@.@@@...@@.@.@..@.@.@@.@....@.@@@..@@.@@@@@@@@..@.@...@@@@@@@@@@@..@..@@@..@.@.@..@@@..@@
@@.@@.@@@@@@@.@@..@@@@.@@@@.@@..@@.@..@@.@@@@@.@..@.@@@@@@@@.@@.@@..@..@@@@@@.@..@@@@.@@.@.@@.@@@@@.@@@@.@@@@@@@.@.@@@..@@@@@.@@@@..@@@@@@@
@@@@.@.@@@@@@@@@.@@.@@@@@@..@@.@.....@@@@@..@@@@@@@.@....@@@@.@@.@@@@..@@@@...@.@@@@@.@..@@@@@@@.@.@@..@@@@@@.@@@.@@@@.@.@.@@.@@@@@@@@@@@.@
.@@.@.@@@@@....@@..@..@.@.@..@@.@@..@.@@@@@@@..@@@@@@@.@@@@@.@..@.@.@@@@@@@@.@@.@@@@@@.@@@@@@@.@@@.@@@@@@@@@@@@@.@@.@..@@@@@.@@.@.@.@.@.@@@
@@.@@@@@.@@@@@...@@@.@.@.@.@...@.@.@@..@@@@@.@.@.@.@.@@@@..@.@@.@@@@@@.@@@@@@.@@@@@..@@@.@@@@@@@.@@.@@@@..@..@.@@..@.@.@.@..@@.@@.@..@...@@
@@@@@..@@.@@@@..@@@@@@@@@@@@@@..@@@@@@@.@.@.@@.@@@.@...@.@@@@..@@.@.@.@@@.@.@@.@@@@..@.@@@@..@@@@@.@@@@@@@@..@.@@@@@.@@.@@@@.@.@.@@...@..@.
@@@@@@.@.@.@@@.@.@@@@@.@@@@.@.@@@@.@..@@@@@.@@@@.@.@..@.@.@@.@.@@..@@@@@@.@.....@@@@.@.@..@@..@@@..@.@.@.@@.....@@..@@..@@.@@@.@@@@.@@.@..@
@@.@@@.@@.@@.@@.@@@@@@@@@.@@..@@..@@.@@@@.@@@.@.@.@@@@@@@@@...@@.@@@@@@@@@.@.@@@@@@@.@@@..@.@@.@@..@@.@.@@@.@@@@@@@@..@@@@@@@..@@@.@@@@@@..
@@@@@..@.@.@.@.@@@@@@@.@@@@@@@@.@@@.@@..@@.@.@.@@@@..@@@@.@@@@@@@.@@....@..@.@@..@@@@.@....@@@@.@.@.@@@@@.@@@@@.@.@@@@..@@@.@@.@....@@.@@@@
.@@@@@@@..@@.@@.@.@.@@..@..@@..@@@@.@@..@@@.@@@@@@@@@.@.@@.@.@@@@@@@@..@@....@..@@@@@@..@.@.@@@.@@.@.@@@.@..@@@.@@@@@@@..@@.@@@..@@@@.@@@@@
@...@@@...@@.@...@.@@@@.@@@@..@.@@@@..@@..@@..@@.@..@@@.@@.@..@.@.@@@@.@@@@@.@.@@@..@@.@@@@@@@@.@@.@.@@@.@.@@@@@@.@.@@@@@@@@@.@@.@@@@@.@.@@
.@@.@.@...@@@.@@@..@...@@.@@.@...@@@.@....@.@@@.@@@@@@.@.@...@@.....@@.@@..@@@@@@@@@.@.@.@@@.@...@@....@@..@@@@@.@@@@@@@@@@.@..@@.@@@@...@@
..@@@@@.@..@@@@@.@..@@@.@..@.@@@....@@@..@@@@.@@.@.@@@@...@@.@.@.@@@..@@@@@@.@@@@@@@..@@@@@@@....@@.@@....@@@@.@.@.@@..@.@@@.@.@..@@@@@..@@
@.@.@@@@@@@.@@@.@.@@@@@@@@@.@.@@.@@@..@@@.@@@..@@@@.@.@@@@.@..@.@@@@@@@@@@@@@.@@....@@@@@@.@@@.@@@.@@@@@@@.@@.@@@@.@@@@@..@.@@...@@@@@@..@@
.@@@@@..@@.@@@.@@.@.@@..@@@@@@@.@.@..@@@@.@@@@@@@@@..@@@...@@.@@@@@@@@@@..@..@@@@@@@@.@.@@@@@@@..@@@@@@@@@@@..@.@@@.@..@.@.@@..@.@@@..@@.@.
...@@@@@@.@@@@@@@@@.@@@@@@@..@@@@.@@@.@.@@@@@@..@.@@@@..@@.@@@@@.@@@.@.@@.@..@.@@@@@.@.@@.@@.@..@@@..@@..@@@.@@@.@.@@@..@.@@@....@@@..@@@@@
@..@..@@@@@@@@@@@@@@@....@@@@@@.@@@@@...@@@@.@@@.@.@@@..@....@@@@@..@@...@@..@@@@.@@..@@@@@.@@.@..@@.@...@@@@..@.@@@@@@.@.@.@@.@@.@@.@.@@@@
....@.@@@..@@@...@.@@.@@@@.@@.@@@@..@@@@@@@.@@@@.@@@@@.@@@.@@..@@...@@.@@..@.@@@@@.@@@@@..@.@@...@@.@@.@.@@@.@.....@@@.@@.@@.@@..@..@.@@@.@
@@@@@@@.@@@@@@..@..@.@@@.@@..@@@@@@@.@.@@@..@@@@@@..@@.@@@@@@@@@.@@@@@@@@@@@.@.@@.@@@@..@.@..@@.@@.@@@@.@@.@...@@@@@@@@.@@.@@..@@@@..@@@@..
@@@@@@.@@@@.@.@.@@.@@..@@@.@...@@@.@@@@.@@@@..@.@..@@@@.@..@@@.@@@@@@@@.@@@@..@@@..@@.@@@.@@@@.@@@.@.@.@@@@@.@@.@@@@@...@.@....@.@.@@.@.@@@
@@..@@@...@@.@@@.@.@@...@@@@@@@@@.@@@.@@..@@@.@@.@@@@@.@.@@@@@@..@@@@@@@@@@.@@@...@....@@....@..@@.@.@@..@@@@@@@@@.@@@@@@@.@...@..@@.@@@.@@
@@.@.@@.@@@@@@..@.@@.@...@@@@@@@.@@@.@.@@@@@.@@@@@@.@..@@@@@@@.@@.@@@@...@..@..@@.@@.@..@@@@..@.@@@@.@@@.@@...@@.@...@@@.@.@@@.@@.@.@@@..@@
@..@.@.@@.@......@.@@@@@@.@@.@@.@@...@@@@@@@@@@@@.@@@@@@@@.@.@.@@.@..@@.@@.@@@@@.@@.@.@..@@@.@@@@@@.@@@@@.@.@@@@@.@@..@@@.@@@.@.@@.@@@@.@@.
@..@@.@.@.@@.@.@.@.@.@......@@@.@@@@@@....@.@@@.@.@@@.....@@@@@@.@@@@@@@@@@@...@..@@@@@@..@.@.@@@@.@@@...@@@@...@@@.@@@@.@.@.@..@@@@@.@.@..
@@@.@@...@...@.@@@@@@....@@@@@.@.@@@@...@.@@..@@..@.@.@@.@..@.@@@@.@@.@.@@.@@@@@@@@@@@@.@@@@.@.@@@@@@...@@@.@@.@@@@@...@@@@@@.@.@@..@@@.@@@
.@.@..@@.@@@.@@@.@...@@.@@.@.@@@@...@...@@@.@@@@..@.@@.@@..@@..@@.@@@.@.@@.@.@.@.@@@@.@@@@@@@@@@@.@@@@@@@@@@@@.@.@@@.@....@@.@.@@@..@@@@.@@
@@..@.@@.@.@.@@.@.@@@@@@@@@@.@..@@.@@@..@.@@.@@@@..@...@@.@.@@@@...@@@@@.@.@@..@@@.@@@@@@@@.....@@@.@@@..@@@@@@@@.@@@..@@..@.@@.@.@.@@.@..@
..@@.@@.@@.@.@@@@.@..@..@@@@.@@.@@@@@@.@@@@@..@@@.@@@.@.@@@@..@..@@@@@@@@.@@..@@@@@@@.@.@@@@@..@@@@@@.@@@.@@.@@@.@...@@@@@@@@@..@.@.@...@@.
@@.@@@.@.@.@@@@@@@.@@@@@@.@@@@@..@@.@@@.@@@@@...@@@..@.@@@@.@@@@@..@.@..@.@@@@.@@.@..@@@@@@@@@@.@.@.@.@@@@@@@@.@.@@..@@@@.@@@.@..@.@.@...@@
.@@@.@@@.@@@@.@.@.@@@@@@@..@@@@...@@.@@.@.@@@@@..@@.@@@@.@@.@@.@@@@.@@.@.@@.@@.@@..@@@@@...@.@.@@@...@@@@.@..@@@.@@@..@@..@..@.@@.@@@@@@...
@.@@@@@@...@@@@@@.@@@@.@@.@..@@@@@@@@@.@.@@@..@..@@.@...@.@@@@.@@@.@..@@.@@@...@@.@@@@.@.@.@@@@@.@@@@@.@@...@.@...@.@@@@@@@..@.@.@.@@.@.@@.
@@@..@@@.@@@@@@@@@@@..@.@.@.@..@@@@.@@@..@@.@@.@@.@.@....@.@.@@.@@.@@@@@.@@@..@@@@@@@@@..@..@......@.@.@.@@@@.@.@.@@.@@@@@.@@.@.@@.@@.@@..@
.@...@.@@@@@@..@@@@.@.@@@@@@@.@@@@@..@@@@@@..@.@@@@...@@@@..@@@@@@...@@@@.@@@@@....@@@.@@@@@@@.@..@@@..@@..@@@@...@@.@.@@@.@@.@...@@.@@.@..
@@@@..@@@@@@..@@@@@.@.@@@@@@@@@@....@..@@@.@@@.@.@.@..@@@@.@....@@@@@@@@@...@@@.@@@@@@@.@@@.@@@@@@@@@@@@...@@.@@@@@@@@.@@@.@@@.@@.@@@.@@@.@
@@@.@.@@.@.@@@@@.@.@@@@.@@.@@@..@@.@.@.@@.@@.@@..@@@@.@@@@@@..@@@@@..@.@@@@@@@@@@@@.@@.@@.@@.@@.@..@..@..@.@@@...@@@.@.@.@@@...@@@@@@@@.@@.
.@@....@...@@..@@@.@@@@@.@@.@@@..@@...@@@@.@.@@@@@@.@..@@@..@@@@..@@@@@@@@.@....@@.@.@@@@@.@@@@@..@@@@@@@.@..@@.@@@@@.@@@@..@@.@.@.@@@.@@@@
@....@@@@.@.@@.@@.@@@@@..@@@.@.@@@@....@@@@.@@.@@@.@..@.@@@@..@@@.@@@.@.@@..@.@...@@@.@....@@@@@..@@@@..@@@..@..@.@@@.....@....@@@.@@@@@.@@
.@@@@@.@.@.....@.@@@@@@...@@@...@@.@@.@.@@..@@@@@@@.@@.@@.@@@@.@@@@@.@.@@.@@@..@@.@..@@....@.@.@..@@@.@.@@.@@@@@.@@.@@.@@@@@..@.@@.@@.@@@@.
.@@.@@@.@@.@.@.@..@.@.@..@@@@....@@@@..@@@...@@@...@@.@.@...@@...@@@@@.@.@@...@@.@@.@@.@.@@..@@..@@.@@@@@.@@@@@@@@@@@.....@@@.....@...@@@.@
@.@.@@@.@@.@@@@@.@.@..@@.@@@@.@.@@@@@@@.@@@@@.@@@@@@.@...@.@@.@@.@.@@@.@@@@@@@@@@@@@@.@.@@..@@@@@@@@...@.@.@.@.@@..@@@@@@@@@@@@.@@@@..@..@.
.@.@@.@@@..@.@.@.@@..@.@@@..@@@..@.@..@@.@.@@@.@@@@@.@.@.@@.@@@@.@@@@....@@.....@@@..@@@.@@@@@@@@.@@.@@..@@@@@@..@..@.@@.@@....@@@@@@@.@.@.
..@.@@.@@@@@@@@.@..@@@.@@@...@.@@@.@@@...@.@.@..@.@@@@@@@..@..@..@...@@@@@.@@@..@.@@.@@@@.@.@@@@..@.@@.@..@@..@.@@....@@@.@.@@@.@.@@..@@@.@
@..@@@.@@..@@@.@@@.@@..@.@@..@@@@@@.@@@.@.@.@@@.@@@@@.@..@@..@@@@@.@.@.@@...@.@...@@.@@.@@@@.@@@.@.@@@.@....@@.@@...@@@@@..@@@..@@@@.@@@@@@
.@.@@@@@@@@@@@..@@.@@.@@@..@@.@@.@@@.@.@@@@.@.@@@@@.@@@@...@.@@@@.@..@@@@@.@.@@@.@@@...@..@@.@@@@@..@@@@@@@.@.@@@..@.@@@..@@@.@.@@@..@....@
@@@.@@@..@@..@@.@.@@@@..@.@@@@@@@@@@....@@@.@@.@.@@.@.@.@@@.@@@.@..@@@@@@.@@@@@@...@@...@@@@..@@@@@@@@@@@....@@@@@@.@@@.@@.@@@@@@@@.@@@@.@@
.@@@@.@..@@@@@@@@.@@@@@.....@@@@@@.@....@@.@@@@..@..@.@.@.@@@@@..@@@@..@.@@@.@@@@.@@.@@@..@..@@@@@.@@@..@@.@.@@.@@.@.@.@.@@.@.@@@..@@@@@@@@
@@@@@@@@@@@...@.@..@.@.@@@.@@@.@.@.@..@@.@.@.@@@@@@.@@@..@.@@.@@@@@.@..@@@@@@.@.@@@@@@@.@.@..@@@.@.@@@.@@@@.@@@.@.@..@.@@@@@@@@.@@@.@@@@@@@
..@.@..@@.@...@@@@@@@@@@@@@.@.@@@.@@@@@.....@@@@@@@@@@@.@@..@@@.@.@@@@....@.@.@@@.@@..@.@@@.@@@..@@@@@@@@.@..@@@@@@@@.@@@@@.@.@@.@@@..@@..@
@.@.@.@@....@@.@@@@@@.@.@.@@@.@@.@...@.@@@@@.@@..@@.@@...@@@@@@@.@@@@@@@@@@..@.@..@.@.@.@.@.@..@@@@@@.@.@@@@.@..@.@.@@.@..@@@...@..@..@.@..
@@@.@@@.@@@@@@@@.@@.@..@..@@.@.@@@@@@@@@@@@@@@@@..@@@@@@@.@@@@@.@.@..@..@@..@@.@@@@@.@@@@@.@@...@.@@@@@..@@@@@@@@.@@@.@@@@@@@..@@@@.@@.@...
@@@@.@@.@@@@.@@.@@.@.@.@@@@.@@@@.@.@.@@@@@@...@..@.@@@...@@@@.@@@@@@.@@.@..@@@@@@@..@@@@@@.@..@@@.....@@....@@@@.@@@.@@.@.@..@..@@@@@.....@
..@@@.@.@@.@@@@@@@.@.@@@@@..@.@@@@@..@@..@@@.@@.@@@@@@@@@@@..@@@.@.@@.@.@.@@..@.@@.@@.@.@@@@@@@@.@@@@@@@.@.@.@@@@@.@@@...@@@@..@@.@@@...@@@
@@.@@..@.@@@@@..@@..@@@.@@@..@..@.@@.@@@@@@@@.@@@@@@@@.@@.@@@.@...@@@@@@@@.@...@...@@@...@@@@@.@@.@.@..@.@..@@@@@@@..@@.@.@@@.@@@.@...@..@@
@@.@..@.@@.@.@@@.@@.@...@@.@@.@@.@@@@@@@@.@@.@@@@@@@@.@@.@.@@@@@.@..@@@@@@@@.@@@@...@.@@@...@@@@@...@@@..@@@@@@.@@@...@.@@@@@@@.@@@@@@.@...
@.@@@.@..@@@.@@@@@@..@@@...@@.@@@@.@@.@@.@..@@@@..@@.@@@@@..@...@.@@.@@..@@..@@..@@@@@...@@@@@@@@.@@@@.@.@@@..@@...@.@@@...@@@@@@.@@..@@.@@
@@@@.@@.@@..@@.@@.@.@.@@@@.@@@@@@.@...@@@@@.@@@@@@....@@@@.@@@@@@@@@@@@@@..@@@@@@@..@@@@....@@@@.@..@@....@@@@@@@.@.@@@@@@@@@@@@@@@@..@@..@
@@@@.@.@..@.@@@@.@@@@.@@@@@@.@@@@...@@@@@@...@.@@@@....@@@@.@@@@..@@.@@@@.@@@@@..@@@@.@.@@@.....@@.@@@.@..@@@@.@@.@@.@@.@@.@@...@...@@@@..@
.@@@@@.@..@..@@.@@@@@@@@@..@@.@..@.@@.@@..@@@@@@@@@@.@..@.@@@@@@@.@...@@.@@..@..@..@@@...@@@@.@@@@@@@.@@.@.@.@@..@.@..@.@@.@@@@@@@@.@.@.@..
@@@@@@@..@@@@@@.@.@@@@@@@@.@@.@.@..@.@@.@@@@..@.@@.@.@@@@@@@..@@@@.@@@....@@@.@@@@.@@..@@@..@...@.@@.@.@@@@@.@@@..@@@....@..@@@..@@@@@.@@..
@.@...@.@.@@@.@@.@.@@@@..@.@.@...@..@.@@@@...@.@@@@@..@@@@@@@@...@.@@.@.@.@@@@@@@@@..@@@.@@@@@@@@@@@@@@@@..@.@.@.@@@@@.@@.@@@@@.@@@@@.@@@@@
@@@@.@@@@@@@.@@.@@.@@@@.@@.......@..@.@@...@@@@@@@@.@@@@@.@.@@@@@@@@.@@....@@...@.@@@..@@@@@@..@.@@...@.@.@@@@.@@@.@....@@@@@@@..@@@@@.@@@@
.@@..@.@@@.@@@..@@@@@@@@@@@@@.@...@@@@.@@@.@@@@@@@@.@@@@@.@@@..@@.@@@.@@@@@.@@@@@.@@@@@@@@@@@...@..@@.@.@.@.@@@.@@.@@...@@.@@..@@@@..@.@.@@
.@@.@.@..@@@@.@@.@@@.@@..@@.@@@@@@@@@@@@@@....@.@@..@.@@@..@@@@.@@..@@@.@@@@@@@.@..@......@.@.@@@@..@..@@@@.@@@@..@@@.@@@@..@@.@.@@@@@@.@@.
@..@@@@..@@.@@..@@..@@.@@@@@@.@@@@.@...@.@.@.@@.@@.@@.@@@@..@@@@@@@@@@@...@@@@@.@@.@.@@..@@........@.@@@@@.@..@@@@..@.@......@@@@.@@@@@@@.@
.@.@.@@@..@@@@@@@@@..@@@@@@@@.@.@@@@@...@@..@@@..@.@@@@.@@..@.@@.@@@@.@@..@.@.@@@.@@.@@@@@@@@@@@@@..@@..@@.@@@@...@@...@@@@@@@@.@@@.@@.@@@@
@..@@.@@@@@@@@@..@@@@@@.@..@.@@@..@@.@.@@.@..@@@@@@@.@@@@.@@@.@@.@@...@@..@@@.@@..@@@@.@..@.@.@.@@.@@@@@@@@.@...@@.@.@@@@@.@.@@@.@.@@.@.@.@
.@@@...@.@....@@@.@@@@...@@..@@.@@@@@@@@@@@@..@..@.@@@.@.@@..@.@@.@.@@@@.@.@..@.@@@@@@@.@.@.@..@@@@@...@@@@@@@@...@@@@@@@@@.@@@@@@@..@@@@@@
.....@...@.@@@..@@@.@@@@@.@@.@.@.....@@.@@...@@@@.....@@@@.@@@@@@@@.@@@..@@..@@.@@.@@@@@@@@..@..@..@@..@.@..@@@.@@@@.@@@@@@@..@@@.@@@..@@@.
.@@@@.@@..@@.@@@@@@@..@@@.@@@.@@@@@@.@@....@@@@.@@.@.@.@@@..@..@.@@..@@@@@@@@.@@@.@..@@@@.@@@.@.@@@.@@.@@@..@@@@@@@..@.@@@@@.@...@.....@...
.@@@@.@@@@..@.@@@@@@...@@@@@..@@.@@@@..@.@@.@@..@@@@@@..@@@@@.@@@@.@....@@@@@@@@@.@.@@..@@@@.@@@@@@.@.@@@@@@@@@@@@.@.@@@@@@@@@@..@.@.@.@...
@@..@@@.@@@.@@@@@@..@@@@@@.@@@@@@..@@@.@@..@@@@@@@..@@@@@@.@@@@@@@@@@@@@..@.@.@.@..@.@@@@@@.@@@..@....@.@.@@@...@@.@.@.@@@@@@.@.@..@@..@@@@
@@..@@.@@@@@@@@@.@@@@@@..@@@@@..@@@.@@..@@@@@@@@..@..@.@.@.@.@.@..@....@@.@@@.@@@@@@@@.@@@.@@@@@@.@.@.@@.@..@@@@@@@@@.@@@@..@..@.@@...@.@@@
@@@@@@@@@@@@.@@@.@@@@@@@@@..@.@.@....@@@.@@.@@@@@@....@@@.@@...@@@.@.@@@..@@@.@@@.@@@@@@.@@@.@@@@.@.....@@@@@@@@.@@.@@@@@@@.@.@.@.@@.@@.@@@
@..@@@..@.@..@@.@@.@@@@@@@@@@@@@@@@.@@@...@.@..@...@.@@@@@@@@@..@@.@@@@.@.@@@@..@.@@@@@@@..@@...@@@..@..@..@@.@@@@.@@@.@@@..@...@.@.@@.@@@@
@@@.@@.@@@..@..@@@@@@@@@@.@...@@@@.@@@.@.@.@.@@@@@.@.@@@@@.@@.@@..@...@@@..@.@.@.@@@@@@.@@@@..@@@@.@.@..@....@@@.@@.@@@@.@@@@@@..@@...@@.@.
.@@@@.@@@@@@.@@@@@...@@@@.@@@@.@@@..@@@@@@@.@@@@@@@@@@...@@...@@@@@@...@@@@@@@.@@@..@..@@@.@..@.....@..@.@@..@@@@@@@@@..@@.@.@..@@@@@@.@@@@
@@.@@@...@.@@@@@.@...@@@.@@@@.@@@.@@.@@@.@.@@@@...@@@@.@@.@@@.@@@...@.@..@@@.@@@@@.@.@@@.@@@@@@@.@@..@@@@...@..@...@@@..@@@@@@@.@..@@..@@@.
@@@@@.@@.@..@@...@@@@.@@@@@..@@@..@@...@...@@@@@@@@@@.@@.@.@.@@.@@@@@@..@@@@@@.@@@@@@@@.@@@.@.@..@@.@@@@...@..@@@@@@.@.@@..@@..@@....@.@@@.
.@@@..@.@.@@@@@@.@@.@@@@@@.@@@.@@.@.@.@@..@...@.@@@.@.@@.@@@@@@.@@.@@@@@..@@@@...@@@..@...@@...@@..@.@.@@@.@.@@@@@.@@.@@@@.@@@.@@@@...@@@@@
@@.@.@..@@....@@.@@@@@@@.@@@.@..@@@@..@@@@.@.@@@@@.@@....@@@@@@@@@.@@..@.@@....@.@.@.@@@@@@@@.@@@@..@..@.@@.@@@..@...@@@@@.@..@@..@@@.@.@@.
@@.....@@@@@@@..@@@....@@@.@..@..@@.@..@@..@..@.@@@@.@@.@@@@@@.@@@..@@@.@@.@.@.@@@@@@@@@.@@..@.@.@@.@@@@@...@.@@@@@@@@.@@@@.@@@@.@@@..@.@@@
.@@....@@@@@@@.@@@.@.@@@.@.@@..@.@@@.@@@@@@.@@@@@..@@.@@@.@@..@.@@..@@@@@@@@@@@@@@...@@@@.@.@....@..@@@.@@@@@..@@@@@.@@@@@@@@@@@.@...@@@@@.
..@@@@.@@..@@@@@.@@@@@@@.@@..@@@@@.@...@@..@.@@@@@@@@@@@@@@@.@@@@..@@@.@@@@@@@@..@@@@@...@@@@@.@@@@@@.@.@.@...@@@...@@@@@@.@@@@.@@..@@@@@@@
@@@.@@@@@..@@@....@.@.@@@.@..@@.@@@@@@@@.@@..@@.@.@@@@.@..@@@.@@.@@@@@@@@@@.@.@.@@.......@@@@@..@@@..@@@@.@@@@@@@@@.@.@@@.@@..@@..@@.@@@..@
...@@@@.@@@@@@@@@@@@@@..@@.@..@.@@.@@@@@@@@@@@.@@.@@@@.@.@@@@.@@@@@...@.@@@.@@@@@.@@.@@@..@@@..@@@@@@@@@@@@@@@@@@@@@@@..@.@.@.@.@@.@.@@@.@@
@.....@@@@.@@@..@@@@..@.@@.@@@.@@.@@@@@@..@@@@@@@@@@..@..@@.@@@.@@@@@.@@@.@@@@@@.@.@@@@@@@@@@@@@@..@@..@.@@.@@@@..@@@.@@@..@@@...@@@@.@@@@@
@...@.@.@@.@@@@@@@..@.@@.@@@...@@@@@@@@@@@@.@@@@@@@@.......@@@..@@.@@@..@.@@.@.@@@@@..@...@@.@..@.@.@@@@@@@@@.@@.@.@...@@@.@@@@.@@@.@..@@@.
@@@@@@...@@.@@@@.@@@@.....@@.@@@.@..@@.@@@@@@@.@@.@@@@@@.@.@.@@@@@.@..@@@@@@@@@.@..@@.@@@.@@@.@.@.@@@..@@..@@@.....@....@@@@@@@.@@@@.@.@..@
.@@..@@@@@@@@@@.@@@.@@@@..@@@.@@@@.@@@@@...@..@@@.@@.@@@@.@..@@.@@@.@.@@...@@@@@@...@@@.@@@@@@@@@@..@..@.@@@@@...@.@@@@@..@@@@.@.@.@@@@.@..
@@@@..@@..@@@@@@.@@@.@@@@@...@@@@.@@@..@@.@@@@@@.@.@@@@.@@..@@@@.@@@.@...@......@@@@@@..@@@@@@.@@.@@@@..@@.@@@@.@@.@@@.@@.@@@@.@@..@@..@@.@
@@@..@@@@.@.@@...@@.@@@@@@@....@.@@..@@@@@..@.@@@@@@@..@@@@@@..@.@@.@.@@...@...@@@.@@@@@@..@.@@..@@@..@@@.....@.@@@@@@.@@.@@@.@@.@@@@@@....
...@@@.@..@@@.@.@@@@@...@@.@@.@@@.@@.@.@.@@.@@@@@@@.@@@@..@@@@@@...@@@..@..@.@.@@.@@@@@....@@@@@@.@@@@@@@..@@..@.@@@@@@@@@@@.@@@@.@@.@@@@@@
@..@@@@@..@@@@...@.@@@.@@@.@@@@..@@@.@@@@@@@@@@..@...@@..@@@@@@.@@@@..@@@@@@@@@.@.@.@@@..@@@@@@.@.@@@...@@@.@@@.@@@@@@@@@@.@@.@.@...@@@@@@.
..@@@@@@.@@@.@@@@@@.@@@@@@@..@.@.@@.@@@@@@@@.@.@@@@@.@@.@.@@..@@@@@@.@@..@..@@@.@@@@@@..@.@...@@@@.@@@@..@@@@@@@@@@.@.@@.@...@@@....@@..@.@
.@....@...@@@@@@..@.@.....@@.@@@.@.@.@@.@.@.@.@@@@@.@@@@.@@@@@.@@.@@@@@@.@@@.@@@.@..@@@@@.@..@@@@@.@.@..@@.@@...@@.@.@@@.@@@.@.@@@@@.@@@@@@
...@.@@@@@@@@@@@..@..@@@.@@@@@@@.@@@.@.@@.@@@....@.@@@.@@@@..@@.@@.@@.@.@.@@@@@@...@.@@..@@.@.@@..@.@@@@.@@@...@..@.@@@..@..@@@@@@@@..@@..@
@@.@@@@@@@....@.@@..@.@@.@@@.@.@@@......@.@@@..@.@.@.@...@@..@@@.@@@.@.@@@@@..@@@@.@..@@@@@@@...@@@@@.@....@.@@..@@@@@@@@.@.@@@.@@@@..@..@@
@@.@@.@.@@.@@@@......@..@.@@@@@.@@.@@@@@@@@@@@.@@@@@@@@@@@@@@@@@@..@@..@@@.@@@.@@@@@.@.@@@@@..@.@@...@@@@..@.@.@...@@@@@@@@@.@.@@@.@.@@@@.@
@@@.@@@@@@@@@@@@@@@.....@@@..@@@.@.@.@@@.@..@.@.@.@@...@..@..@.@@@.@.@@@@@@.@@...@.@@@@..@@@@@.@@.@@@.@..@@..@@@@@@.@@@..@.@.@@.@@@@@@.....
@@..@@@@.@.@.@@@@@@@@.@@@@@...@@.@@@@@@@.@@@@@@@.@@@@@.@@@.....@.@@@@....@.@.@@@.@.@.@.@@@@@@....@.@@@...@@@@.@@@@...@@@@@@@.@@.@@@....@.@@
@@@@@.@@.@...@@....@..@@@..@@.@@@...@.@@@@@.@.@@@@@.@@@@@@.@@@@@.@.@@@@..@.@@.@@@@@@.@.@@@@@@@@.@@...@.@@..@@..@.@.@@@.@@@@@@@@@@.@....@@.@
@@@@.@.@..@.@..@.@.@@@@@.@@@.@@@@...@@@..@.@@.@...@.@@.@@.@@@@..@@@@@@@@@@@@.@@@@@.@.@@@@.@@@@.@.@.@....@@@@@.@.@.@@.@@@@@@@@@..@@@@@..@@.@
@@.@@@@.@.@....@@@.@@@@.@..@@@@@@@.@@@@@@@....@@...@@@@@@...@@@.@@.@@@@.@@@@@@@@@@@.@.@@@@.@@@@@@@@@.@.@@@.@@@.@....@@.@.@..@@@@@@@@@.@.@@@

BIN
2025/aoc

Binary file not shown.

View File

@@ -8,6 +8,7 @@
#include "day1.hpp" #include "day1.hpp"
#include "day2.hpp" #include "day2.hpp"
#include "day3.hpp" #include "day3.hpp"
#include "day4.hpp"
void GenerateDay(int day, std::filesystem::path base) void GenerateDay(int day, std::filesystem::path base)
{ {

View File

@@ -6,6 +6,82 @@
#include <vector> #include <vector>
#include <filesystem> #include <filesystem>
template<typename T>
class Grid
{
public:
Grid() = default;
Grid(size_t h, size_t w) : data(h, std::vector<T>(w)) {}
Grid(const std::vector<std::vector<T>>& d) : data(d) {}
size_t Height() const { return data.size(); }
size_t Width() const { return data.empty() ? 0 : data[0].size(); }
const T& At(size_t r, size_t c) const { return data[r][c]; }
const T* SafeAt(size_t r, size_t c) const
{
if (r >= Height() || c >= Width()) return nullptr;
return &data[r][c];
}
void ReplaceAt(size_t r, size_t c, const T& value)
{
data[r][c] = value;
}
//
// 4-neighbours (up, down, left, right)
std::vector<const T*> Neighbours4(size_t r, size_t c, bool wrap = false) const
{
std::vector<const T*> out;
auto H = Height();
auto W = Width();
auto idx = [&](size_t x, size_t limit) -> size_t {
return wrap ? ((x + limit) % limit) : x;
};
if (r > 0 || wrap) out.push_back(&data[idx(r - 1, H)][c]);
if (r + 1 < H || wrap) out.push_back(&data[idx(r + 1, H)][c]);
if (c > 0 || wrap) out.push_back(&data[r][idx(c - 1, W)]);
if (c + 1 < W || wrap) out.push_back(&data[r][idx(c + 1, W)]);
return out;
}
// 8-neighbours (diagonals)
std::vector<const T*> Neighbours8(size_t r, size_t c, bool wrap = false) const
{
std::vector<const T*> out;
auto H = Height();
auto W = Width();
auto idx = [&](size_t x, size_t limit) -> size_t {
return wrap ? ((x + limit) % limit) : x;
};
for (int dr = -1; dr <= 1; dr++) {
for (int dc = -1; dc <= 1; dc++) {
if (dr == 0 && dc == 0) continue;
size_t rr = r + dr;
size_t cc = c + dc;
if (!wrap) {
if (rr >= H || cc >= W) continue;
}
out.push_back(&data[idx(rr, H)][idx(cc, W)]);
}
}
return out;
}
private:
std::vector<std::vector<T>> data;
};
struct FileFragment struct FileFragment
{ {
int Line, Col; int Line, Col;
@@ -19,156 +95,197 @@ inline std::pair<FileFragment, FileFragment> SplitToken(std::string del)
class File class File
{ {
public: public:
File() = default; File() = default;
explicit File(const std::filesystem::path& path) explicit File(const std::filesystem::path& path)
{
Load(path);
}
void Load(const std::filesystem::path& path)
{
if (!std::filesystem::exists(path))
{ {
throw std::runtime_error("File " + path.string() + " does not exist"); Load(path);
} }
std::ifstream file(path.string()); void Load(const std::filesystem::path& path)
if (!file.is_open())
{ {
throw std::runtime_error("Failed to open file " + path.string()); if (!std::filesystem::exists(path))
{
throw std::runtime_error("File " + path.string() + " does not exist");
}
std::ifstream file(path.string());
if (!file.is_open())
{
throw std::runtime_error("Failed to open file " + path.string());
}
_lines.clear();
std::string line;
while (std::getline(file, line))
{
_lines.push_back(line);
}
} }
_lines.clear(); /// Split each line by a multi-character delimiter
std::string line; void SplitBy(const std::string& delim)
while (std::getline(file, line))
{ {
_lines.push_back(line); _tokens.clear();
}
}
/// Split each line by a multi-character delimiter for (size_t lineIndex = 0; lineIndex < _lines.size(); ++lineIndex)
void SplitBy(const std::string& delim) {
{ const auto& line = _lines[lineIndex];
_tokens.clear(); std::vector<FileFragment> lineTokens;
for (size_t lineIndex = 0; lineIndex < _lines.size(); ++lineIndex) size_t start = 0;
{ int colIndex = 0;
const auto& line = _lines[lineIndex];
std::vector<FileFragment> lineTokens;
size_t start = 0; while (true) {
int colIndex = 0; size_t pos = line.find(delim, start);
if (pos == std::string::npos)
{
lineTokens.push_back({
static_cast<int>(lineIndex + 1),
colIndex,
line.substr(start)
});
break;
}
while (true) {
size_t pos = line.find(delim, start);
if (pos == std::string::npos)
{
lineTokens.push_back({ lineTokens.push_back({
static_cast<int>(lineIndex + 1), static_cast<int>(lineIndex + 1),
colIndex, colIndex,
line.substr(start) line.substr(start, pos - start)
}); });
break;
start = pos + delim.size();
++colIndex;
} }
lineTokens.push_back({ _tokens.push_back(std::move(lineTokens));
static_cast<int>(lineIndex + 1),
colIndex,
line.substr(start, pos - start)
});
start = pos + delim.size();
++colIndex;
} }
_tokens.push_back(std::move(lineTokens));
} }
}
void SplitByIndex(const int index) void SplitByIndex(const int index)
{
_tokens.clear();
_tokens.reserve(_lines.size());
for (size_t lineIndex = 0; lineIndex < _lines.size(); ++lineIndex)
{ {
const auto& line = _lines[lineIndex]; _tokens.clear();
std::vector<FileFragment> lineTokens; _tokens.reserve(_lines.size());
// Bounds check for (size_t lineIndex = 0; lineIndex < _lines.size(); ++lineIndex)
if (index < 0 || static_cast<size_t>(index) >= line.size())
{ {
// Just return whole line as single token if index is out of range const auto& line = _lines[lineIndex];
lineTokens.push_back({ std::vector<FileFragment> lineTokens;
static_cast<int>(lineIndex + 1),
0,
line
});
}
else
{
// Left part (may be empty, e.g. index = 0)
lineTokens.push_back({
static_cast<int>(lineIndex + 1),
0,
line.substr(0, index)
});
// Right part (may be empty) // Bounds check
lineTokens.push_back({ if (index < 0 || static_cast<size_t>(index) >= line.size())
static_cast<int>(lineIndex + 1), {
1, // Just return whole line as single token if index is out of range
line.substr(index) lineTokens.push_back({
}); static_cast<int>(lineIndex + 1),
} 0,
line
});
}
else
{
// Left part (may be empty, e.g. index = 0)
lineTokens.push_back({
static_cast<int>(lineIndex + 1),
0,
line.substr(0, index)
});
_tokens.push_back(std::move(lineTokens)); // Right part (may be empty)
lineTokens.push_back({
static_cast<int>(lineIndex + 1),
1,
line.substr(index)
});
}
_tokens.push_back(std::move(lineTokens));
}
} }
}
/// Access tokens for a given line (1-based) /// Access tokens for a given line (1-based)
const std::vector<FileFragment>& TokensForLine(int line) const const std::vector<FileFragment>& TokensForLine(int line) const
{
if (line < 0 || line > static_cast<int>(_tokens.size()))
{ {
static const std::vector<FileFragment> empty; if (line < 0 || line > static_cast<int>(_tokens.size()))
return empty; {
static const std::vector<FileFragment> empty;
return empty;
}
return _tokens[line];
} }
return _tokens[line];
}
// Access a chunk of tokens for a given line // Access a chunk of tokens for a given line
// E.g. Iterate [1,2], [2,3], [3,4] // E.g. Iterate [1,2], [2,3], [3,4]
std::vector<std::vector<FileFragment>> ChunkView(int line, size_t size, size_t stride) std::vector<std::vector<FileFragment>> ChunkView(int line, size_t size, size_t stride)
{ {
const auto& v = _tokens[line]; const auto& v = _tokens[line];
std::vector<std::vector<FileFragment>> chunks; std::vector<std::vector<FileFragment>> chunks;
if (v.empty() || stride == 0)
return chunks;
for (size_t i = 0; i + size <= v.size(); i += stride)
{
std::cout << "max " << i + size << " tokens " << v.size() << " index " << i << " size " << size << " stride " << stride << std::endl;
chunks.emplace_back(v.begin() + i, v.begin() + i + size);
}
if (v.empty() || stride == 0)
return chunks; return chunks;
for (size_t i = 0; i + size <= v.size(); i += stride)
{
std::cout << "max " << i + size << " tokens " << v.size() << " index " << i << " size " << size << " stride " << stride << std::endl;
chunks.emplace_back(v.begin() + i, v.begin() + i + size);
} }
return chunks;
} template<typename T>
Grid<T> AsGrid() const
{
std::vector<std::vector<T>> d;
d.reserve(_lines.size());
for (auto& line : _lines)
{
std::vector<T> row;
row.reserve(line.size());
for (char ch : line)
{
if constexpr (std::is_constructible_v<T, char>)
{
row.emplace_back(T(ch));
}
else if constexpr (std::is_constructible_v<T, std::string_view>)
{
row.emplace_back(T(std::string_view(&ch, 1)));
}
else if constexpr (std::is_arithmetic_v<T>)
{
if (std::isdigit(ch))
row.emplace_back(T(ch - '0'));
else
throw std::runtime_error("Grid<T>: cannot convert character to numeric T");
}
else
{
static_assert(sizeof(T) == 0, "Grid<T>: T must be constructible from char or string_view");
}
}
d.push_back(std::move(row));
}
return Grid<T>(d);
}
/// Iterate through all lines and their tokens /// Iterate through all lines and their tokens
auto begin() const { return _tokens.begin(); } auto begin() const { return _tokens.begin(); }
auto end() const { return _tokens.end(); } auto end() const { return _tokens.end(); }
/// Access raw lines (before splitting) /// Access raw lines (before splitting)
const std::vector<std::string>& Lines() const { return _lines; } const std::vector<std::string>& Lines() const { return _lines; }
private: private:
std::vector<std::string> _lines; std::vector<std::string> _lines;
std::vector<std::vector<FileFragment>> _tokens; // [line][token] std::vector<std::vector<FileFragment>> _tokens; // [line][token]
}; };
class AOCDay class AOCDay

View File

@@ -50,19 +50,26 @@ public:
return totalJoltage; return totalJoltage;
} }
std::pair<int,int> FindNextBiggestNoOffset(std::string bank, int startOffset, int endOffset)
std::pair<int,int> FindNextBiggest(const std::string& s, int start, int k)
{ {
int biggest = 0, biggestIndex = 0; int remaining = 12 - k - 1;
for (int i = startOffset; i < bank.length() - endOffset; i++) int lastAllowed = s.size() - remaining; // inclusive upper bound
int bestDigit = -1;
int bestIndex = start;
for (int i = start; i < lastAllowed; i++)
{ {
if (bank[i] - '0' > biggest) int d = s[i] - '0';
if (d > bestDigit)
{ {
biggest = bank[i] - '0'; bestDigit = d;
biggestIndex = i + 1; bestIndex = i;
} }
} }
return {biggest, biggestIndex}; return { bestDigit, bestIndex + 1 };
} }
uint64_t PartTwo(File& f) override uint64_t PartTwo(File& f) override
@@ -74,18 +81,16 @@ public:
uint64_t joltage = 0; uint64_t joltage = 0;
int start = 0; int start = 0;
for (int i = 0; i < 12; i++) for (int k = 0; k < 12; k++)
{ {
joltage *= 10; joltage *= 10;
auto res = FindNextBiggestNoOffset(bank, start, 12 - i); auto res = FindNextBiggest(bank, start, k);
joltage += res.first;
start = res.second; start = res.second;
joltage += res.first - '0';
} }
std::cout << joltage << std::endl;
totalJoltage += joltage; totalJoltage += joltage;
} }

97
2025/day4.hpp Normal file
View File

@@ -0,0 +1,97 @@
#pragma once
#include "aoc.hpp"
class Day04 : public AOCDay
{
public:
Day04() {}
~Day04() {}
int Day() override { return 4; }
uint64_t PartOne(File& f) override
{
const auto grid = f.AsGrid<char>();
int res = 0;
for (int i = 0; i < grid.Width(); i++)
{
for (int j = 0; j < grid.Width(); j++)
{
if (grid.At(i, j) != '@') continue;
auto neighbors = grid.Neighbours8(i, j);
int rollsOfPaper = 0;
for (auto* n : neighbors)
{
if (*n == '@')
{
rollsOfPaper++;
if (rollsOfPaper > 4)
{
break;
}
}
}
if (rollsOfPaper < 4)
{
res++;
}
}
}
return res;
}
int MovePossibleRolls(Grid<char>* grid)
{
int removed = 0;
for (int i = 0; i < grid->Width(); i++)
{
for (int j = 0; j < grid->Width(); j++)
{
if (grid->At(i, j) != '@') continue;
auto neighbors = grid->Neighbours8(i, j);
int rollsOfPaper = 0;
for (auto* n : neighbors)
{
if (*n == '@')
{
rollsOfPaper++;
if (rollsOfPaper > 4)
{
break;
}
}
}
if (rollsOfPaper < 4)
{
grid->ReplaceAt(i, j, '.');
removed++;
}
}
}
return removed;
}
uint64_t PartTwo(File& f) override
{
auto grid = f.AsGrid<char>();
int removedRolls = 0;
int removedLastTime = 0;
do
{
removedLastTime = MovePossibleRolls(&grid);
removedRolls += removedLastTime;
} while (removedLastTime != 0);
return removedRolls;
}
};
ADD_AOC_DAY(Day04);