Initial commit

This commit is contained in:
Dimitri Lozeve 2024-11-12 21:43:32 +01:00
commit f242d2b0df
420 changed files with 62521 additions and 0 deletions

5
2019/day02/day02.dyalog Normal file
View file

@ -0,0 +1,5 @@
⎕io←0
p←⍎¨','(≠⊆⊢)⊃⊃⎕nget'input.txt'1
f←{i←0 ⊣ s[1 2]←⍵ ⊣ s←p ⋄ ⊃s⊣{i+←4 ⊣ a x y z←s[i+4] ⋄ s[z]←(a-1)⌷s[x](+,×)s[y]}⍣{99=i⌷s}0}
f 12 2 ⍝ part 1
nv←1+,99 99 ⋄ +/100 1×⊃nv[(19690720=f¨nv)1] ⍝ part 2