Portal: Click to open link
Main topic:
to a n*n board. Then the white team's Queen at the beginning (queen), the Black team's (1,n).
The rest of the points are green pieces.
The Queen can go both vertically and diagonally. (It's queen in chess, but it has to be eaten).
Ask White to go first. Who can win (die if you don't have to go or get eaten)
Problem Solving Ideas:
Game problem: Habitual random guess is over. Write faster than A.
Guess the method is as follows: Each step of each person, can make the total parity of the same. Then just know the parity of the first distance. I knew who was going to die first. (Do not spray)
#include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include < Cstring>using namespace Std;int Main () { int n; CIN >> N; if (n&1) printf ("black\n"); else printf ("white\n1 2\n"); return 0;}
Codeforces 493D Vasya and Chess (game?) )