Məsələlər
Строки с максимальной суммой
It is written "All numbers do not exceed 100 by absolute value". It must be 1000 !!!
include<bits/stdc++.h>
using namespace std; int main(){
long n,m; cin>>n>>m; long arr[n][m]; long maxx=-1001,cem=0; for(long i=0;i<n;i++){ for(long j=0;j<m;j++){ cin>>arr[i][j]; cem+=arr[i][j]; } if(cem>maxx){ maxx=cem; } cem=0; } long sum=0; for(long i=0;i<n;i++){ for(long j=0;j<m;j++){ sum+=arr[i][j]; } if(sum==maxx){ cout<<i+1<<" "; } sum=0; }
}