#include<bits/stdc++.h>
using namespace std;
struct anpai{
int a;
int b;
int how;
int su;
};
anpai week[8];
bool cmp(anpai a,anpai b){
if(a.su==b.su){
return b.how>a.how;
}else{
return a.su>b.su;
}
}
int main(){
for(int i=1;i<=7;i++){
cin>>week[i].a>>week[i].b;
week[i].how = i;
week[i].su = week[i].a+week[i].b;
}
sort(week+1,week+1+7,cmp);
if(week[1].su<8){
cout<<0;
}else{
cout<<week[1].how;
}
return 0;
}
最后一个测试点WA,求改!!!