题解!!!
2025-07-16 11:52:29
发布于:广东
2阅读
0回复
0点赞
题解!!!
#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
int n;
cin >> n;
int a[n][n];
for(int i = 0; i < n; ++i) {
for(int j = 0; j < n; ++j) {
cin >> a[i][j];
}
}
for(int j = 0; j < n; ++j) {
int cnt = 0;
for(int i = 0; i < n; ++i) {
if(a[i][j] == 1) {
cnt++;
}
}
if(cnt > n / 2) {
cout << j + 1 << " ";//修正
}
}
cout << endl;
return 0;
}
这里空空如也
有帮助,赞一个