题意:中文。。。你们懂得。
析:这个就是一个水题博弈,就是一个巴什博弈定理,直接就没有变,如果你们看过我写的那个,这个题绝对水过。
附地址:http://www.cnblogs.com/dwtfukgv/p/5517818.html
看完后就懂了吧,不用说了,直接上代码就OK。
代码如下:
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cstdio>
using namespace std;
int main(){
int n, m, T; cin >> T;
while(T--){
scanf("%d %d", &n, &m);
if(n % (m+1) != 0) puts("first");
else puts("second");
}
return 0;
}
http://www.cnblogs.com/dwtfukgv/p/5517818.html
浙公网安备 33010602011771号