kiki's game

Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 40000/1000 K (Java/Others)
Total Submission(s): 5272    Accepted Submission(s): 3100

Problem Description
Recently kiki has nothing to do. While she is bored, an idea appears in his mind, she just playes the checkerboard game.The size of the chesserboard is n*m.First of all, a coin is placed in the top right corner(1,m). Each time one people can move the coin into the left, the underneath or the left-underneath blank space.The person who can't make a move will lose the game. kiki plays it with ZZ.The game always starts with kiki. If both play perfectly, who will win the game?
 
Input
Input contains multiple test cases. Each line contains two integer n, m (0<n,m<=2000). The input is terminated when n=0 and m=0.

 
Output
If kiki wins the game printf "Wonderful!", else "What a pity!".
 
Sample Input
5 3 5 4 6 6 0 0
 
Sample Output
What a pity! Wonderful! Wonderful!
 
Author
月野兔
 
Source
Recommend
 
 
代码:
 #include<iostream>
using namespace std;
int main()
{
int n,m;
while(cin>>n>>m,m+n)
{
if((n&)&&(m&))
cout<<"What a pity!"<<endl;
else
cout<<"Wonderful!"<<endl;
}
return ;
}

HDUOJ---kiki's game的更多相关文章

  1. hduoj 1455 && uva 243 E - Sticks

    http://acm.hdu.edu.cn/showproblem.php?pid=1455 http://uva.onlinejudge.org/index.php?option=com_onlin ...

  2. hdu 3579 Hello Kiki (中国剩余定理)

    Hello Kiki Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total ...

  3. HDU 2147 kiki's game(博弈)

    kiki's game Time Limit: 1000MS   Memory Limit: 10000KB   64bit IO Format: %I64d & %I64u Submit S ...

  4. hduoj 4712 Hamming Distance 2013 ACM/ICPC Asia Regional Online —— Warmup

    http://acm.hdu.edu.cn/showproblem.php?pid=4712 Hamming Distance Time Limit: 6000/3000 MS (Java/Other ...

  5. hduoj 4706 Herding 2013 ACM/ICPC Asia Regional Online —— Warmup

    hduoj 4706 Children's Day 2013 ACM/ICPC Asia Regional Online —— Warmup Herding Time Limit: 2000/1000 ...

  6. 周赛-kiki's game 分类: 比赛 2015-08-02 09:24 7人阅读 评论(0) 收藏

    kiki's game Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 40000/10000 K (Java/Others) Total S ...

  7. HDU 2147 kiki's game (简单博弈,找规律)

    kiki's game Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 40000/1000 K (Java/Others)Total ...

  8. hdoj 2147 kiki's game【博弈】

    kiki's game Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 40000/10000 K (Java/Others)Total ...

  9. kiki's game

    欢迎参加——BestCoder周年纪念赛(高质量题目+多重奖励) kiki's game Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: ...

  10. NYOJ 300 &amp;&amp; hdu 2276 Kiki &amp; Little Kiki 2 (矩阵高速功率)

    pid=300">Kiki & Little Kiki 2 时间限制:5000 ms  |  内存限制:65535 KB 难度:4 描写叙述 There are n light ...

随机推荐

  1. Android之与当前连接的wifi进行文件夹的浏览与传输

    先上传jar文件:ConnectWifi.jar.zip 上传源文件:org.zip 使用实例及相应的注释: import java.io.File; import java.net.InetAddr ...

  2. easyui datagrid 计算

    转载,至高吴上(Alfa.wu) !谢谢! /******************************************************** 主要用于 明细表格 字段间的计算 Sta ...

  3. Objective-C:NSMutableString类的常见操作

    NSMutableString可变字符串的主要的操作是创建.增加.删除.插入.替换 代码操作如下: // // main.m // 03-NSMutableString // // Created b ...

  4. JQuery模仿淘宝天猫魔盒抢购页面倒计时效果

    1.效果及功能说明 通过对时间的控制来告诉用户一个活动还剩多少时间,精确到秒.2.实现原理 首先定义活动的截至的时间,要重年份精确到毫秒,在获得当前的年份到秒钟,在用截至时间,减去现在的时间,剩下的还 ...

  5. IOS开发之新浪微博OAuth2

    说明:微博开放接口的调用,如发微博.关注等,都是需要获取用户身份认证的.目前微博开放平台用户身份鉴权主要采用的是OAuth2.0.为了方便开发者开发.测试自己的应用. OAuth2.0较1.0相比,整 ...

  6. scala 学习笔记一 列表List

    1.介绍 Scala 列表类似于数组,它们所有元素的类型都相同,但是它们也有所不同:列表是不可变的,值一旦被定义了就不能改变,其次列表 具有递归的结构(也就是链接表结构)而数组不是.. 列表的元素类型 ...

  7. Declaration Merging with TypeScript

    原文:https://blog.oio.de/2014/03/21/declaration-merging-typescript/ Why might you need this? There can ...

  8. (转)Unity中武器与人物的碰撞检测

    自:http://blog.csdn.net/Monzart7an/article/details/24435843 目前来说有三种思路,其实前两种算变种了: 1.动画关键帧回调 + 范围检测. 这个 ...

  9. 我所认识的PCA算法的princomp函数与经历 (基于matlab)

    我接触princomp函数,主要是因为实验室的项目需要,所以我一接触的时候就希望快点学会怎么用. 项目中需要利用PCA算法对大量数据进行降维. 简介:主成分分析 ( Principal Compone ...

  10. 在Java程序中做字符串拼接时一定要记得的MessageFormat.format

    Java里从来少不了字符串拼接的活,Java程序员也肯定用到过StringBuffer,StringBuilder,以及被编译器优化掉的+=.但这些都和下文要谈的无关. 比如有这样的字符串: 张三将去 ...