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;
}
个人分享,欢迎指导,未经允许,请勿转载。谢谢!
原文地址:https://www.cnblogs.com/hello-OK/p/9447365.html