| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 118176 | 邓芷淇 | 插入排序 | C++ | Accepted | 100 | 0 MS | 256 KB | 384 | 2023-12-28 20:36:08 |
#include<bits/stdc++.h> #include<algorithm> using namespace std; typedef unsigned long long ull; typedef long long ll; int n,x,a[10004]; bool b=1; int main() { cin>>n; for(int i=1;i<=n;i++) { cin>>a[i]; } cin>>x; for(int i=1;i<=n;i++) { if(a[i]>x&&b) { b=0; cout<<x<<" "; } cout<<a[i]<<" "; } if(b) { cout<<x; } return 0; }