hdu 3863 No Gambling
来源:互联网 发布:js childnodes方法 编辑:程序博客网 时间:2024/05/20 20:44
题目链接:点这里。
Problem Description
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.
Input
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.
Output
If you think the first player will win, please output “I bet on Oregon Maple~”, else please output “I bet on Grape Skin~”.
Sample Input
2-1
Sample Output
I bet on Oregon Maple~
【题意】
给你一个散点图,每次每个人只能选择两个相邻属于自己颜色的点,然后链接起来,并且不能和之前的连线相交,问你谁最先得到一条从最左边到最右边的折线。
【分析】
感觉和博弈还是有点不一样啊,因为两个人的可行操作不完全一样。而且还有一些神奇的推理,反正结果比较简单:先手一定必胜,其实结果还是还比较容易理解的,因为不管如何后手一定会先一步堵住先手的。这样会造成后手慢一步,所以一定会造成后手慢一点,这就造成了先手一定成功。
【代码】
#include <bits/stdc++.h>int main() { int a; while(scanf("%d",&a),a+1) puts("I bet on Oregon Maple~"); return 0;}
【续】
没错,答案就是这么简单。
阅读全文
0 0
- 【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 3869 No Gambling 博弈
- HDU 3863 No Gambling (博弈论、对称性、水)
- No Gambling - HUD 3863 博弈
- hdoj 3863 No Gambling 【博弈】
- 2011 Multi-University Training Contest 3 - Host by BIT No Gambling 也就是hdu 3863
- NYOJ 341 No Gambling
- hdu3863 No Gambling
- HDU3863:No Gambling
- HD3863 No Gambling
- No Gambling----对偶博弈
- Gambling
- poj 3243 扩展BSGS
- Codeforces Round #428 (Div. 2)-搜索&期望&细节-C. Journey
- C#用空格分隔并去除分割后的空格元素
- 计算几何-计算多边形面积(模板)
- 文章标题
- hdu 3863 No Gambling
- Linux下使用c++调用shell命令
- 【dp】POJ
- 二叉树的下一个结点
- JAVA闭包
- react native学习笔记2——Hello World和组件构成简介
- 8.14实战感悟
- hdoj1088
- [容斥] Codeforces#428 (Div. 2) 839D. Winter is here