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了 果然博弈不是脑残的游戏啊... 这里从起点出发,将 ...
随机推荐
- MPICH3.2 单机编译、安装及测试
MPI,即信息传递接口(Message Passing Interface),是基于消息传递这种并行计算模型的一个并行程序设计标准,可以直接通过C/C++.Fortran调用,目前最主要的实现由MPI ...
- D3.js
html代码: <div id="id"> <p>Apple</p> <p id="aa">Pear</p ...
- Oracle常用查询
-- 创建Oracle sequence create sequence SEQ_XXHF minvalue 1 maxvalue 9999999999999999999999999999 start ...
- Windows 服务 Error 14001
如果碰到 windows 服务安装不了或者启动不了,报14001的配置文件错误,那么 可以从.exe.config入手,我这次遇到的是配置中有中文注释导致的. 我把空行以及中文的注释去掉以后,整个世界 ...
- android屏幕适配之度量单位、屏幕分类、图标尺寸归类分析
好久没有做android项目UI的适配了,好多基本概念都已经模糊了,于是萌生了将屏幕分辨率.常用单位.常用图标尺寸等信息规整的想法,一下就是通过查询资料,自己验证的一些随笔,如有失误之处,望大家及时予 ...
- Defraggler(磁盘整理软件) V2.21.993 绿色版
软件名称: Defraggler(磁盘整理软件) 软件语言: 简体中文 授权方式: 免费软件 运行环境: Win 32位/64位 软件大小: 5.0MB 图片预览: 软件简介: Defraggler ...
- 2.开启TFTP,NFS,SAMBA,SSH服务
一.TFTP (1)dpkg -s tftp-hpa查看服务器端是否安装 (2)如果没安装 sudo apt-get install tftpd-hpa sudo apt-get install tf ...
- 2017中国数据库技术大会(DTCC)又要来啦!期待~~
2017第八届中国数据库技术大会(DTCC2017)将于2017年5月11-13日如约而至.2017中国数据库技术大会(DTCC)以"数据驱动•价值发现"为主题,汇集来自互联网.电 ...
- java 调用打印机 打印服务
import java.io.File;import java.io.FileInputStream;import java.io.FileNotFoundException;import javax ...
- 30分钟学习sea.js使用指南
: seajs如何解决? ①引入sea.js的库 <script src="../sea/sea.js" ></script> ②如何变成模块? defin ...