tvl-depot/users/sterni/exercises/aoc/2022/20/20.bqn

14 lines
469 B
BQN
Raw Normal View History

ReadDec •Import "../../lib.bqn"
enc ReadDec¨ •FLines "input"
CoordSum +´(100020003000((|+((/=0)))))
Mix {
M {m 𝕊 i:
l m
i {n (l-1)|(𝕩m)+/𝕩=𝕨 (n(𝕩)n) 𝕩(/)𝕨}˜´ l
}
CoordSum ((M𝕨)) 𝕩
}
•Out "day20.1: "•Fmt 1 Mix enc
•Out "day20.2: "•Fmt 10 Mix 811589153×enc