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. 一、spark入门之spark shell:wordcount

    1.安装完spark,进入spark中bin目录: bin/spark-shell   scala> val textFile = sc.textFile("/Users/admin/ ...

  2. [CSS] 子元素垂直居中的两种方式

    1. 多个子元素水平并排,IE10以下失效 display: flex; align-items: center; justify-content: center; 2.多个子元素竖直排列,这种方式会 ...

  3. iOS用AFN上传图片到java后台

    -(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event { AFHTTPSessionMana ...

  4. 怎样通过WireShark抓到的包分析出SIP流程图

    WireShark抓到了SIP包, 逐条分析, 看瞎...希望能够写个脚本, 自动生成流程图

  5. js实现浏览器通知功能

    概述 Notification API是浏览器的通知接口,用于在用户的桌面(而不是网页上)显示通知信息,桌面电脑和手机都适用,比如通知用户收到了一封Email.具体的实现形式由浏览器自行部署,对于手机 ...

  6. Racket中使用Y组合子

    关于Y组合子,网上已经介绍很多了,其作用主要是解决匿名lambda的递归调用自己. 首先我们来看直观的递归lambda定义, 假设要定义阶乘的lambda表达,C#中需要这么定义 Func<in ...

  7. C#中对属性和字段的理解

    字段 C#中很少提到全局变量的概念, 引入了字段一词来代替全局变量, 但也并不是这样简单的, 字段会比全局变量的使用更难理解, 使用上会简单, 初学者当做成员变量或者全局变量不会有什么影响, 随着使用 ...

  8. ios UIImageView异步加载网络图片

    方法1:在UI线程中同步加载网络图片 UIImageView *headview = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 40, 4 ...

  9. 关于js的那些事儿

    什么是JS? JavaScript是一种基于对象(Object)和事件驱动(Event Driven),并具有相对安全性的客户端脚本语言.同时也是一种广泛用户客户端Web开发的脚本语言,常用来给HTM ...

  10. nl2br()与nl2p()函数,php在字符串中的新行(\n)之前插入换行符

    使用情景 很多场合我们只是简单用textarea获取用户的长篇输入,而没有用编辑器.用户输入的换行以“\n”的方式入库,输出的时候有时候会没有换行,一大片文字直接出来了.这个时候可以根据库里的“\n” ...