【NOIP2004】【Luogu1085】不高兴的津津

problem

solution

codes

#include<iostream>
using namespace std;
int main(){
    int t = 8, ans = 0;
    for(int i = 0; i < 7; i++){
        int a, b;  cin>>a>>b;
        if(a+b > t)t = a+b, ans = i+1;
    }
    cout<<ans;
    return 0;
}
原文地址:https://www.cnblogs.com/gwj1314/p/9444829.html