hdoj-5591-ZYB's Game
来源:互联网 发布:s算法的基本特征 编辑:程序博客网 时间:2024/06/05 01:09
Problem Description
players guess a number in turns,the player who exactly guesses
the number now is bigger or smaller than
Now if only two players are play the game,and both of two players know the
will win when
Input
In the first line there is the number of testcases T .
For each teatcase:
the first line there is one numberN .
1≤T≤100000 ,1≤N≤10000000
For each teatcase:
the first line there is one number
Output
For each testcase,print the ans.
Sample Input
13
Sample Output
1
简单的博弈,分清楚必败态和必胜态就Ok
#include<cstdio>#include<cstring>#include<iostream>#include<algorithm>using namespace std;int main(){ int t; scanf("%d",&t); while(t--) { int n; scanf("%d",&n); printf("%d\n",n%2 == 0 ? 0 : 1); } return 0;}
0 0
- HDOJ 5591 ZYB's Game
- hdoj-5591-ZYB's Game
- hdoj 5591 ZYB's Game 【水题】
- HDOJ 5591 ZYB's Game(简单博弈)
- 【博弈】HDOJ ZYB's Game 5591
- HDOJ 5591 ZYB's Game 【简单博弈 】
- HDU 5591 ZYB's Game
- HDU 5591 ZYB's Game
- hdoj ZYB's Game 5901 (数学规律题)
- HDU 5591 ZYB's Game(取石子)
- HDU 5591 ZYB's Game(博弈)
- 杭电5591 ZYB's Game
- hdu 5591 ZYB's Game(水)
- hdu5591 ZYB's Game
- ZYB's Game
- ZYB's Game解题报告
- HDOJ 5590 ZYB's Biology
- HDOJ 5590 ZYB's Biology
- 24点游戏-穷举破解
- 二叉搜索树中找出比K大的最小的那个数
- LeetCode 242. Valid Anagram C语言
- BFS 搜索 Problem 1015 Knight Moves "马走日"之最少步数
- 关于Handler以及Looper,MessageQueen等
- hdoj-5591-ZYB's Game
- 彻底理解Android中的shader
- Leetcode Power of Four 342
- (4)Linux常用命令学习
- vue文档迷惑 处
- static 静态变量
- HTTP缓存相关头
- CI框架,多域名实现
- 基础编程4-2