This is my solution to the problem Guessing Game in EGOI 2023, with
In my solution, Anna gives information to Bertil in phases, where the first
In the first phase, Anna just writes
Designing the code is the hardest part of this solution. My solution was to encode whether each house was part of the first phase as either
There have been some discussions regarding the solution over at https://codeforces.com/blog/entry/118430