标签:
2 1000 1 1 100
Lose Win
基础博弈,如果是TT先动,接下来是两人来回取m+1,n%(m+1)为零的话则可以赢,否则输了
/* Author: 2486 Memory: 232 KB Time: 4 MS Language: C/C++ Result: Accepted */ #include <cstdio> #include <cstring> #include <algorithm> using namespace std; int n,m,T; int main() { scanf("%d",&T); while(T--) { scanf("%d%d",&n,&m); m++; printf("%s\n",(n%m)?"Win":"Lose"); } return 0; }
版权声明:本文为博主原创文章,未经博主允许不得转载。
标签:
原文地址:http://blog.csdn.net/qq_18661257/article/details/47251251