标签:http eof show return log int pid turn print
如图
找必胜点和必败点,
1.终点为必胜点
2.所有能一步走到必胜点的都是必败点
3.每一步都只能走到必败点的是必胜点
#include<bits/stdc++.h> using namespace std; int main() { int i,j,m,n; while(scanf("%d%d",&n,&m)!=EOF) { if(m==0&&n==0)break; if(m%2==1&&n%2==1) printf("What a pity!\n"); else printf("Wonderful!\n"); } return 0; }
标签:http eof show return log int pid turn print
原文地址:http://www.cnblogs.com/benTuTuT/p/6567377.html