0
Rendezvous palace optimization
Introduction
This comes from a well-liked question on the Math SE by RobAu and a more specific follow-up to that by Danikov.
There is a palace which is a grid of n × n rooms, which we will index using two coordinates 0 ≤ x,y < n. The rooms are organized in a toru...