Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
12688 | 苏莉雯 | 期末考试成绩排名 | C++ | Accepted | 100 | 1 MS | 304 KB | 394 | 2025-08-17 11:08:18 |
#include<bits/stdc++.h> using namespace std; struct fs { int xh,cj; string name; } s[1000]; bool cmp1(fs a,fs c) { return a.cj>c.cj||a.cj==c.cj&&a.xh<c.xh; } int main() { int n,g=1,d; char e; cin>>n; for(int i=0; i<n; i++) { cin>>s[i].xh>>s[i].name>>s[i].cj; } sort(s,s+n,cmp1); for(int i=0;i<n;i++) { cout<<s[i].xh<<" "<<s[i].name<<" "<<s[i].cj<<endl; } }