1017A.The Rank#排名

题目出处:http://codeforces.com/problemset/problem/1017/A
#include<iostream>
using namespace std;
int main(){
    int English,German,Math,History;
    int i,n,sum,rank;
    cin>>n;
    rank=1;
    for(i=0;i<n;i++){
        cin>>English>>German>>Math>>History;
        if(!i)
            sum = English+German+Math+History;
        else
            if(sum<English+German+Math+History)rank++;
    }
    cout<<rank;
    return 0;
}

 

posted @ 2018-08-09 10:27  hello_OK  阅读(153)  评论(0编辑  收藏  举报