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 ...
随机推荐
- java常用的Utils写法
Utils: 获取年龄 属性文件获取 BeanCopy 分页 MapUtils 获取年龄: /** * 根据传入的日期计算年龄,因时间戳是从1970年开始计算的 * @param date * ...
- ABAP-语音输出
REPORT ZRICO_SPEAK. include ole2incl. data:ole type ole2_object, voice type ole2_object. parameters: ...
- Python Spider 抓取今日头条街拍美图
""" 抓取今日头条街拍美图 """ import os import time import requests from hashlib ...
- Docker查看关联容器的卷宗在本机的存储位置
docker inspect -f {{.Volumes}} volume1
- conflicting types for ‘方法名’ 的错误
将main()的实现写在drawShapes(),drawCircle(),drawRectangle()...之前. 结果编译的时候出现了 conflicting types for " ...
- iKcamp|基于Koa2搭建Node.js实战(含视频)☞ 处理静态资源
视频地址:https://www.cctalk.com/v/15114923882788 处理静态资源 无非花开花落,静静. 指定静态资源目录 这里我们使用第三方中间件: koa-static 安装并 ...
- 处理【由于 Web 服务器上的“ISAPI 和 CGI 限制”列表设置,无法提供您请求的页面】
处理[由于 Web 服务器上的“ISAPI 和 CGI 限制”列表设置,无法提供您请求的页面] 详细错误:HTTP 错误 404.2 - Not Found. 由于 Web 服务器上的“ISAPI 和 ...
- linux 常用find
磁盘查找文件内容: find .|xargs grep x find . -exec grep x{} \; 磁盘查找文件名称: find / -name "httpd.conf" ...
- spring security 非页面登录
参考https://stackoverflow.com/questions/36937414/auto-login-spring-security UserDetails userDetails = ...
- python笔记之循环控制
学习python的第一个例子,while循环中嵌套if-else语句,一个猜年龄的例子 #案例1,实现循环猜年龄 # my_age = 12 # while True: # guess_age1 = ...