Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <iomanip>
- #include <fstream>
- #include <string>
- using namespace std;
- int main(){
- int n,m,k;
- long long A[100][100];
- long long S[100]={0};
- long long max=-10000000;
- cin>>n>>m;
- for(int i=0;i<n;i++){
- for(int j=0;j<m;j++){
- cin>>A[i][j];
- }
- }
- for(int i=0;i<n;i++){
- for(int j=0;j<m;j++){
- S[i]+=A[i][j];
- }
- if(S[i]>max){
- k=i+1;
- max=S[i];
- }
- }
- cout<<k;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement