结论题,很显然和奇偶有关

PS.尝试用dfs写出PN表写崩了

#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<string>
#include<vector>
#include<stack>
#include<queue>
#include<set>
#include<map>
#define rep(i,j,k) for(register int i=j;i<=k;i++)
#define rrep(i,j,k) for(register int i=j;i>=k;i--)
#define erep(i,u) for(register int i=head[u];~i;i=nxt[i])
#define iin(a) scanf("%d",&a)
#define lin(a) scanf("%lld",&a)
#define din(a) scanf("%lf",&a)
#define s0(a) scanf("%s",a)
#define s1(a) scanf("%s",a+1)
#define print(a) printf("%lld",(ll)a)
#define enter putchar('\n')
#define blank putchar(' ')
#define println(a) printf("%lld\n",(ll)a)
#define IOS ios::sync_with_stdio(0)
using namespace std;
const int maxn = 2e3+11;
const int oo = 0x3f3f3f3f;
const double eps = 1e-7;
typedef long long ll;
ll read(){
ll x=0,f=1;register char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
return x*f;
}
int n,r,c;
int main(){
while(cin>>r>>c){
if(r==0&&c==0)break;
if(min(r%2,c%2)==0) cout<<"Wonderful!"<<endl;
else cout<<"What a pity!"<<endl;
}
return 0;
}

HDU - 2147 博弈 P/N分析的更多相关文章

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

    无奈英语不好又被坑,看到棋子能左移下移左下移,想当然地以为是Wythoff博弈了,=u= 题的意思是说每次只能选一个方向移动一步,所以找找规律就是横纵坐标为奇数的时候是必败状态. 从http://ww ...

  2. HDU.2147 kiki's game (博弈论 PN分析)

    HDU.2147 kiki's game (博弈论 PN分析) 题意分析 简单的PN分析 博弈论快速入门 代码总览 #include <bits/stdc++.h> using names ...

  3. hdu 2147 kiki&#39;s game, 入门基础博弈

    博弈的一些概念: 必败点(P点) : 前一个选手(Previous player)将取胜的位置称为必败点. 必胜点(N点) : 下一个选手(Next player)将取胜的位置称为必胜点. 必败(必胜 ...

  4. hdu 2147 kiki's game(巴什博弈)

    kiki's game HDU - 2147 题意:一个n*m的表格,起始位置为右上角,目标位置为左下角,甲先开始走,走的规则是可以向左,向下或者向左下(对顶的)走一格.谁先走到目标位置谁就胜利.在甲 ...

  5. S-Nim HDU 1536 博弈 sg函数

    S-Nim HDU 1536 博弈 sg函数 题意 首先输入K,表示一个集合的大小,之后输入集合,表示对于这对石子只能去这个集合中的元素的个数,之后输入 一个m表示接下来对于这个集合要进行m次询问,之 ...

  6. HDU 2147 kiki's game(规律,博弈)

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

  7. HDU 2147 kiki's game(博弈经典题)

    题目传送:http://acm.hdu.edu.cn/showproblem.php?pid=2147 Problem Description Recently kiki has nothing to ...

  8. HDU 2147 kiki's game(博弈图上找规律)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2147 题目大意:给你一个n*m的棋盘,初始位置为(1,m),两人轮流操作,每次只能向下,左,左下这三个 ...

  9. (博弈 sg入门)kiki's game -- hdu -- 2147

    链接: http://acm.hdu.edu.cn/showproblem.php?pid=2147 题意: 在一个n*m的棋盘上,从  (1,m),即右上角开始向左下角走. 下棋者只能往左边(lef ...

随机推荐

  1. 浏览器访问www.meituan.com过程

    “从浏览器输入 xxx 到跳转完成的过程发生了什么”,是一个常见的比较综合的面试题,以下是我查阅了一些资料后总结的,如有错误,还望批评指正.(以美团网为例) 1.在浏览器地址栏输入:meituan.c ...

  2. hdu 4278 Faulty Odometer(进制转换)

    十进制转八进制的变形: #include<stdio.h> int main() { int n; while(scanf("%d",&n)!=EOF& ...

  3. Usage of the @ (at) sign in ASP.NET

    from:http://www.mikesdotnetting.com/article/258/usage-of-the-at-sign-in-asp-net Thursday, January 22 ...

  4. Java 5新特性 for each 和Iterator的选择

    在使用一边做迭代操作一边做删除数组元素操作是应该使用Iterator package for_each_And_Iterator; public class Commodity { private S ...

  5. ASP.NET MVC4 学习记录

    之前在学习Artech的<ASP.NET MVC4框架揭秘>一书,学习过程中画了ASP.NET MVC4框架的草图,方便记忆.

  6. CentOS7 yum安装lamp环境

    1.安装apache yum install httpd #根据提示,输入Y安装即可成功安装 systemctl start httpd.service #启动apache systemctl sto ...

  7. 国外物联网平台(7):FogHorn

    国外物联网平台(7) ——FogHorn 马智 引言: 据外媒在本月20日报道,硅谷初创公司FogHorn正在与谷歌合作以简化工业物联网应用的部署.本文对FogHorn的技术.产品.应用和生态进行了分 ...

  8. Vue axios发送Http请求

    axios 1.cnpm install axios --save 2.在vue文件中引入,import Axios from 'axios' 3.使用,Axios.get(url).then((re ...

  9. Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'blog.t_blog.addTime' which is not functi

    sql报错: Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #1 of SELECT ...

  10. KVO 的代码简洁使用

    1.类属性设置与创建 详细使用介绍 KVO 键值观察 // KvoClass.h @interface KvoClass : NSObject @property(nonatomic, copy) N ...