Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
320282 陈信宇 【C5-9】成绩排序 C++ 通过 100 1 MS 260 KB 335 2025-05-04 09:55:23

Tests(10/10):


#include<bits/stdc++.h> using namespace std; struct pe{ int h; int s; }a[105]; bool cmp(pe x,pe y){ return x.s>y.s; } int main(){ int n; cin>>n; for(int i=1;i<=n;i++){ cin>>a[i].s; a[i].h=i; } sort(a+1,a+n+1,cmp) ; for(int i=1;i<=n;i++){ cout<<a[i].h<<" "; } return 0; }


测评信息: