• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
james1207

博客园    首页    新随笔    联系   管理    订阅  订阅

HDU4626+博弈

博弈。。。

 

/*
博弈
对于当前人来说,如果完成自己的操作后,若mat[n][m]==0,则自己是胜者。
因为 如果mat其他位置不存在1了,肯定自己胜;如果存在1,则让下一位去反转那个1.
*/
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<algorithm>
#include<iostream>
#include<queue>
#include<map>
#include<stack>
#include<set>
#include<math.h>
using namespace std;
typedef long long int64;
//typedef __int64 int64;
typedef pair<int64,int64> PII;
#define MP(a,b) make_pair((a),(b)) 
const int maxn = 105;
const int inf = 0x7fffffff;
const double pi=acos(-1.0);
const double eps = 1e-8;

int main(){
	int T;
	scanf("%d",&T);
	while( T-- ){
		int n,m;
		scanf("%d%d",&n,&m);
		int tt;
		for( int i=0;i<n;i++ )
			for( int j=0;j<m;j++ )
				scanf("%d",&tt);
		if( tt==1 ) printf("Alice\n");
		else printf("Bob\n");
	}
	return 0;
}


 

 

posted @ 2013-08-14 19:31  Class Xman  阅读(232)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3