Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
133494 王丞杰 22插入数据 C++ Accepted 1 MS 272 KB 273 2025-10-18 23:01:44

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int a[120]; int main() { int n,m,s; cin>>n; for(int i=1;i<=n-1;i++){ cin>>a[i]; s=a[1]; } cin>>m; a[n]={m}; sort(a,a+n+1,greater<int>()); cout<<s<<" "; for(int i=1;i<n;i++){ cout<<a[i]<<" "; } }