HDU 1846.Brave Game-巴什博奕

传送门:一篇写的不错的博弈博客

 

 

HDU.1846

 

代码:

 1 #include<iostream>
 2 #include<cstring>
 3 #include<cstdio>
 4 #include<cmath>
 5 using namespace std;
 6 int main(){
 7     int t;
 8     scanf("%d",&t);
 9     while(t--){
10         int n,m;
11         scanf("%d%d",&n,&m);
12         if(n%(m+1)==0)printf("second\n");
13         else printf("first\n");
14     }
15     return 0;
16 }

 

 

 

 

 

这篇博客的目的就是为了保存那篇传送的博客。。。

 

posted @ 2018-02-12 21:42  ZERO-  阅读(164)  评论(0编辑  收藏  举报