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 <stdio.h>
int main()
{
int n;
while(scanf("%d",&n),n+1)
puts("I bet on Oregon Maple~");
return 0;
}

HDU3863:No Gambling的更多相关文章

  1. java web 开发三剑客 -------电子书

    Internet,人们通常称为因特网,是当今世界上覆盖面最大和应用最广泛的网络.根据英语构词法,Internet是Inter + net,Inter-作为前缀在英语中表示“在一起,交互”,由此可知In ...

  2. 所有selenium相关的库

    通过爬虫 获取 官方文档库 如果想获取 相应的库 修改对应配置即可 代码如下 from urllib.parse import urljoin import requests from lxml im ...

  3. CodeForces - 662A:Gambling Nim (求有多少个子集其异或为S)(占位)

    As you know, the game of "Nim" is played with n piles of stones, where the i-th pile initi ...

  4. 【BZOJ5197】Gambling Guide (最短路,期望)

    [BZOJ5197]Gambling Guide (最短路,期望) 题面 BZOJ权限题 洛谷 题解 假设我们求出了每个点的期望,那么对于一个点,只有向期望更小的点移动的时候才会更新答案. 即转移是: ...

  5. 每日英语:How Often Do Gamblers Really Win?

    The casino billboards lining America's roadways tantalize with the lure of riches. 'Easy Street. It' ...

  6. 【CF662A】Gambling Nim 线性基

    [CF662A]Gambling Nim 题意:n长卡牌,第i张卡牌正面的数字是$a_i$,反面的数字是$b_i$,每张卡牌等概率为正面朝上或反面朝上.现在Alice和Bob要用每张卡牌朝上的数字玩N ...

  7. zoj 3356 Football Gambling II【枚举+精度问题】

    题目: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3356 http://acm.hust.edu.cn/vjudge/ ...

  8. iOS审核策略重磅更新:Guideline 2.1批量拒审

    自从进入了2018年,大量应用在AppStore提交审核后,都直接给大家回复了个新春大礼包 Guideline 2.1 - Information Needed. 而大部分的应用,特别是金融类相关AP ...

  9. [BZOJ5197] [CERC2017]Gambling Guide

    [BZOJ5197] [CERC2017]Gambling Guide 题目链接 https://www.lydsy.com/JudgeOnline/problem.php?id=5197 Solut ...

随机推荐

  1. c++ 关于类构造函数的初始化列表

    除了性能问题之外,有些时场合初始化列表是不可或缺的,以下几种情况时必须使用初始化列表 常量成员,因为常量只能初始化不能赋值,所以必须放在初始化列表里面 引用类型,引用必须在定义的时候初始化,并且不能重 ...

  2. cors技术

    简称跨域资源共享: 若是配置nodejs: 需在公共路由添加三句话:代码如下: // 全局头设置 app.all('*', function(req, res, next) { res.set({ ' ...

  3. Javascript基础篇小结

    转载请声明出处 博客原文 随手翻阅以前的学习笔记,顺便整理一下放在这里,方便自己复习,也希望你有也有帮助吧 第一课时 入门基础 知识点: 操作系统就是个应用程序 只要是应用程序都要占用物理内存 浏览器 ...

  4. SlidingMenu侧边菜单

    第一步.首先在你项目中创建一个包存放侧边菜单的类:

  5. js判断年龄是否在0-100之间

    //判断年龄 $('#info_age').change(function(){ var _val = $(this).val(); -]+$/.test( _val ))||_val< || ...

  6. BZOJ 1407: [Noi2002]Savage( 数论 )

    枚举答案, 然后O(N^2)枚举野人去判他们是否会在有生之年存在同山洞. 具体做法就是: 设第x年相遇, 则 Ci+x*Pi=Cj+x*Pj (mod M), 然后解同余方程. 复杂度应该是O(ans ...

  7. jQuery实时获取checkbox状态问题

    在最近的项目开发中,使用jQuery操作checkbox时,发现一个问题. Html代码如下: <body> <div> <inputtype="checkbo ...

  8. Unity3D Android手机开发环境配置

    Unity3D Android手机开发环境配置 Date:2014-01-01 07:09 1.配置eclipse环境:首先在官网下载安装包:http://developer.android.com/ ...

  9. Apache 开启 Https

    1. 准备所需工具: 1) apache httpd2.4 浏览 2) Win32 OpenSSL v1.0.2d 浏览 2. 安装 2.1 安装Apache2.4服务 php环境搭建 浏览 2.2 ...

  10. Fedora 19下Guacamole的安装使用

    由于我要使用RDP实现web远程桌面,因此需要用到了Guacamole这个开源的软件.之前用Ubuntu12.04折腾了一晚上,也没有找到依赖库文件,而Guacamole的官方安装说明却没有介绍这个依 ...