#include<bits/stdc++.h>
using namespace std;
int n;
struct x{
int chinese;
int math;
int english;
int num;
int all;
}kuuga[300];
bool cmp(x a,x b){
if(a.all!=b.all){
return a.all>b.all;
}
if(a.chinese!=a.chinese){
return a.chinese>b.chinese;
}
return a.num<b.num;
}
int p_num[300];
int main(){
scanf("%d",&n);
for(int should=1;should<=n;should++){
kuuga[should].num=should;
scanf("%d",&kuuga[should].chinese);
scanf("%d",&kuuga[should].math);
scanf("%d",&kuuga[should].english);
kuuga[should].all=kuuga[should].chinese+kuuga[should].english+kuuga[should].math;
kuuga[should].num=should;
}
sort(kuuga+1,kuuga+n+1,cmp);
for(int should=1;should<=5;should++){
printf("%d ",kuuga[should].num);
printf("%d",kuuga[should].all);
printf("\n");
}
return 0;
}
三个点都是有一个相同的分数,但是学号靠后的在前面或者语文好的在后面的情况 `