
201909-1.png
#include<iostream>
using namespace std;
int main()
{
int array[1005]={0};
int n,m;
cin>>n>>m;
int ans1=0;
int ans2=0;
int lostmax=0;
for(int i=1;i<=n;i++){
cin>>array[i];
int lost=0;
for(int j=1;j<=m;j++){
int temp;
cin>>temp;
lost+=temp;
array[i]+=temp;
}
ans1+=array[i];
if(lost<lostmax){
ans2=i;
lostmax=lost;
}
}
lostmax=-lostmax;
cout<<ans1<<" "<<ans2<<" "<<lostmax;
return 0;
}