-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path1092.cpp
45 lines (43 loc) · 790 Bytes
/
1092.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include <iostream>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <vector>
#include <stack>
#include <queue>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#define INF 0x3f3f3f3f
using namespace std;
typedef long long ll;
int main(){
int n,m;
ll rec[2000]={0};
cin>>n>>m;
for(int i=1;i<=m;i++){
for(int j=1;j<=n;j++){
ll in;
cin>>in;
rec[j]+=in;
}
}
ll maxs=0;
for(int i=1;i<=n;i++){
maxs=max(maxs,rec[i]);
}
cout<<maxs<<endl;
int flag=0;
for(int i=1;i<=n;i++){
if(rec[i]==maxs){
if(flag){
printf(" ");
}
flag=1;
cout<<i;
}
}
return 0;
}