0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-10 05:18:49 +00:00

P6408 [COCI2008-2009#3] PET

R39811796
This commit is contained in:
Baoshuo Ren 2020-10-14 21:07:21 +08:00 committed by Baoshuo Ren
parent d0767107a7
commit 59b8809c28
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

20
problem/P6408/P6408.cpp Normal file
View File

@ -0,0 +1,20 @@
#include<bits/stdc++.h>
using namespace std;
int main() {
int maxi, maxn, t0, t1;
for(int i = 0 ; i < 5 ; i++) {
t1 = 0;
for(int j = 0 ; j < 4 ; j++) {
cin >> t0;
t1 += t0;
}
if(t1 > maxn) {
maxn = t1;
maxi = i+1;
}
}
cout << maxi << ' ' << maxn << endl;
return 0;
}