HDU 1846 Brave Game (博弈水题)
题意:中文。。。你们懂得。
析:这个就是一个水题博弈,就是一个巴什博弈定理,直接就没有变,如果你们看过我写的那个,这个题绝对水过。
附地址: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 (博弈水题)的更多相关文章
- hdu 1846 Brave Game (博弈)
Brave Game Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total ...
- HDU.1846 Brave Game (博弈论 巴什博弈)
HDU.1846 Brave Game (博弈论 巴什博弈) 题意分析 巴什博奕裸题 博弈论快速入门 代码总览 include <bits/stdc++.h> using namespac ...
- HDU 5578 Friendship of Frog 水题
Friendship of Frog Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.ph ...
- HDU 5590 ZYB's Biology 水题
ZYB's Biology Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid ...
- HDU 5538 L - House Building 水题
L - House Building Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.ph ...
- HDOJ 1846 Brave Game - 博弈入门
题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=1846 经典基础博弈,首先面对(m+1)的人一定会输,依次往后推即可: #include<iost ...
- hdu 1005:Number Sequence(水题)
Number Sequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)T ...
- hdu 1018:Big Number(水题)
Big Number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total ...
- hdu 2041:超级楼梯(水题,递归)
超级楼梯 Time Limit: / MS (Java/Others) Memory Limit: / K (Java/Others) Total Submission(s): Accepted Su ...
随机推荐
- springBoot异常处理
1.status=404 Whitelabel Error Page Whitelabel Error Page This application has no explicit mapping fo ...
- arguments.callee 属性 递归调用 & caller和callee的区别
arguments.callee 在函数内部,有两个特殊的对象:arguments 和 this.其中, arguments 的主要用途是保存函数参数, 但这个对象还有一个名叫 callee 的属 ...
- sysbench相关
Sysbench工具是集系统测试和数据库测试一体的测试工具,但是传统的sysbench在数据库测试方面,没有遵循TPC-C测试模型,仅仅支持单个表的数据.而在实际的业务场景中,业务逻辑复杂的多.开源的 ...
- Object-c 构造、析构函数
一.构造函数 在OC中凡是已init开头的函数我们都称之为构造函数,在声明构造函数的时候,不带参数的一般直接声明为“-(id)init”,带参数的一般声明为“-(id)initWith...”. @i ...
- Hibernate hql 多表查询
String hql="select c from Col c ,UserRole role where c.id=role.columnId and c.id=? and role.use ...
- Scripting API Samples
Scripting API Samples Tomáš Matoušek edited this page on Jan 31 · 32 revisions Home API Changes Bu ...
- fio 测试磁盘
root@rook-test:/# ceph osd status+----+-----------------------------+-------+-------+--------+------ ...
- Null Hypothesis and Alternate Hypothesis
1.Null Hypothesis Overview 零假设,H0是普遍接受的事实;这与备择假设(alternate hypothesis)正好相反.研究人员努力否定.驳斥零假设.研究人员提出了另一种 ...
- List<?>和List<T>的区别
是java泛型的两种用法:List<T>是泛型方法,List<?>是限制通配符 List<T>一般有两种用途:1.定义一个通用的泛型方法.伪代码: public i ...
- 编辑距离12 · Edit Distance12
[抄题]: 给出两个单词word1和word2,计算出将word1 转换为word2的最少操作次数. 你总共三种操作方法: 插入一个字符 删除一个字符 替换一个字符 [思维问题]: [一句话思路]: ...