模板题,题解。
2024-08-04 14:51:26
发布于:北京
9阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
struct student{
string c,n;
long long chengji;
}a[1000100];
bool cmp(student a,student b){
return a.c<b.c;
}
int main(){
int ac;
cin>>ac;
for(int i=0;i<ac;++i)cin>>a[i].c>>a[i].n>>a[i].chengji;
sort(a,a+ac,cmp);
for(int i=0;i<ac;++i)cout<<a[i].chengji<<"\n";
return 0;
}
这里空空如也
有帮助,赞一个