WHU 1604 - Play Apple【博弈】
来源:互联网 发布:国税发票打印软件 编辑:程序博客网 时间:2024/06/07 06:09
Problem 1604 - Play Apple
Time Limit: 1000MS Memory Limit: 65536KB
Total Submit: 457 Accepted: 182 Special Judge: No
Total Submit: 457 Accepted: 182 Special Judge: No
Description
There are N apples. Two people take turns to either:
1. Divide the apple into two piles with different numbers.
2. The other people selects a pile of apples as the beginning of the next turn.
If someone can not meet the requirements, he is lost. Will the first one win the game if both use the best strategy?
Input
There are multiple test cases.
The first line of each case contains a integer N. ( 1 <= N <= 1000000000 )
The first line of each case contains a integer N. ( 1 <= N <= 1000000000 )
Output
If the first person will win, output “Yes”. Otherwise, output “No”.
Sample Input
2
3
4
3
4
Sample Output
No
Yes
No
Yes
No
AC-code:
#include<cstdio>int main(){long long n;while(~scanf("%lld",&n)){if(n%3==1||n==2)printf("No\n");elseprintf("Yes\n");}return 0; }
0 0
- WHU 1604 - Play Apple【博弈】
- Whu oj 1604 - Play Apple
- landoj--1604--Play Apple(博弈)
- Land oj 1604 - Play Apple (博弈)
- Play a game + 博弈
- hdu 4597 Play Game (博弈dp)
- HDU--1564 -- play a game [博弈]
- HDU 1564 Play a game 规律博弈
- HDU 1564 Play a game(博弈)
- HDU 1564 Play a game 博弈
- HDU 1564--Play a game【博弈】
- HDU 1564 Play a game 简单博弈
- hdu4597 (博弈dp)play game
- hdu1564 Play a game【博弈 找规律】
- 博弈——Play a game
- ACdream群OJ 1131 Apple 博弈
- 杭电hdu 1564 Play a game 博弈?
- HDU 1564 Play a game(规律博弈)
- perl lwp 超时问题
- Android中Application类用法
- Mysql Proxy环境搭建
- 前端学习总结(十四)javascript设计模式
- Android中使用自定义的VideoController和MediaPlayer实现视频的窗口和全屏播放
- WHU 1604 - Play Apple【博弈】
- 设置网络唤醒电脑(WAKE ON LAN,WOL)
- 安装Maven并搭建Maven私有仓库
- 研究Golang
- LayoutInflater的inflate函数用法详解
- Oracle 数据库存储过程
- 179. Largest Number
- 学习笔记之深入浅出MFC 第3讲 消息循环
- 数据库三范式