首页 > 其他 > 详细

HDU 1846 Brave Game (博弈水题)

时间:2016-05-25 00:07:00      阅读:187      评论:0      收藏:0      [点我收藏+]

题意:中文。。。你们懂得。

析:这个就是一个水题博弈,就是一个巴什博弈定理,直接就没有变,如果你们看过我写的那个,这个题绝对水过。

附地址:http://www.cnblogs.com/dwtfukgv/p/5517818.html

看完后就懂了吧,不用说了,直接上代码就OK。

代码如下:

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cstdio>

using namespace std;

int main(){
    int n, m, T;  cin >> T;
    while(T--){
        scanf("%d %d", &n, &m);
        if(n % (m+1) != 0)  puts("first");
        else  puts("second");
    }
    return 0;
}

 

http://www.cnblogs.com/dwtfukgv/p/5517818.html

HDU 1846 Brave Game (博弈水题)

原文:http://www.cnblogs.com/dwtfukgv/p/5525402.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!