/*话说是最水的博弈题- -,刚刚学习
Bash Game,即 n = (m+1)*r + s 其中s<=m
即如果s = 0,(n%(m+1)==0)那么是先手败。
否则先手胜
*/
#include<iostream>
using namespace std;
int main()
{
int n,m,t;
cin>>t;
while(t--)
{
cin>>n>>m;
if (n%(m+1)!=0)
cout<<"first"<<endl;
else cout<<"second"<<endl;
}
return 0;
}
HDU-1846:Brave Game
最新推荐文章于 2021-10-04 18:47:39 发布