Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
36394 | Andrew宥杨 | 成绩排序 | C++ | Wrong Answer | 0 MS | 252 KB | 321 | 2024-01-13 13:10:22 |
#include<bits/stdc++.h> using namespace std; struct node{ int name; int score; }a[1000]; bool cmp(node A,node B){ return A.score>B.score; } int main(){ int n,m; cin>>n; for(int i=0;i<n;i++) cin>>a[i].name>>a[i].score; sort(a,a+n,cmp); for(int i=0;i<n;i++) cout<<a[i].name<<a[i].score; return 0; }