题意:给了m*n的矩阵然后两个人统计有多少空行和空列。
#include <iostream>
using namespace std;
const int N = 55;
int a[N][N], r[N], c[N];
int main()
{
ios::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
int T, n, m;
cin>>T;
while(T--){
cin>>n>>m;
for(int i = 0; i < n; ++i) r[i] = 0;
for(int i = 0; i < m; ++i) c[i] = 0;
for(int i = 0; i < n; ++i){
for(int j = 0; j < m; ++j){
cin>>a[i][j];
if(a[i][j]){
r[i] = 1; c[j] = 1;
}
}
}
int a = n, b = m;
for(int i = 0; i < n; ++i)
if(r[i]) a -= 1;
for(int i = 0; i < m; ++i)
if(c[i]) b -= 1;
a = min(a, b);
if(a%2==1){
cout<<"Ashish\n";
}else{
cout<<"Vivek\n";
}
}
return 0;
}