AC代码
#include <bits/stdc++.h>
using namespace std;
#define ms(a,b) memset(a,b,sizeof(a))
typedef long long ll;
inline int read(){int X=0,w=0; char ch=0;while(!isdigit(ch)) {w|=ch=='-';ch=getchar();}while(isdigit(ch)) X=(X<<3)+(X<<1)+(ch^48),ch=getchar();return w?-X:X;
}
int main(int argc,char* argv[]){int ans=0,tmp=0;for (int i=1;i<=7;i++) {int x=read(),y=read();if (x+y>tmp) ans=i,tmp=x+y;}printf("%d\n",ans);return 0;
}