| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 101652 | 柯昊阳 | 插入排序 | C++ | Accepted | 100 | 0 MS | 252 KB | 366 | 2023-09-09 14:03:58 |
#include <bits/stdc++.h> using namespace std; int arr[1000005]; int main(){ int n; cin>>n; for(int i = 0;i<n;i++) cin>>arr[i]; int t; cin>>t; int j = n-1; while(j>=0&&arr[j]>t){ arr[j+1] = arr[j]; j--; } arr[j+1] = t; for(int i = 0;i<=n;i++) cout<<arr[i]<<" "; cout<<endl; return 0; }