import java.util.*;
public class CCF2019091 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc =new Scanner(System.in);
int n,m;
int t=0,k=0,p=0;//p为单次计数
int max=0;//记录最大数值
n=sc.nextInt();
m=sc.nextInt();
int [][]a=new int[n][m+1];
for(int i=0;i<n;i++) {
p=0;
for(int j=0;j<=m;j++) {
a[i][j]=sc.nextInt();
t+=a[i][j];
if(j!=0)
p+=a[i][j];
//System.out.println(p);
}
if(p<max)
{
k=i+1;
max=p;
}
}
if(max<0)
max=-max;
System.out.print(t+" "+k+" "+max);
}
}
CCF2019091小明种苹果Java
最新推荐文章于 2020-03-11 22:30:24 发布