alphacademy-cpp/hf/hf4/1.cpp

24 lines
436 B
C++
Raw Permalink Normal View History

2022-10-23 12:37:04 +00:00
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
// https://host.pawz.hu/8840nfIq.png
int main() {
int n, out, temp, temp2, max;
max = 0;
cin >> n;
for (int i = 0; i < n; i++) {
temp2 = 0;
for (int j = 0; j < 7; j++) {
cin >> temp;
temp2 += temp;
}
if (temp2 > max) {
max = temp2;
out = i+1;
}
}
cout <<out;
}