#include#includeusing namespace std;struct Person{string Name;int Total[4];//3门课程+总分 }; void sort(Person p[],int n){ Person t; for(int i=0;ip[j+1].Total[3]){ t=p[j]; p[j]=p[j+1]; p[j+1]=t;} } }}int main(){ int n; cin>>nPerson *p=new Person[n]; for(int i=0;i>p[i].Name; for(int j=0;j<3;j++){ cin>>p[i].Total[j]; p[i].Total[3]+=p[i].Total[j];} } for(int i=0;i