【HDU1846】Brave Game(博弈论)

题面

HDU

题解

\(Bash\ Game\)模板题

#include<iostream>
using namespace std;
int T,n,m;
int main()
{
    ios::sync_with_stdio(false);
    cin>>T;
    while(T--)
    {
        cin>>n>>m;
        if(n%(m+1))cout<<"first"<<endl;
        else cout<<"second"<<endl;
    }
    return 0;
}

猜你喜欢

转载自www.cnblogs.com/cjyyb/p/9483571.html