adventofcode2022/day08/sol.ivy

18 lines
317 B
XML

) get "input.ivy"
sample = 5 5 rho 3 0 3 7 3 2 5 5 1 2 6 5 3 3 2 3 3 5 4 9 3 5 3 9 0
op visible r =
r = -1, r
r = transp max\ transp r
r = r > -1 flip r
1 drop r
op vis2 m = (visible m) or (flip visible flip m)
op vis4 m = (vis2 m) or (transp vis2 transp m)
sample
+/, vis4 sample
+/, vis4 input