https://www.luogu.com.cn/problem/P1085
#include <iostream>
using namespace std;
int main()
{
int sum = 0;
int n = 7;
int iRet = -1;
int a,b;
for(int i = 0; i < n; i++)
{
cin >> a >> b;
int tmp = a + b;
if ( tmp > 8 && tmp > sum)
{
sum = tmp;
iRet = i;
}
}
cout << iRet+1 << endl;
return 0;
}