http://acm.hdu.edu.cn/showproblem.php?pid=1846
最简单的博弈论
#include<iostream>
#include<cmath>
#include<string>
#include<algorithm>
#include<cstring>
#include<cstdio>
using namespace std;
int main()
{
int C;
cin>>C;
while(C--)
{
int n,m;
cin>>n>>m;
if(n%(m+1)==0)
{
cout<<"second"<<endl;
}
else
{
cout<<"first"<<endl;
}
}
return 0;
}