【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;
}
posted @ 2018-05-23 21:33  gwj1139177410  阅读(126)  评论(0编辑  收藏  举报
选择