559c专题

【Codeforces Round #313 (Div. 1) C】 CodeForces 559C Gerald and Giant Chess

Description Giant chess is quite common in Geraldion. We will not delve into the rules of the game, we’ll just say that the game takes place on an h × w field, and it is painted in two colors, but