//这题是很简单的博弈论
//分析一两个数据你就发现这个博弈的一个规律
//当n%(m+1)==0时,second赢,否则first赢
#include <iostream>
using namespace std;
int main()
{
int n,m;
int t;
cin>>t;
while(t--)
{
cin>>n>>m;
if(n%(m+1)==0)
{
cout<<"second"<<endl;
}
else
{
cout<<"first"<<endl;
}
}
return 0;
}
hdu1846(博弈)
最新推荐文章于 2021-07-21 10:45:01 发布