#include<bits/stdc++.h> using namespace std; int main() { int uh=0,maxn=0; for(int i = 1; i <= 7; i++) { int a,b; cin >> a >> b; if(a+b-7>maxn) { maxn = a+b-7; uh = i; } } cout << uh; return 0; }
测试点数据为: 5 3 6 2 7 1 5 3 4 4 0 4 0 6