解法:
#include<iostream>
#include<vector>
using namespace std;
int arr[100][100];
int main() {
int n, max = 0;
cin >> n;
vector<int> sum(n, 0);
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
cin >> arr[i][j];
sum[i] += arr[i][j];
}
if (max < sum[i]) max = sum[i];
}
cout << max << endl;
for (int i = 0; i < n; i++) {
if (sum[i] == max)
cout << i;
}
return 0;
}