Rosetta Problems

Three Traffic Lights

https://atcoder.jp/contests/agc050/tasks/agc050_e