输入样例:
5 3
1001 992 0 233 6
8 0 2018 0 2008
36 18 0 1024 4
输出样例:
2018
3 5
#include<iostream>
using namespace std;
int main(){
int n,m,k,max=0,flag=0;
cin>>n>>m;
int test[1001]={0};
for(int i=1;i<=m;i++){
for(int j=1;j<=n;j++){
cin>>k;
test[j]+=k;
if(test[j]>max){
max=test[j];
}
}
}
cout<<max<<endl;
for(int i=1;i<=n;i++){
if(test[i]==max){
if(flag==1) cout<<" ";
cout<<i;
flag=1;
}
}
return 0;
}