【 数论 博弈 】 HDU - 3863 No Gambling
2018-02-04 22:20
369 查看
No Gambling
[b]Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65568/32768 K (Java/Others)Total Submission(s): 1934 Accepted Submission(s): 1422
[/b]
[align=left]Problem Description[/align]
One day, Flyvan introduced a new game to his two friends, Oregon Maple and Grape Skin. The game is quite simple. Given an N-sized grids, like the figure A shown below (as N = 4). The blue points are the places the first player can
choose, and the red points are the places the second player can choose.
In the game, the two players take turns to choose two points to get connected by a stick. The two chosen points’ distance should be exactly one-unit length. The first player’s goal is to create a ‘bridge’ that connects a most left point and a most right point.
The second player’s goal is to create a ‘bridge’ that connects a most top point and a most bottom point. Figure B shows a possible result (the first player won). In addition, the stick shouldn’t get crossed.
Now Flyvan will give the number N, and his two friends will play the game. Both of the two players will choose the best strategy. You can bet on one player, and if he wins the game, you’ll get twice money you bet~
Since you are a talented programmer, you surely won’t just do gambling. Please write a program to find out the player who you should bet on. As Oregon Maple is elder, he will always play first.
[align=left]Input[/align]
Each line of the input is an integer N (2 <= N <= 270000), which indicated the number Flyvan chose. The end-of-file is denoted by a single line containing the number -1.
[align=left]Output[/align]
If you think the first player will win, please output “I bet on Oregon Maple~”, else please output “I bet on Grape Skin~”.
[align=left]Sample Input[/align]
2-1
[align=left]Sample Output[/align]
I bet on Oregon Maple~
题意:n*n的网格如图,蓝色从上走到右,红色从上走到下。。。蓝色先走,问先手赢还是后手赢。。。
思路:想想,蓝色先走,红色永远比他少走一步,所以..蓝色不管怎么样都会赢。。。
#include<stdio.h> int main() { int n; while(~scanf("%d",&n)) { if(n==-1) break; printf("I bet on Oregon Maple~\n");//总是先手赢 } }
相关文章推荐
- HDU 3863 No Gambling(博弈)
- HDU 3863 No Gambling【博弈】
- HDU 3863 No Gambling 简单博弈
- HDU 3863 No Gambling 【简单博弈】
- hdu 3863 No Gambling (水博弈规律)
- HDU 3863 (博弈) No Gambling
- hdu 3863 No Gambling (不会证明,但是是对的,,)
- 【hdu 3863】No Gambling
- hdoj 3863 No Gambling 【博弈】
- No Gambling - HUD 3863 博弈
- HDU 3863 No Gambling 题解
- hdu 3869 No Gambling 博弈
- HDU 3863 No Gambling (博弈论、对称性、水)
- [置顶] acm--博弈入门2(P/N分析)--(HDU 1847 HDU 2188 HDU 3863)
- 【 数论 Nim博弈 】HDU 2176 取(m堆)石子游戏
- HDU 3863 博弈
- No Gambling----对偶博弈
- 简单博弈(hdu 2188 && 4764 && 2149 && 3863 && 3951 && 1564)
- hdu3863——No Gambling(简单博弈)
- HDU 2012 素数判定(数论)