Vasya and Chess CodeForces - 493D 博弈

通过举例n=4,n=5 猜测奇数的,白色都可以赢,并且第一步都向右走,使得地图变成偶数,相当于偶数的n,而黑色成了先手。同时发现n为奇数时后手肯定赢
#include <map>
#include <cstring>
#include <string>
#include <iomanip>
#include <algorithm>
#include <iostream>
#include <queue>
using namespace std;

int main()
{
    int n;
    while(cin>>n)
    {
        if(n%2==0) 
        {
            cout<<"white"<<endl<<1<<" "<<2<<endl;
        }
        else cout<<"black"<<endl;
    }
}

posted @ 2018-03-01 15:38  LandingGuys  阅读(129)  评论(0)    收藏  举报