HDU4642:Fliping game
题目大意
思路
所以,我们直接看最后一个点是1还是0就好了
代码
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
#define Int register int
void read (int &x)
{
x = 0;char c = getchar();int f = 1;
while (c < '0' || c > '9'){if (c == '-') f = -f;c = getchar();}
while (c >= '0' && c <= '9'){x = (x << 3) + (x << 1) + c - '0';c = getchar();}
x *= f;return ;
}
void write (int x)
{
if (x < 0){x = -x;putchar ('-');}
if (x > 9) write (x / 10);
putchar (x % 10 + '0');
}
signed main()
{
int times;
read (times);
while (times --)
{
int n,m;
read (n),read (m);
int key;
for (Int i = 1;i <= n * m;++ i) read (key);
if (key) puts ("Alice");
else puts ("Bob");
}
}