Add day 3 solution in J.
This commit is contained in:
5
day3.ijs
Normal file
5
day3.ijs
Normal file
@@ -0,0 +1,5 @@
|
||||
r =: > cutopen 1!:1 < jpath '~/projects/AoC/2020/year2020day3.txt.cache'
|
||||
rn =: 4 : '+/''#''=((#|:y)|x*i.#y){"0 1 y'
|
||||
rnx =: 3 : '(1{y) rn 0{"2((0{-y)]\r)'
|
||||
rnx 1 3
|
||||
*/ rnx"1 (_2 [\ 1 1 1 3 1 5 1 7 2 1)
|
||||
Viittaa uudesa ongelmassa
Block a user