https://pintia.cn/problem-sets/994805342720868352/problems/994805344222429184
#includeusing namespace std; int n,score; string id,name; struct node{int a,b,t,cnt,sum; string name;}temp; map mp; vector ve; bool cmp(node a,node b) { if(a.sum==b.sum) { if(a.cnt==b.cnt) return a.name b.sum; } int main(void) { cin>>n; while(n--) { cin>>id>>score>>name; for(int i=0;i second.sum=i->second.a+i->second.b/1.5+i->second.t*1.5; i->second.name=i->first; ve.push_back(i->second); } sort(ve.begin(),ve.end(),cmp); cout< 欢迎分享,转载请注明来源:内存溢出
评论列表(0条)