https://pintia.cn/problem-sets/994805260223102976/problems/1071785779399028736
#include <iostream>
using namespace std;
int main(){
int max = 0, N, M, num[1001] = {0}, cnt = 0;
cin >> N >> M;
for(int i = 0; i < M; i++){
for(int j = 1; j <= N; j++){
int tmp;
cin >> tmp;
num[j] += tmp;
}
}
for(int i = 1; i <= N; i++)
if(num[i] > max)
max = num[i];
cout << max << endl;
for(int i = 1; i <= N; i++)
if(num[i] == max){
if(cnt)
cout << " ";
cout << i;
cnt++;
}
return 0;
}