link:http://acm.hdu.edu.cn/showproblem.php?pid=4642

refer to:

http://www.cnblogs.com/jackge/archive/2013/08/01/3231573.html

这道题目很有意思。

 #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cctype>
#include <algorithm>
#include <queue>
#include <deque>
#include <queue>
#include <list>
#include <map>
#include <set>
#include <vector>
#include <utility>
#include <functional>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <numeric>
#include <cassert>
#include <ctime>
#include <iterator>
const int INF = 0x3f3f3f3f;
const int dir[][] = {{-,},{,},{,-},{,},{-,-},{-,},{,-},{,}};
using namespace std;
int main(void)
{
#ifndef ONLINE_JUDGE
freopen("in.txt", "r", stdin);
#endif
int t, n, m, tmp;
ios::sync_with_stdio(false);
cin>>t;
for (int i = ; i < t; ++i)
{
cin>>n>>m;
for (int j = ; j < n; ++j)
for (int k = ; k < m; ++k)
cin>>tmp;
if (tmp) cout<<"Alice"<<endl;
else cout<<"Bob"<<endl;
}
return ;
}

o(╯□╰)o

hdu4642 Fliping game ——博弈的更多相关文章

  1. HDU-4642 Fliping game 简单博弈

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4642 看右下角的状态就行了,因为上面的操作每次都会改变它,而最后的局势是根据它来的... //STAT ...

  2. hdu 4642 Fliping game(博弈)

    题目:http://acm.hdu.edu.cn/showproblem.php?pid=4642 题意:给定一个棋盘,0表示向下,1表示向上,选一个x,y, 然后翻转从x,y 到n,m.的所有硬币, ...

  3. HDU 4642 Fliping game (2013多校4 1011 简单博弈)

    Fliping game Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Tota ...

  4. HDU 4642 Fliping game (简单博弈)

    Fliping game Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Tota ...

  5. hdu4642博弈(矩阵)

    题意:       给一个01矩阵,每次可以选择1的格子,选择之后以他为左上角的矩阵全都取反,两个人轮班取,不能取的人输. 思路:        博弈的题目,结论是右下角是0就输,1就赢,原因可以这么 ...

  6. HDU4642博弈好题

    链接:http://acm.hdu.edu.cn/ 两个人进行翻棋游戏,若a[n][m]为1,则不管先手就可以翻a[n][m]使其为0,这样不管后手翻什么都会使得a[n][m]为1,先手总是有棋可翻: ...

  7. hdu----(1849)Rabbit and Grass(简单的尼姆博弈)

    Rabbit and Grass Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) ...

  8. HDU 5754 Life Winner Bo 组合博弈

    Life Winner Bo Problem Description   Bo is a "Life Winner".He likes playing chessboard gam ...

  9. HDU 2509 Nim博弈变形

    1.HDU 2509  2.题意:n堆苹果,两个人轮流,每次从一堆中取连续的多个,至少取一个,最后取光者败. 3.总结:Nim博弈的变形,还是不知道怎么分析,,,,看了大牛的博客. 传送门 首先给出结 ...

随机推荐

  1. <input type="hidden" id="haha" name="wang" value="xiaodong" />

    jsp中一个隐藏的文本框,文本框里的值是:xiaodong id属性和name属性:就是在JavaScript中或者控制器中根据id或name属性取它的value的值 开发人员所需要,又不想让用户看到 ...

  2. The Coco-Cola Store C(Contest #3 )

    Once upon a time, there is a special coco-cola store. If you return three empty bottles to the shop, ...

  3. PL/SQL

    function & procedure packages function --> arguments or parameters with arguments, IN, read o ...

  4. 面试题之spring

    一.Spring的理解 Spring是一个轻量级的容器,非侵入性的框架.最重要的核心概念是IOC,并提供AOP概念的实现方式,提供对持久层,事务的支持,对当前流行的一些框架(Struts,Hibern ...

  5. Google https服务被屏蔽

    根据Google透明度报告显示,从上周(5月27日)开始,Google的部分服务开始被屏蔽,其中最主要的是HTTPS搜索服务和Google登录服务,所有版本的Google都受到影响,包括Google. ...

  6. GPIO的8种工作模式

    1.浮空输入GPIO_IN_FLOATING ——浮空输入,可以做KEY识别,RX1 2.带上拉输入GPIO_IPU——IO内部上拉电阻输入 3.带下拉输入GPIO_IPD——IO内部下拉电阻输入 4 ...

  7. Python的平凡之路(1)

    2016-07-26   一.Python简介   Python是一种解释型.面向对象.动态数据类型的高级程序设计语言.它的特点如下: 面向对象.解释语言.交互性.模块化.动态性.高级语言.可移植.可 ...

  8. FreebuF黑客专访系列之吴翰清(刺):接下来几年,有两样东西必定会火

        注:吴翰清——中国网络安全圈最具影响力的人物之一.西安交大少年班毕业,大学期间创办民间组织幻影,阿里巴巴集团最年轻的高级安全专家,创新工场安全宝任联合副总裁,热门公众微信“道哥的黑板报”幕后作 ...

  9. 多比Web 3D展示(3D机房/3D监控)中间件多比Web 3D展示(3D机房/3D监控)中间件免费下载购买地址

    多比3D是实现3D场景搭建的软件开发包,可以创建广泛的3D应用,适用于高端制造.能源.国防军工.教育科研.城市规划及建筑环艺.生物医学等领域的虚拟仿真,应用于虚拟展示.虚拟设计.方案评审.虚拟装配.虚 ...

  10. Eclipse卡死问题解决办法

    偶尔浏览到几个eclipse卡死的文章,收集一下. 1.  eclipse 3.6卡死 eclipse自动提示反应慢,或者卡死, 有人说这是eclipse 3.6的版本bug, 但是3.5版本好像也有 ...