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

12
2018/day03/day03.dyalog Normal file
View file

@ -0,0 +1,12 @@
⎕IO←0
x←⊃⎕nget'input.txt'1
x←⍎¨¨'\d+'⎕S'&'¨x
⍝ Part 1
claims←{id x y w h←⍵ ⋄ (x+w)∘.,y+h}¨x
fabric←1000 10000
{fabric[⍵]+←1}¨claims
+/,1<fabric
⍝ Part 2
⊃⊃x/⍨{∧/,1=fabric[⍵]}¨claims