link:http://acm.hdu.edu.cn/showproblem.php?pid=4642
refer to:
http://www.cnblogs.com/jackge/archive/2013/08/01/3231573.html
这道题目很有意思。
1 #include <iostream> 2 #include <cstdio> 3 #include <cstdlib> 4 #include <cstring> 5 #include <cmath> 6 #include <cctype> 7 #include <algorithm> 8 #include <queue> 9 #include <deque> 10 #include <queue> 11 #include <list> 12 #include <map> 13 #include <set> 14 #include <vector> 15 #include <utility> 16 #include <functional> 17 #include <fstream> 18 #include <iomanip> 19 #include <sstream> 20 #include <numeric> 21 #include <cassert> 22 #include <ctime> 23 #include <iterator> 24 const int INF = 0x3f3f3f3f; 25 const int dir[8][2] = {{-1,0},{1,0},{0,-1},{0,1},{-1,-1},{-1,1},{1,-1},{1,1}}; 26 using namespace std; 27 int main(void) 28 { 29 #ifndef ONLINE_JUDGE 30 freopen("in.txt", "r", stdin); 31 #endif 32 int t, n, m, tmp; 33 ios::sync_with_stdio(false); 34 cin>>t; 35 for (int i = 0; i < t; ++i) 36 { 37 cin>>n>>m; 38 for (int j = 0; j < n; ++j) 39 for (int k = 0; k < m; ++k) 40 cin>>tmp; 41 if (tmp) cout<<"Alice"<<endl; 42 else cout<<"Bob"<<endl; 43 } 44 return 0; 45 }
o(╯□╰)o