Codeforces Round 313 (Div. 1) C. Gerald and Giant Chess Hints: Gerald and Giant Chess Editorial: Gerald and Giant Chess Code: Gerald and Giant Chess