HDU 1564 Play a game
Description
ailyanlu is very happy today! and he is playing a chessboard game with 8600.
The size of the chessboard is n*n. A stone is placed in a corner square. They play alternatively with 8600 having the first move. Each time, player is allowed to move the stone to an unvisited neighbor square horizontally or vertically. The one who can't make a move will lose the game. If both play perfectly, who will win the game?
Input
The integers are between 1 and 10000, inclusive,(means 1 <= n <= 10000) indicating the size of the chessboard. The end of the input is indicated by a zero.
Output
No other characters should be inserted in the output.
Sample Input
2
0
Sample Output
8600
#include<stdio.h>
#include<iostream>
using namespace std;
int main()
{
int n;
while(cin>>n&&n)
{
if(n%==)cout<<""<<endl;
else cout<<"ailyanlu"<<endl;
}
return ;
}
HDU 1564 Play a game的更多相关文章
- HDU 1564 简单博弈 水
n*n棋盘,初始左上角有一个石头,每次放只能在相邻的四个位置之一,不能操作者输. 如果以初始石头编号为1作为后手,那么对于每次先手胜的情况其最后一步的四周的编号必定是奇数,且此时编号为偶数,而对于一个 ...
- HDU 1564 Play a game && HDU 2147 kiki's game
HDU 1564 Play a game题意: 棋盘的大小是n*n.一块石头被放在一个角落的广场上.他们交替进行,8600人先走.每次,玩家可以将石头水平或垂直移动到一个未访问的邻居广场.谁不采取行动 ...
- HDU 1564 Play a game(巴什博弈)
New Year is Coming! ailyanlu is very happy today! and he is playing a chessboard game with 8600. The ...
- HDU 1564 (博弈) Play a game
这道题的答案猜也很好猜出来,但是想太难想了..题解一贴,然后闪人.. 请戳这
- HDU 1564 Play a game (找规律博弈)
Play a game Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total ...
- hdu 1564 Play a game(博弈找规律)
题目:一个n*n的棋盘,每一次从角落出发,每次移动到相邻的,而且没有经过的格子上. 谁不能操作了谁输. 思路:看起来就跟奇偶性有关 走两步就知道了 #include <iostream> ...
- hdu 1564 Play a game (博弈)
Play a game Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total ...
- hdu 1564水题Play a game
#include<stdio.h> int main() { int n; while(scanf("%d",&n),n) { n=n*n-1; i ...
- HDU 1564 找规律博弈
题目大意是: 从n*n的方格角落的一个起点出发,每次移到上下左右一个未曾到达过的位置,谁不能走了谁就输了 想了好久都想不出,看了大神的题解 Orz了 果然博弈不是脑残的游戏啊... 这里从起点出发,将 ...
随机推荐
- hdu1043
#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>#inclu ...
- android ViewStub延时渲染的应用
android开发当中,我们经常会遇到根据某个条件去控制一个控件的显示/隐藏的情况.虽然setVisibility(int visibility)的确可以达到这样的目的,但是在渲染时,其实隐藏的布局也 ...
- 解决 maven项目问题 An error occurred while filtering resources
解决方法: Maven -> Update Project.
- IOS开发自定义tableviewcell的注意点😄
自定义tableviewcell 1.xib,nib拖控件:awakefromnib: 设置2,不拖控件:- (instancetype)initWithStyle:(UITableViewCellS ...
- HSSFWorkbook和XSSFWorkbook的区别
HSSFWorkbook读取97-2003格式 ,XSSFWorkbook读取2007-2013格式 /** * 读取97-2003格式 * @param filePath 文件路径 * @throw ...
- c#的as关键字
类型a as 类型b ,把类型a强制变为类型b
- PHP静态延迟绑定简单示例
没怎么用过这个新特性,其实也不算新啦,试试吧,现在静态类的继承很方便了 <?php class A { protected static $def = '123456'; public stat ...
- VIP站长大会(北京站)常见问题解答
功能支持问题 1. react能否和MIP结合使用,如果暂时不能以后是否有考虑?是否会和其他 js 框架(比如angular )结合? 目前暂无计划支持. 2. MIP页是否支持自定义cookie?实 ...
- Egret 学习之 入口函数 及开始编写程序(三)
1,Egret的程序入口: C和java是以一个main函数作为入口,但egret类似于ActionScript 是以一个文档类作为入口,确切的说是以这个文档类的构造函数作为入口: 2,文档类的构造函 ...
- 利用LibreOffice与ImageMagick将网页分享至微信
现在越来越多的内容分享都是在微信上进行了.然而,若想将电脑浏览器中看到的感兴趣的网页分享至微信,则只能以纯文本的方式粘贴超级链接,而不能直接拷贝图文混排的HTML.因此,我想到不妨借助LibreOff ...