这道题我一看啊有木有!!!!红果果的威佐夫博弈啊有木有!!!!!!敲了个威佐夫上去啊有木有!!!!!!WA到没朋友啊有木有!!!!!!!
后来读了读题,尼玛只能移动一格啊有木有!!!!!!坑死我了啊有木有!!!!
读完题觉得能打P\N表啊有木有!!!然后屁颠屁颠去打表去了啊有木有!!!!!打完表MLE了啊有木有啊有木有!!!!
我想是不是应该把int类型的数组改成bool型的,结果白扯啊有木有!!!!最后一看要求大小,1000K专门卡大小的啊有木有啊有木有?!!!!!!!!!
好吧最后只能找规律了。。。
//HDU-2147.cpp #include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <ctime> #include <climits> #include <cctype> #include <algorithm> #include <iostream> #include <string> #include <stack> #include <map> #include <set> #include <queue> #include <utility> #include <vector> #include <bitset> #include <functional> using namespace std; //const double pai = acos(-1.0); const double pai = 3.14159265358979323846; const int INF = 0x3f3f3f3f; typedef long long love_live; // bool arr[2001][2001]; // void init(){ // int i, j, k = 0; // for(i = 2000; i >= 1; --i){ // arr[i][1] = k; // k ^= 1; // } // k = 0; // for(i = 1; i <= 2000; ++i){ // arr[2000][i] = k; // k ^= 1; // } // for(i = 1999; i >= 1; --i){ // for(j = 2; j <= 2000; ++j){ // if(arr[i][j - 1] == 0 || arr[i + 1][j - 1] == 0 || arr[i + 1][j] == 0){ // arr[i][j] = 1; // } // else{ // arr[i][j] = 0; // } // } // } // // for(i = 1990; i <= 2000; i++){ // // for(j = 1; j <= 10; j++){ // // cout << arr[i][j] << " "; // // } // // cout << endl; // // } // } int main(int argc, char const *argv[]) { #ifndef ONLINE_JUDGE // freopen("output", "w", stdout); freopen("input", "r", stdin); #endif // init(); int n, m, i, j, k; while(scanf("%d %d", &n, &m) != EOF){ if(n == 0 && m == 0){ break; } // n = 2000 - n - 1; // if(arr[n][m] == 1){ // printf("Wonderful!\n"); // } // else{ // printf("What a pity!\n"); // } if(m == 0 || n == 0){ if(m % 2 != n % 2){ printf("What a pity!\n"); } else{ printf("Wonderful!\n"); } continue; } else{ if(m % 2 == 1 && n % 2 == 1){ printf("What a pity!\n"); } else{ printf("Wonderful!\n"); } } } return 0; }