4 ms·
My day 22 solution runs in <10ms: https://github.com/orlp/aoc2021/blob/master/src/bin/day22.rs https://github.com/orlp/aoc2021/blob/master/src/bin/day22.rs The
by orlp 4y ago
My day 22 solution runs in <10ms: https://github.com/orlp/aoc2021/blob/master/src/bin/day22.rs https://github.com/orlp/aoc2021/blob/master/src/bin/day22.rs
The trick I used was to represent signed volumes, compute the intersection and then store the 'negative cube' instead of splitting up cubes.