Description

New Year is Coming! 
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 input is a sequence of positive integers each in a separate line. 
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

Output the winner ("8600" or "ailyanlu") for each input line except the last zero. 
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的更多相关文章

  1. HDU 1564 简单博弈 水

    n*n棋盘,初始左上角有一个石头,每次放只能在相邻的四个位置之一,不能操作者输. 如果以初始石头编号为1作为后手,那么对于每次先手胜的情况其最后一步的四周的编号必定是奇数,且此时编号为偶数,而对于一个 ...

  2. HDU 1564 Play a game && HDU 2147 kiki's game

    HDU 1564 Play a game题意: 棋盘的大小是n*n.一块石头被放在一个角落的广场上.他们交替进行,8600人先走.每次,玩家可以将石头水平或垂直移动到一个未访问的邻居广场.谁不采取行动 ...

  3. HDU 1564 Play a game(巴什博弈)

    New Year is Coming! ailyanlu is very happy today! and he is playing a chessboard game with 8600. The ...

  4. HDU 1564 (博弈) Play a game

    这道题的答案猜也很好猜出来,但是想太难想了..题解一贴,然后闪人.. 请戳这

  5. HDU 1564 Play a game (找规律博弈)

    Play a game Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total ...

  6. hdu 1564 Play a game(博弈找规律)

    题目:一个n*n的棋盘,每一次从角落出发,每次移动到相邻的,而且没有经过的格子上. 谁不能操作了谁输. 思路:看起来就跟奇偶性有关 走两步就知道了 #include <iostream> ...

  7. hdu 1564 Play a game (博弈)

    Play a game Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total ...

  8. hdu 1564水题Play a game

    #include<stdio.h> int main() {  int n;  while(scanf("%d",&n),n) {   n=n*n-1;   i ...

  9. HDU 1564 找规律博弈

    题目大意是: 从n*n的方格角落的一个起点出发,每次移到上下左右一个未曾到达过的位置,谁不能走了谁就输了 想了好久都想不出,看了大神的题解 Orz了 果然博弈不是脑残的游戏啊... 这里从起点出发,将 ...

随机推荐

  1. java 文件下载支持中文名称

    /** * 文件下载 * @param filePath 文件路径 * @param fileName 文件名称 */ public void download(String filePath,Str ...

  2. Vultr日本vps搭建ss/ssr/openvpn免流教程

    每个月的手机流量不够用,运营商流量套餐价格偏高,怎么才能省钱?你在淘宝上,搜索手机免流,可找到很多奸商销售免流套餐,一块钱可买1GB流量,免流原理是什么?自己能搞吗? 手机免流原理 手机运营商中国电信 ...

  3. AForge.net 使用之录像拍照功能实现

    连接摄像头设备,这里需要引入 AForge.Video; AForge.Video.DirectShow; AForge.Video.FFMPEG; 还需要添加引用,aforge.dll,aforge ...

  4. android 开发心得杂记

    1.Android周刊关注. 2.4季Android性能优化典范 胡凯 http://mp.weixin.qq.com/s?__biz=MzA4NTQwNDcyMA==&mid=4021354 ...

  5. 关于spring autowrie的5种方式

    spring自动注入有5中方式,分别是: byName:根据自动注入类中的对象名字,会到配置文件中找相关id或者name的bean,如果找不到则不会匹配,如果找到多个bean,则会报错. byType ...

  6. ZendStudio9之SVN项目代码提示丢失解决

    前几天转移服务器,SVN 也重建了个,但用着重建的项目发现代码提示丢失了...好郁闷..搞了半天终于找到解决的方法了! 如果你还保留有以前的 SVN 项目本地完整备份,可以直接拷贝以下三个文件到新项目 ...

  7. CodeForces 710C Magic Odd Square

    构造. 先只考虑用$0$和$1$构造矩阵. $n=1$,$\left[ 1 \right]$. $n=3$,(在$n=1$的基础上,最外一圈依次标上$0$,$1$,$0$,$1$......) $\l ...

  8. ASP.NET用户控件操作ASPX页面

    定义一个不含数据的事件处理方法 用户控件 public event EventHandler Click; protected void Button1_Click(object sender, Ev ...

  9. java-进程

    一个java进程,只有一个入口,就是main方法. tomcat是一个java进程,tomcat只有一个入口,org.apache.catalina.startup.Bootstrap  类的main ...

  10. 浙大 pat 1038 题解

    1038. Recover the Smallest Number (30) 时间限制 400 ms 内存限制 32000 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHE ...