题意:​​http://acm.hdu.edu.cn/showproblem.php?pid=2147​

找出必胜点,必败点的分布规律,很快求解了。

hdu 2147 kiki

这应该是在hdu中到目前为止写的最短的代码了。。

#include <iostream>
#include<cstdio>
using namespace std;

int main()
{
int n,m;
while(cin>>n>>m&&n&&m){
if(n%2&&m%2)printf("What a pity!\n");
else printf("Wonderful!\n");
}
return 0;
}