签到题
#include <iostream>
#include <cstdio>
using namespace std;
const int maxn=1005;
int N,M;
int apple[maxn][maxn]={0};
int main() {
cin>>N>>M;
int maxTree=0,index;
int remainder=0;
for(int i=1;i<=N;i++)
{
for(int j=0;j<=M;j++)
{
scanf("%d",&apple[i][j]);
if(j != 0)
apple[i][M+1] += -apple[i][j]; //疏果个数
}
if(apple[i][M+1] > maxTree)
{
maxTree = apple[i][M+1];
index = i;
}
remainder += apple[i][0]-apple[i][M+1];
}
cout<<remainder<<" "<<index<<" "<<maxTree<<endl;
return 0;
}