Add J solution for day 5.

This commit is contained in:
Danila Fedorin 2020-12-23 22:40:42 -08:00
parent 4e8b636d2f
commit 3d85144065

4
day5.ijs Normal file
View File

@ -0,0 +1,4 @@
bs2n =: 3 : '+/ "1(|.*/\(1,(_1+#y)$2)) *"(1) 0 "."0 y'
ns =: bs2n "1 'F0B1L0R1' charsub > cutopen 1!:1 < jpath '~/projects/AoC/2020/year2020day5.txt.cache'
>./ns
(<./ns)+I.-.((<./ns)+i.#ns)e.ns