HDU-1564-Play a game 【找规律】
来源:互联网 发布:mac 搜狗输入法切换 编辑:程序博客网 时间:2024/06/10 02:49
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1564
Play a game
Problem 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?
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.
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.
No other characters should be inserted in the output.
Sample Input
20
Sample Output
8600
从一个n*n棋盘的一角出发,每次移动到相邻的,而且没有经过的格子上。谁不能操作了谁输。 还没走过的格子数为奇数时,先手胜。所以n为偶数,先手胜。
阅读全文
0 0
- 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(博弈——找规律)
- hdu1564 Play a game【博弈 找规律】
- HDU 1564 Play a game(规律博弈)
- hdu 1564 play a game 博弈(规律)
- hdu 1564 Play a game (博弈 奇偶规律)
- hdu 1564 paly a game(博弈论找规律)
- hdu1564——Play a game(找规律博弈)
- 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
- xml------反射模拟servlet的执行(一)
- 关于无法卸载和安装VISIO2010的问题
- OpenGL ES 学习日记(1)
- Redis基本命令
- EU4-51: Describing a business situation
- HDU-1564-Play a game 【找规律】
- SSH中实体类的变量用关键字导致了建表失败
- hibernate--关联关系的CRUD
- 音频参数概念详解
- 利用二叉树层序遍历输出每层数据
- Java高并发,如何解决,什么方式解决
- 求这个字符串中的最大的数字字符串
- java之正则表达式
- Java中hashcode