day 7, examples, and other junk

This commit is contained in:
m
2025-12-12 11:13:26 -05:00
parent 516ecb07de
commit 94f0cd13ff
10 changed files with 881 additions and 19 deletions

2
src/plasl/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
a
blink.log

View File

@@ -0,0 +1 @@
18623-26004,226779-293422,65855-88510,868-1423,248115026-248337139,903911-926580,97-121,67636417-67796062,24-47,6968-10197,193-242,3769-5052,5140337-5233474,2894097247-2894150301,979582-1016336,502-646,9132195-9191022,266-378,58-91,736828-868857,622792-694076,6767592127-6767717303,2920-3656,8811329-8931031,107384-147042,941220-969217,3-17,360063-562672,7979763615-7979843972,1890-2660,23170346-23308802

View File

@@ -112,8 +112,8 @@ u64 pow(u64, u64) {
u64 range(u64, u64, i32) {
set len set end set start
println("==")
get start printnum64 ' ' putc get end printnum64 i8(10) putc
#println("==")
#get start printnum64 ' ' putc get end printnum64 i8(10) putc
if (get len 1 & 1 ==) {
u64(0) return
@@ -124,13 +124,13 @@ u64 range(u64, u64, i32) {
get start get divisor + u64(1) - get divisor / set first
get end get divisor / set second
i8(10) putc
get divisor printnum64 i8(10) putc
get first printnum64 ' ' putc get second printnum64 i8(10) putc
#i8(10) putc
#get divisor printnum64 i8(10) putc
#get first printnum64 ' ' putc get second printnum64 i8(10) putc
u64(1) get second + get first - get second get first +* u64(2) / get divisor *
dup printnum64 i8(10) putc
#dup printnum64 i8(10) putc
}
void _start() {
@@ -145,7 +145,7 @@ void _start() {
0 set i
while (get i get size <) {
println("--------------")
#println("--------------")
0 set startlen 0 set endlen
atol(get buffer get i+) set start
@@ -163,8 +163,8 @@ void _start() {
}
`li1+si`
get startlen printnum ' ' putc get start printnum64 i8(10) putc
get endlen printnum ' ' putc get end printnum64 i8(10) putc
#get startlen printnum ' ' putc get start printnum64 i8(10) putc
#get endlen printnum ' ' putc get end printnum64 i8(10) putc
if (get endlen get startlen !=) {
range(get start, pow(u64(10), get startlen as u64) u64(1)-, get startlen)
@@ -175,7 +175,7 @@ void _start() {
}
get out + set out
i8(10) putc
#i8(10) putc
}

View File

@@ -0,0 +1,200 @@
4346343235149456543445233353534244533333333343433259333326337334334333438332533343452433223352443324
2323233732423333335633333322134234324554233323746324333322454233432477323332532436412434167322334333
4438535634336316544333233334654336327872333345433342236331325333833273333243433524422235474324281254
7635564525754333455743514353744749554546454155741335443245664443536573554975764554345255721643344333
3436251343515542422628472421274223732245632229446723233332854754226524146224634422436324322222239424
3322722363637333537238763823533333332334432332224235543347553223326123333233327335363435336732333231
3322233132312242242612331523323342532632132524224233242444212224524342223462434131252242244133124523
3231232323233333443262431633413333234361441363323223235331222221362133323333142233123234642237252331
4213455225532326452352232115333243331124232231234223413225253232344223322222133234229822265136481222
4485474625664354263625634945926824657865634355433465323764534563443564235454646365444523646744455223
4526644373355432443342344365336343734562236227325776359313347342273433331495732635221244433433222783
6641423834344336342333143332833253324623332643333244514334341435466333535534723834233556512433524654
2232832326333452535333531422323414526334353233235224423222332112522542853433272222223223231424232132
2323232132423242322232223231323333313212322123121422433223122223322423242241332213132221222222224432
1122212123222122221222222332212221212232522122222211262222221222222112231223221543422222122222223121
2353333322241442343333522243544332223323122433334434426352434235342325335336333253232233432132323343
1122232112224322222223136231323212522232132222122233333232222222222232213322222222122221323222313232
2313213422432122224233322356322323431233325223221243162322312132322331222342223222332323332222312233
8242626364226227533711283555742562468534624525246447249921454444227564225566652366252212562643267256
2325226231333225222222232128223332322242231722122223222312221313122253312221222226221526355424245122
3435443762849656643666538674295966858695544964596534254344416588745767242676441646356935457978464898
3433234123313223322333233239324437832312223532133323213322322423331143232151423123333392282332335223
9839649678942674726644656925773795848939835644775368462546847556648257623488547664572482244448227469
7233434152521333232242375134451433432125274224134235522222722432334235532437533735752312233233323313
2122111122313233432232222232122232323332242223224221222221152323222222322222222122421333313232223222
2234622222212232224229222225222861222222222122222232122231211221122422222212222225222222322221222221
3222222422313263232223323434433263533223234334424173233133214227422332311222432213323222321123333322
2325322342223323333212331323133233234323333144333234113323362324321333522232233333432323222213253331
4225547536446335353542363643453544433582423463434444664221444645216615255443554243548242333434234232
4343344445443444344432344443444433246949645443244343539744974885443433844454343444344436433544363443
7282377345865955374554854149655725568545749456853355957458522624652443373552454745595252343429471325
3344222111273352352321212322261843542223373234242424221343222322124343231355246222454223262632522125
9293425563224138655452395446836646323222836882412229262294371325521224234112272342442433422322522393
4724345344444843473444444334443345424444343335344415432253533318444434374533454724344334431353514334
3443224253633253337323342242242348333133632536236335266453432338343223422334336338183366413327355232
1334736722392631523335413217365433822224557652252236324327124423322256532135233433722523288113322225
4533224811484227724336432241227446213282222283857664531622932223279622242367252696432125676252293755
6151435235362252336543653235252222212643232223132232245223363321244325612425235642261232332225252264
2342342372224422245444331343264133227333223343412233311233332267343323243343444331232732394443333432
2224822322221723143394434232324362713322243325232323222334232262253232535279274323562222521223732233
3243432334334322332243333332333223312333213324332213423363423324333434323416321342334443432333342433
2214124421311221213224242522322235411232122414223214216132244242222222122122222324252412432247422423
4224222244211121221224223142242224222242222242242223222422214232342215212223312223332433122423233432
2343332333343443343334375433333333312332463232213324232343233353622333373134345322333313332373349338
3447747864224364454439356132744222243447344441647756423441643545231494464373263335444643342572324463
1222314232212221221226233142212122321222122212212234432322221412123451115232222523142232323222222324
2231574174353753342332553233345213532373223923232353333353323233123243253252351353452242522113353233
6253423446237284832314361853934332622522432432275226523823277242872283422232138285214522323621327322
2223342532123233231323434442431742442312133342314223233232323253223232252322324543232112223133522326
3223322611223332333376533332638325325244433333222332364433323433531243332633435344332333772342444421
4242222343424324122221232222322335332224212122211182213122342442312212242322224522214342241223324133
4667556425356654626155366643567741622652416235663634365666665347763361648652455246255746147766912626
2431232242423132442645421344431528542222242113422523222641433115222632332243832223423254523622323232
6456322344313444333765434462356542564661241566445473443463344465544445425632435745343364343235342227
3555512442455213122412112245334412151151141243453342125542124213413142531213311313353142251512526789
3122444214622432232423262124322223422224135222222213222342322122424214153132442222554124233222234324
4377879776474667959755538197767444976676433464447765745846673956646684689397249372464444657736627862
2122222222223212111233223342232242222222433421156132224112342122222222514222252323225123566217512211
2133223223213333222232222124233211134223121723224222222222222332212232183122123212232222222112223213
3237682535343336635448473362363333373533238375733343333133334353476777333333742734453373636778833346
4532211122312243122332412843222122624223142263221374222142221241412271332132222333241342424321244313
2122235222257232242432223323221241323322462432212211622122333235233322313333333222321733521223243221
5422545443373424759444445355743534567564554444555136345456442425334344553753434535351555544423473445
3323113222125211524212222222122228622121225222122222212136122222314424222222253222242124322121222223
4145446445322236431525647253563325344448424545134452363533453644533744245415435254733512444145554145
3236432425343343333122433214362221322233344243244422323332923353432312124233433243233322385122532322
4232222225212223241124422352142512222332222321222522424222222642223214321212122321121623232212211442
2232222224222224413212423231433222112134323211241222112234222223221222112233232333211225212241332222
4333334623433533342135313244633343343443343313422343334333732342233353333373333334333334313323364234
1583342121375122352273222238322261234952236958534136147577327677263465843223328261942342317826824487
4245458132222627232232223122222212132342212323222278223824221222912412211241424235232422222222122421
4223123997971848342334724528364924263952239639243348742997589497286672222972783282854267294146774428
3324243443334223455325393433442433358443437275434335244335869342343433443233434335345343342343174343
2222221224216212425522927212342285211422423222282223282234222544445222221219262622422345313243421542
1343423537533322324532333632334643346541353233233253233253331323322225534433377242333323333443337333
2222242242211222122341541631224338313522335526232325233242135253233232541332232555115523226235224342
3122222217222324232624222222223321225332224232534232222263332124133223323372423232232232323532222335
4225424551444213224212142242222223144412221835322244212172424234252542222342221324214122243122232214
2222222122622526224323121232232327213442227213222232422733333322932521223242222252233233223222223233
2752213543665536363224772215216442226252421265322549434241522621585662222262342473622256232123357623
4742561446626522949634342232556825726438446112337734834126622526554223425312263227632342592641223621
6522722622332342417352334137242765314222222257225225543265322122722213226112322221362521162432432232
1232216433344223464234225263323443424639332248235443336434314242542342223253143324322323375542633442
2332222433423235112226133322221222322323335333322223432243233522221231243222122432234423142223333222
8346623364238313222533433253237321531122336338333384533312533224613321652242228553343226737233523363
3523212335323223346333243332731433343332343323313332323333323336324334322336343233142323143833463133
2533344453133545435522544334444484422432333833345213344423224344533649463445235323464213334444432535
2232222223212132222222422332222122222322222131221222222122422232331332222222612242322222122122341332
5435544235532353153433532323535626334353235362423312555315642363436543435476133334532665634634446555
2422846121282422271121331834181442532512187422234222112524321323531832312413562231232432423124224224
2242253132433722234242422323353423344422233333333233343232434342421333322222313543233322364253233321
3231212222231221332322116223234622214323225632543212222172524222216212212332242322222222215422222222
1332219213222228222122212211222121243212252231231322325212232212222121732422113222111252533211222223
2551223313212334612422253322624332261243225633621252651337252763227225223637764726732223325633233627
7565748484669687566955854485687447658654655567585956557585995964375756578785334555645566656486684788
3434446315332335533543333224441312354421334224433233434343434442233744612534435433533334134442443433
1215324233232232132225222213232412344232122124265432323222233232442222242114223133212436223323226321
3445333533345344534353644243435353242633656428344233583366345325544642543633443334455433223344434314
2221232132646833311484233323138343222232512222222432221272312232624352232233322261311133223813312422
3323434422323325432123333433132143433431733655737346533481334641344234255583575545344332461293234433
2233334227222322464524314353543333344232233342243333223224223343424322123232222321333633433334452242
4664565462545537443546234434352558545432564745534254435554331455953576472455554545348245774537754555
7737556654745365738662565794535544555556575656555555515955555565655565555575985456455456363646777556
2642753245137613432732134846875533662994438156236866252642382342534965364422637645473872443121443142
3223222312221242232321234344233712332221333321212221742111523232222122242213421314426722334223351422
1323211222222313422122121222123223211222123222122222112221212252222423224225222314353225553422222122
4332473232433326162172243633223223332224332244422425343242723222223522232242213142221325368441222222
8428454485743447379867345566293763545485353486593853675546747547875463955565456858836653552356675554
5463729624975247282233516424233646936239237142644699246625112854262522553735715844632334524122444521
3687766937534925235343136864454987855187349936738664835334353353385278546635975944743654653892855295
2233121323353132322214333433424233213434323232333232322483324323231322333232333423423222122543234222
5333563334435334546622433245234434323243137242245543442555285753434633155533462467313343365644753726
1435634532357443333333453333534442434533444133363566443432453442331246644633344445234453424423592336
5633256431464346334435333644336356335353344445365334743335333633474153333553233341334333335334654313
8445764652526564857256566655656366389656466413566835544843558567553256635564326965555667456453643676
2253222322232242225222132232322223322223225332222312412212222221212222233123321433222232242223121223
3333242343431333322334323344322431331333332333223233323332322524253333333333133333334334244432423423
3243452469464264144613444434434346642624434434695444433744423254447444224312333558442445354824462441
2239332154328432694683922222143324374314213622373512242432233355221512321222223353265153171361613222
6545546657346456255732775857474537765784465657474645744675517744343335754675576375444745377467477267
6575749497968787677786573563977667784666977887667677448651777559775897777778788655799677876567767888
8164686221344472152262448736342544334745661247474336732331282665563264452236862178234726623336273426
2342237325222223221322242623133323224334322142221225624346224168332331232341434256437434431321345622
6737463234333136533645757765732724354267353543633266355564463556323333765313461743277436573242475675
3333312222443232226522221412232696121322422131223223262422122213221332122226222536222243342312154214
3442345351252132242222326134123135342324425433132333225236333232232235333523611254223116323322325335
3834444981675454674844882948455447344738962684447946489296445998545486456345844384764435456635349744
3214324332332622322333321843422333422341322253342312223323232229143411313331545222134143533231133232
3222222222412221222222132222222331222122222212212123232212222122122332211222232222213111222223222323
5423624452366545233244474447744467574124426862442426644244522376446226345155356633442726673246714444
1662312384832223122923245622222223262962232227287352275252461111212432417722114222323826213264213422
3437334334437544344314442432423543435332442332434744343343445543343344334444343454331344246312444253
3545443534545464145443147544446344545433354534543543544534445555554247455545645545435254433335466656
3123313322652224444234432722233281125352434352223385222445322323255325225621321332233234345221224124
4226346149461534342553432755433246224463435332643444242552432352446244122334442224222422333234223426
8775668475557548386363683537358693553866459697758887343773765383848665588358857677636523888366777235
6213313236243233332323232324332322333232333632222312232332343632222231553322222541322422131335233333
4453353544364526544443424563436434474465444344635855544335958444645148459444344345464355744342345656
4743623386383134984833391896668312634374669755437353463947534256132475522224436732792433333454378333
6237742868675441246466452744544564443669443487584644635435764845477367464334364534655466734545643343
4162346234513621243155416613266334244435433634463465154263566453226412522646224544213432653545545789
5513225145544634793445377524525733625671536583922534554524276669342356536351435461322473424823323964
3234332243232326244623531212233234333321133232224234332221542242623255232234313115234312244366243432
2652223424254422415243552122622542421252954324322422424454221223438253242512222123333222272234262522
5224242264625224223232322222225322246412422322232226342422427422122221322242331421324221127223424344
3422233311222123622222224254222124313424922539642372232346223522942228624322224222312222223323265428
3463364143325237554363835323732473442347617532322563542374226233613427236227563263234122242667773243
3322223222254241226233522123221231346322313422542232212222242222122644533423222542225522214252222331
3232222224122221312211232222232222122221112221222221232222222322212142231222212222222222212122223212
4642423342322534262123323334252234643352323313325253215333523314142252214672233244223652432552343366
2252222322222122122212162322223222221222221212213122222222222122412321232222221622222162232248222312
4133333433323333332332343333333343233333333333396535233433233243446236324334343133322333343333333331
7646559666633747836769669667454625965276648676366554623267734574454634666335674564864776377457575853
1665533424626442216234563637363524233366636774654666326366454553643625836176543363333664467656982467
4452328622821524155333513332865221532432442533552363132655342433332562585454835313544228453415552255
3353543235532525335552215434533544435242544443251435353455553554244354533435533444452534585422355334
7663337332376646445233625652335745466255345731653443556316652455663253371536433943325555633326443533
4353443334644456633844675354583343429455535443444223457655433831438143373466713337349355945532553545
2221222222222223222222222342321233322212711221222212214224222232222222221222221422231212221214223222
4442862767513542535482123545524426462873542452555417515332745136374344628125313268495232526424927584
7276636348762573584477363432763446331615345683234422673464352855443243784271345667365366231448674587
7253922538238262444373564256248114222291642959945257321552431492252421441425535452385246117294265335
2223264122333331412353533222331322446225333222122236122242332226232321112213532242322232233222121213
1231221431413132332144321333322433141424131132343112221214214124234234112324142411113431143133156789
5255849544675744362666176553545572824528464659616463725488237352165466363351678343464252523252527465
5123323645635136244574357422144634727513432366322544257171311354515371311521336664243146254557255189
5533333853332313333333333333353343334333322333333243335333343333343212333233133253334373383333339323
2224242232221232336335322243214321171234353314223332222332234231243333332411322133332421131342123223
2244453632134133332321322273314131342233334323324444313143232423252335332353214322345541542329232525
3226354242231241335433422252252543125223124231241525225724213223242253754141345344343221412256212245
6232362816623332433465312335352353652123353232336253332462262333353335124563333633332335343322313564
6324523573236374624463454256733736277563737651278273526427372776666735143756227266239135463342536263
4161222182542321361232126223323295152124137223424983221233165622668492211312225333312625696225822312
7445346556624444421734323733469542464326424764643934353934436545733543424354442445544476526275334674
7466615176268554148782713446488565251134547865727331862283233752424644787678575482155781775668378539
3442223233335633352435329643541333324645236323333331353223244243142638443366334325436333253335331534
5362471576394774668557278682864526751346816453728348531946494395725673754922684553662163677558473545
7655989956344687357359499746266235781288737796545426447457269965637665939943267568224239392499766293
3232232333331323233332132233124322723223122333332332733343313322221334221223222233212235223362222231
3312334233122242323222322622332331231223243161535224343224434323133234433442263323524342322315422225
2344343424335335333372321133333332335323335342361233452512434343343353331862353354581633441338332433
3713363614325442314744622444153425532242285534373625512553222514523222545525265256424426546522346423
2232232242242632232242323223342332332227231221223224232223124123332333352332352224223233244333213232
2258545542545444454154422443349444327744523242425347455538434342532442235446471644244333231955475434
2323342233222225542222122421422252523321234422413144251131134261311422122223313153223122331442212354
2524234581534663331312433233221644362446432333343243634341224323823351242325122343224366333333454212
2242223251224131313356226332333433223333431225433132272222313446252122333442426482152231246411122232
3323233365333533361554332343145453324336232335633333334343363345123433243254424345325343253254235554
2263534142333284563562235323674324922731427323842134111548321642662442474548647245937328584537416362
3233416335422612223324222242225232823242333262522242223222222412434142212221831233231132121314223132
4221322232225352221113212224535231221433534325121752225242223454223232332112532261221342222311321122
2262363251149323633694933533353763369513633324333332926233133323323231433338332222234333435232133333
1231231234733314382318233222273268332243313331322232353333134322223332335726674223332433121223331863
4334234333323243243332534231232422222223641313434331321333233533342414314334542333243433333223223334
3333413433323122232323213323333323343334323423335224333322223322331353335213323332333333322322353333
3333356363142336373532132733235133662322112386315333368325332523323326225243533333752352343335362376
4621136344326146524661362233462336225596254541664139466849257424267258265532642442514624444342215627
5543236334532433455433443232473423344173432455533342332453331437344253443126424342764243564534235434
4323322222222125322221223332222232223223123222123322231222322223232222322211332423212212221222221122
3251323264248243431512228644434414222422442237357523322242624445452123363142158422452526443254313472

View File

@@ -0,0 +1,187 @@
415615768268371-416146851443768
191441934518457-197157487694725
283039808754572-287535623375734
112431539028123-113253150554096
459000186532687-459000186532687
355460558424727-357186873512401
176050787010595-176376661075302
205907361020423-210053551716902
171948784253876-172249538568913
416146851443768-416366973136841
494664842356557-498938802826258
531317371493763-531572274448825
287535623375735-287535623375735
445351700155545-451417143233758
428522662493415-430092814437936
525219000236682-525420506277202
4514613808282-6876225718377
426636817857490-427821734706006
498938802826259-500642536046775
416146851443768-416554458072074
441234246884209-441234246884209
423529738394776-424894326746801
112695579468250-113025005038338
322908721299457-330761811674666
153784463318453-158583249889231
417649117931435-417892805017077
111450840453798-112264446526036
304790151426917-304790151426917
40479108715501-41716132680135
529487466473303-529813098424489
39409252480917-39409252480917
240472324076104-240472324076104
275809301142610-280535548219710
525219000236682-525667338666494
177299959466504-177710060726324
161238592960013-168877902394349
514175089212359-518353956308952
119303260127076-119681463906475
175076857738638-175320179557299
533153559551782-539070733742023
44941662798905-46316126012040
429643301837850-431040928058994
530119741965952-530625948798408
44156315074854-45327762469673
225097232246005-227643450151513
421362005905278-421875491907854
124473380749853-129478235510959
83325855650473-86301927125864
228288879012543-230890475254573
359949275990403-361737252827579
427628274486259-428849647098379
182552303297392-189779897282507
41531324363037-42740451886724
358997416902511-360413145986590
544867956595126-551403823916994
246290329676433-249789969997045
174623491832057-175320179557299
425549691817345-426908275524567
422325482752386-423945096989080
453168512121827-459000186532686
292394131235521-299490647352145
176957916310506-177710060726324
466376217490394-468837786646318
554096236659234-554096236659234
93308785783969-99889371907684
119957892467354-120298423841226
385639356979811-391168939113343
61056686052409-61056686052409
353063351957422-354787557386607
119303260127076-119435108787057
419598036740253-420419737428864
462771186738855-471131182468684
72389723207854-74131961245639
317762876701596-319430625445430
114385450957460-115031663452960
223428073390965-225448530632444
377473079203322-379730376235894
313712319887997-317762876701595
12917808676670-16942320826975
43347489842162-44438036924163
154974067390161-158583249889231
116463199245981-116668380988510
119681463906475-119957892467354
114047230333429-114166005119686
114047230333429-114166005119686
524589153577448-524834784440447
527458512153067-527577102559875
32507572552739-39409252480917
405212467164362-409248761056539
354269175630971-356254670555776
486882052675822-491079880289648
50971547937007-59539706830117
420419737428864-420667110357446
421005210472551-421491718103292
61056686052410-65911721890352
304790151426918-309797918073113
47846939082450-48998323615960
45999800318085-47347617049792
174623491832057-174843660721450
382791492119538-388636524544931
175320179557299-175787649112784
544867956595125-544867956595125
372641324569598-377473079203320
421362005905278-421491718103292
251974796877959-256972824654449
417892805017077-418592322935958
367698185423713-371355348377511
116949222950859-117688181738524
161238592960013-167122161790591
23799090193613-28954486628478
184887351194217-187190465789699
554096236659234-560573752405736
74131961245641-78010586827986
405212467164362-405212467164362
256972824654449-256972824654449
325591063756488-327276146322891
275809301142610-275809301142610
176050787010595-176571874282822
173837782793230-174117950947581
395717915132729-400756266793440
46655433496664-48318361330390
525219000236682-525420506277202
433495413379218-441234246884209
48703913468089-50189759576539
474213584156866-481243979571568
263323683404161-270087496638810
221896888599664-223812562457568
335755675567806-341271643549427
528907320298429-529727484664247
417649117931435-417892805017077
504166794754615-511364889378453
21368510003328-25699736029961
215256166823245-215256166823245
415122760907861-415615768268371
529813098424489-530429389252290
539070733742025-541301106962391
226545101307920-229316368396047
292394131235521-295385785163637
113025005038338-113632949997314
445351700155545-451417143233758
242212273388146-246290329676431
508072487610395-511364889378453
93308785783969-95306757403600
1183329419271-8060935578618
347708201228065-347708201228065
174117950947581-174227156820818
203271279069604-205907361020422
483820332620875-489157313828269
145003238361997-146838877810518
523184886149829-523271889924340
357502828911083-359238402432563
194774122995579-200159149225495
345051918344095-347708201228065
104168933547362-106491119049179
111678017547959-112431539028123
145003238361997-146838877810518
42240611982566-43773218548761
356626458124290-358195383598067
104168933547362-104168933547362
179404884434293-180122715150323
50971547937007-59539706830117
418918183715758-419598036740253
113529849906606-114166005119686
129478235510960-129478235510960
335755675567806-341271643549427
114166005119686-114385450957460
528225789423393-528633026757079
364500145079918-371355348377511
132901865237987-140302150467741
414119138724096-414584075109225
528225789423393-528907320298429
86301927125865-89931631585287
135518794766964-140302150467741
113632949997314-114047230333429
421005210472551-421491718103292
430685667575684-432096042818423
420172189734963-420419737428864
112695579468250-113253150554096
215256166823246-218323369254813
171232592017102-171487589727253
116255828760783-116463199245981
424620845073712-425854252818395
514175089212359-519912511428490
352204580482739-353884921574376
231752950727931-240472324076103

142
src/plasl/2025/day7/input Normal file
View File

@@ -0,0 +1,142 @@
......................................................................S......................................................................
.............................................................................................................................................
......................................................................^......................................................................
.............................................................................................................................................
.....................................................................^.^.....................................................................
.............................................................................................................................................
....................................................................^.^.^....................................................................
.............................................................................................................................................
...................................................................^.....^...................................................................
.............................................................................................................................................
..................................................................^.^.^.^.^..................................................................
.............................................................................................................................................
.................................................................^.^...^...^.................................................................
.............................................................................................................................................
................................................................^.^.^.^.^.^.^................................................................
.............................................................................................................................................
...............................................................^.^.^.....^.^.^...............................................................
.............................................................................................................................................
..............................................................^.^.^.^...^.^.^.^..............................................................
.............................................................................................................................................
.............................................................^.^.^.^.......^.^.^.............................................................
.............................................................................................................................................
............................................................^.^.^...^.^...^.^.^.^............................................................
.............................................................................................................................................
...........................................................^.^.^...^.^...^.^.^.^.^...........................................................
.............................................................................................................................................
..........................................................^...^.....^.^.^.^.^.^...^..........................................................
.............................................................................................................................................
.........................................................^.^.......^.^...^.^.^...^.^.........................................................
.............................................................................................................................................
........................................................^.^.^.^.^...^.....^.^.....^.^........................................................
.............................................................................................................................................
.......................................................^.^.^.^.^.^...^.^.....^.^...^.^.......................................................
.............................................................................................................................................
......................................................^.^.^...^...^...^...^.^.^.^.^.^.^......................................................
.............................................................................................................................................
.....................................................^.^...^...^...^.^.^.^.^.^...^.^...^.....................................................
.............................................................................................................................................
....................................................^.^.^.....^.^.........^...^.^.^.....^....................................................
.............................................................................................................................................
...................................................^...^.^.^.....^.^.^...^...^.....^.^.^.^...................................................
.............................................................................................................................................
..................................................^.^.^.^.^.^.^...^.^.^...^...^.......^...^..................................................
.............................................................................................................................................
.................................................^...^.....^.^.^.^.....^.^...^.....^.^.^...^.................................................
.............................................................................................................................................
................................................^...^.....^.^.^.^.^.^.^.^.^.^.............^.^................................................
.............................................................................................................................................
...............................................^.^.^.....^.^.....^.^.^.^.^.....^.....^...^.^.^...............................................
.............................................................................................................................................
..............................................^...^.^.^.^.^.^.^.^.^.^.^.^.^.....^...^.^.^.^...^..............................................
.............................................................................................................................................
.............................................^.^.^...^.^.^...^...^.^.^.....^...^.....^.^.^...^.^.............................................
.............................................................................................................................................
............................................^.^.......^.^.^.^.....^.......^.^.^...^.^.........^.^............................................
.............................................................................................................................................
...........................................^...^...^...^...^.^.........^.^...^.^.....^.....^.^.^.^...........................................
.............................................................................................................................................
..........................................^...^.^...^.^.^.^.^...^.^.^.^.^.^.....^...^...^.^.^.^.^.^..........................................
.............................................................................................................................................
.........................................^.^...^.^...^.^.....^.^.......^.^.....^.^.^.^.^.^...^.^.^.^.........................................
.............................................................................................................................................
........................................^.^...^.^...^.^.......^.......^.^.^.^.^.^.^.......^.^.^...^.^........................................
.............................................................................................................................................
.......................................^.^.^...^.^...^.^...^.^...^.....^.^.^...^.......^...^.^.^.^.^.^.......................................
.............................................................................................................................................
......................................^.....^.^.....^.....^...^...^.^.^...^.^.^.^.....^.^.^...^.^.^...^......................................
.............................................................................................................................................
.....................................^.^.....^.^.^...^.....^.^.^.^...^.^.......^.^...^.^.^...^.^.^.^.^.^.....................................
.............................................................................................................................................
....................................^.^.^.^...^.......^.^...^...^.....^...^...^.^...^.^.^.......^.^.^...^....................................
.............................................................................................................................................
...................................^.^.....^.....^.^.^.^.^.^...^.^.^.^.^.^.....^.^...^.^...^.^.^...^.....^...................................
.............................................................................................................................................
..................................^...^...^.^.^...^.^.^.....^.^.^.....^.^.^.^.^.^.^.^.......^.^...^.^.^.^.^..................................
.............................................................................................................................................
.................................^.^...^.^.^.^.^...^.^...^.^.^.^.......^.^.^.^.^...^...^.^.^.^.^.^.^.......^.................................
.............................................................................................................................................
................................^...^.^.^...^.^.^.^.^...^.^.^...^...^.^...^.^.......^.^.^.^.^.....^.^.^.^.^.^................................
.............................................................................................................................................
...............................^.^.^.^.^...^.^.^.....^.^...^...^.^...^.^.^.^.^...^.^.^.^.^...^.^.^.^.^.^.^.^.^...............................
.............................................................................................................................................
..............................^.^.^.....^...^.^.^.^...^...^.^.^.^.^.^.^...^.^.^.......^...^.^.^.^.^.^...^.^.^.^..............................
.............................................................................................................................................
.............................^.....^.^...^.^.^.^...^.^.^.^...^...^...^.^.^.^.....^.^.......^...^.^...^.^.^.^...^.............................
.............................................................................................................................................
............................^.^.^...^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^...^.^.^.^.^.^.......^.^.^...^.^...^.....^............................
.............................................................................................................................................
...........................^.^...^...^...^.^.^.^...^.....^...^.^.^.^.^.^.^...^.......^.^.^.^.^...^...^.......^.^.^...........................
.............................................................................................................................................
..........................^.....^...^.^.^.....^.^.^...^...^...^.....^...^...^.^.^.^.^.^.^.^.^.....^...^.^.^.......^..........................
.............................................................................................................................................
.........................^.^.^...^.^.....^.^...^.^.^...^.....^.^.^.^.....^...^...^.^.^...^.^...^.....^.^.^.^.....^.^.........................
.............................................................................................................................................
........................^...^.^.^.^.^.......^.^.^.......^.^.^...^.^.....^.^.^.^.^...^.^.^.......^.^.^.........^.^.^.^........................
.............................................................................................................................................
.......................^.^.^.^.^.....^.^...^.^.^...^.^.^.^...^.^...^...^...^.....^.^.^.^...^.^.^.^...^.......^.^.^.^.^.......................
.............................................................................................................................................
......................^.^.^.^.^.^.....^.^.......^.^.^...^.^.^.^.^.^...^.^.^.^...^.^...^...^.......^.^.^.^...^.^.^.^...^......................
.............................................................................................................................................
.....................^.^.^.^...^.^.^.^.^.^.^...^...^.^.^.....^.^.^...^.^.^.....^.^.^.....^...^.^.^.^.^.^.^.^.^.^...^...^.....................
.............................................................................................................................................
....................^.^...^.^.^.^...^...^.........^.^...^...^...^...^.^...^.^.^...^...^...^...^.^.^.^.^.^.^...^.^.^.....^....................
.............................................................................................................................................
...................^.^.^...^...^...^.^.^...^.^.^...^.....^.^.^.^.....^.^...^...^.^...^...^.^.^.^.^.^...^.^.^.^...^.....^.^...................
.............................................................................................................................................
..................^.^.......^.^.^...^.^.^...^.^.....^.^.^.^.^.^.^.^.....^...^.^.^.........^.............^.......^...^.^.^.^..................
.............................................................................................................................................
.................^.^.........^...^.^.......^.^.^.^.^.^.^.^.^...^.....^.^.^.^.........^.^.^.^.^.....^...^...^.^.^.^.^...^...^.................
.............................................................................................................................................
................^.^.^...^.^.^.....^.^.^...^.^.^.^...^...^.^...^.^.^.^.^.^...^.^...^.^.^.....^...^.^...^...^.^...^.^.^.....^.^................
.............................................................................................................................................
...............^.^.^.^.^.^.^.^.....^...^.^.^.^.^...^.........^.^.^.^...^.^.^.....^...^...^.^.^.^.^.^.^.^.^.^...^...^.^.^.^.^.^...............
.............................................................................................................................................
..............^.^.^...^.^.^.^...^.^...^.^.^.^.^.^.^.^.^.^...^.^...^.....^.^...^.............^.^...^.^.^.^.^...^.^.^.^.....^.^.^..............
.............................................................................................................................................
.............^.^.^.^.....^...^...^.....^.^...^...^.......^...^...^.^...^...^.^.^.^.^.^.^.^.^.....^.^.^.^.^.^.^...^...^.^.^.....^.............
.............................................................................................................................................
............^...^.^.^.^.^...^...^.^.^.....^.^.^.^...^.^...^...^...^...^.^.......^.^.^.....^...^...^.^.^.^.^.^.......^.^.^...^.^.^............
.............................................................................................................................................
...........^.^.^.^.^.^.^.^...^.^...^.^.^.^.^.......^.^.^...^.^.^.^.^.^.^.^...^.^...^.........^.^.^.^.....^...^.^...^.^.^.^.....^.^...........
.............................................................................................................................................
..........^.....^.^.^.....^.....^.....^.^.^.^.^.^.^.^.^.....^.^.^.^.^...^.^.^...^.......^.^...^...^...^.....^...^.^.^.^.^.^.^.^.^.^..........
.............................................................................................................................................
.........^...^...^.^.^.....^.^.^.^.^.^...^...^...^...^.......^.^.^.^.^.^.^...^.^.^.^.^.^.........^...^.^.^...^.^.....^.^.^.^.^.....^.........
.............................................................................................................................................
........^.^.....^.^.^.^...^.^.^.^...^.^.^.^.^.^...^.^.^...^.^.^.^...^...^...^.........^.^.^.^.^.....^.^.^...^.^.^.^.^...^...^.^.^...^........
.............................................................................................................................................
.......^.^.^.^.^.^.^.......^.^.........^.^.^.^.^.^.^.^.^.^.^...^...^.^...^...^...^...^...^.^.....^...^...^...^.^.^.....^...^...^.....^.......
.............................................................................................................................................
......^.^.^...^.^.^.^.^.^.^.......^.^.^.^.^.^.^.^.....^.....^.....^.^.^.^.^.^.^.^...^.^.^.^.^.^...^.^.^.......^.^.....^.^.^.^.....^.^.^......
.............................................................................................................................................
.....^...^.^.^.^.....^...^...^.....^.^.^.^.^.^.^.....^.^.^...^...^.^.^.^.^.^...^...^.^.^.^.....^.^.^.^...^.....^.^...^...^.^...^.^.^.^.^.....
.............................................................................................................................................
....^.^.^...^.^.^.^.^.^...^...^.^.^.^.^...^.^.^.^...^...^.^...^.^.^...^.^.^.^.^.^.....^.^.^.^.^.^.....^...^.^.^.^.^...^.......^...^.....^....
.............................................................................................................................................
...^.^.^.....^.^.^.^.^.....^...^.....^...^.^.^.^.^...^...^.^.^.^.^.^.^...^.^.^...^.^.^.....^.....^...^.^.^.^.^...^.^...^...^.^...^.^.^.^.^...
.............................................................................................................................................
..^.^.......^.^.^.^...^...^.^.....^.^.^.^.^.^...^.^.....^...^.^.....^.^...^.^.^...^...^.^.^.^.....^.^.^...^...^...^.^.^.^...^.^.^...^.^...^..
.............................................................................................................................................
.^.^...^.^.^...^...^...^.^.....^.^.....^.^.^.^...^.....^.^.^.^...^.^.^.^.^.^...^.^.^.....^.^.^.^.^.^.^...^.^.^.^.....^.^.^.^.^.^.^.^.....^.^.
.............................................................................................................................................

View File

@@ -0,0 +1,16 @@
.......S.......
...............
.......^.......
...............
......^.^......
...............
.....^.^.^.....
...............
....^.^...^....
...............
...^.^...^.^...
...............
..^...^.....^..
...............
.^.^.^.^.^...^.
...............

View File

@@ -0,0 +1,148 @@
i64 write(i32, ptr i8, u64) {
`scsbsa`
syscall3(i64(1), `la` as i64, `lb` as i64, `lc` as i64)
}
i64 read(i32, ptr i8, u64) {
`scsbsa`
syscall3(i64(0), `la` as i64, `lb` as i64, `lc` as i64)
}
i32 open(ptr i8, i32, i32) {
`scsbsa`
syscall3(i64(2), `la` as i64, `lb` as i64, `lc` as i64)
as i32
}
void exit(i32) {
as i64 i64(231) rev
syscall1 trash
}
void putc(i8) {
array i8[1] `dstr` store
write(1, `lt`, u64(1)) trash
}
u64 strlen(ptr i8) {
dup while(dup load i8(0) !=) { 1+ } `r-`
}
void print(ptr i8) {
1 rev dup strlen write trash
}
void println(ptr i8) {
print i8(10) putc
}
void printnum(i32) {
if (dup 0 ==) {
putc('0')
} else if (dup 0 <) {
`0r-` '-' putc
}
array i8[11] 10+ dup i8(0) store -1+ `sb`
while (dup 0 !=) {
10 divmod 48+ as i8
`lb` rev store
`lb` -1+ `sb`
} trash
print(`lb`1+)
}
void printnum64(u64) {
if (dup u64(0) ==) {
putc('0')
}
array i8[22] 22+ dup i8(0) store -1+ `sb`
while (dup u64(0) !=) {
u64(10) divmod u64(48)+ as i8
`lb` rev store
`lb` -1+ `sb`
} trash
print(`lb`1+)
}
i32 atoi(ptr i8) {
set string
0
while (get string load '0' >= get string load '9' <= &) {
10* get string load '0'- as i32 +
get string 1+ set string
}
}
u64 atol(ptr i8) {
set string
u64(0)
while (get string load '0' >= get string load '9' <= &) {
u64(10)* get string load '0'- as u64 +
get string 1+ set string
}
}
i32 abs(i32) {
if (dup 0 <) {`0r-`}
}
void _start() {
open("input", 0, 0) set file
array i8[65535] set buffer
get buffer i8(48) store
read(get file, get buffer, u64(65535)) as i32 set size
#get buffer get size+ i8(10) store
`0si`
`0sw`
u64(0) set out
array u1[256] set beams
while (`li` 256 < ) {
beams[`li`] u1(0) store
inc(i)
}
`0si`
while (`li` get size < ) {
if (buffer[get i] load 'S' ==) {
beams[`lw`] u1(1) store
inc(w)
} else if (buffer[get i] load '^' ==) {
if (beams[`lw`] load) {
beams[`lw1-`] u1(1) store beams[`lw`] u1(0) store beams[`lw1+`] u1(1) store
inc(out)
}
inc(w)
} else if (buffer[get i] load '.' == ){
inc(w)
} else {
`0sw`
}
inc(i)
}
println("answer:")
get out printnum64 i8(10) putc
exit(0)
}
void main() {
_start
}

View File

@@ -0,0 +1,166 @@
i64 write(i32, ptr i8, u64) {
`scsbsa`
syscall3(i64(1), `la` as i64, `lb` as i64, `lc` as i64)
}
i64 read(i32, ptr i8, u64) {
`scsbsa`
syscall3(i64(0), `la` as i64, `lb` as i64, `lc` as i64)
}
i32 open(ptr i8, i32, i32) {
`scsbsa`
syscall3(i64(2), `la` as i64, `lb` as i64, `lc` as i64)
as i32
}
void exit(i32) {
as i64 i64(231) rev
syscall1 trash
}
void putc(i8) {
array i8[1] `dstr` store
write(1, `lt`, u64(1)) trash
}
u64 strlen(ptr i8) {
dup while(dup load i8(0) !=) { 1+ } `r-`
}
void print(ptr i8) {
1 rev dup strlen write trash
}
void println(ptr i8) {
print i8(10) putc
}
void printnum(i32) {
if (dup 0 ==) {
putc('0')
} else if (dup 0 <) {
`0r-` '-' putc
}
array i8[11] 10+ dup i8(0) store -1+ `sb`
while (dup 0 !=) {
10 divmod 48+ as i8
`lb` rev store
`lb` -1+ `sb`
} trash
print(`lb`1+)
}
void printnum64(u64) {
if (dup u64(0) ==) {
putc('0')
}
array i8[22] 22+ dup i8(0) store -1+ `sb`
while (dup u64(0) !=) {
u64(10) divmod u64(48)+ as i8
`lb` rev store
`lb` -1+ `sb`
} trash
print(`lb`1+)
}
i32 atoi(ptr i8) {
set string
0
while (get string load '0' >= get string load '9' <= &) {
10* get string load '0'- as i32 +
get string 1+ set string
}
}
u64 atol(ptr i8) {
set string
u64(0)
while (get string load '0' >= get string load '9' <= &) {
u64(10)* get string load '0'- as u64 +
get string 1+ set string
}
}
i32 abs(i32) {
if (dup 0 <) {`0r-`}
}
ptr i8 memset(ptr i8, i32, u64) {
`sn` as i8 `sc`
u64(0) `si`
while (`liln` < ) {
`1+dlc` store
inc(i)
}
}
void _start() {
open("input", 0, 0) set file
array i8[65535] set buffer
get buffer i8(48) store
read(get file, get buffer, u64(65535)) as i32 set size
#get buffer get size+ i8(10) store
`0si`
`0sw`
array u64[256] set beams
while (`li` 256 < ) {
beams[`li`] u64(0) store
inc(i)
}
`0si`
while (`li` get size < ) {
if (buffer[get i] load 'S' ==) {
beams[`lw`] u64(1) store
inc(w)
} else if (buffer[get i] load '^' ==) {
if (beams[`lw`] load u64(0) >) {
beams[`lw`] `d` load `s1` u64(0) store
beams[`lw1-`] `d` load `l1+` store
beams[`lw1+`] `d` load `l1+` store
}
inc(w)
} else if (buffer[get i] load '.' == ){
inc(w)
} else {
`0sw`
}
inc(i)
}
u64(0) set out
`0si`
while (`li` 256 < ) {
beams[`li`] load
get out + set out
inc(i)
}
println("answer:")
get out printnum64 i8(10) putc
exit(0)
}
void main() {
_start
}

View File

@@ -120,9 +120,9 @@ u1 check_line(i32, i32, i32, ptr i32, ptr i32, ptr i32, i32) {
# swap if needed
if (get top get bottom <) {get top get bottom set top set bottom}
printnum(get pos) ']' putc
printnum(get top) ',' putc
printnum(get bottom) i8(10) putc
#printnum(get pos) ']' putc
#printnum(get top) ',' putc
#printnum(get bottom) i8(10) putc
`0si`
while (`li` get linecount <) {
@@ -139,7 +139,7 @@ u1 check_line(i32, i32, i32, ptr i32, ptr i32, ptr i32, i32) {
if (get top linep[`li`] load >= get bottom linep[`li`] load <= & # this line is positioned between
lineh[`li`] load get pos >= linel[`li`] load get pos <= & # it intersects
&) {
println("intersect")
#println("intersect")
return u1(0)
}
inc(i)
@@ -308,9 +308,9 @@ void _start() {
px[`lj`] load set x2 py[`lj`] load set y2
i8(10) putc
printnum(get x1) ',' putc printnum(get y1) i8(10) putc
printnum(get x2) ',' putc printnum(get y2) i8(10) putc
#i8(10) putc
#printnum(get x1) ',' putc printnum(get y1) i8(10) putc
#printnum(get x2) ',' putc printnum(get y2) i8(10) putc
if (check_line(get x1, get x2, get y1, get vlinel, get vlineh, get vlinep, get vlinec)
check_line(get x1, get x2, get y2, get vlinel, get vlineh, get vlinep, get vlinec) &
@@ -318,10 +318,10 @@ void _start() {
check_line(get y1, get y2, get x2, get hlinel, get hlineh, get hlinep, get hlinec) & ) {
println("okay")
#println("okay")
if (abs(get x1 get x2 -) `1+` as u64 abs(get y1 get y2 -) `1+` as u64 * `lo` > ) {
println("max")
#println("max")
abs(get x1 get x2 -) `1+` as u64 abs(get y1 get y2 -) `1+` as u64 * `so`
#if (`lo` u64(25) == ) {exit(2)}