| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 101626 | 梁乃元 | 插入排序 | C++ | Wrong Answer | 0 | 0 MS | 248 KB | 514 | 2023-09-09 11:30:33 |
#include <iostream> #include <algorithm> using namespace std ; int a [114514] ; int main ( ) { int n ; cin >> n ; for ( int i = 1 ; i <= n + 1 ; i ++ ) { cin >> a [i] ; } for ( int i = 1 ; i < n ; i ++ ) { for ( int j = i + 1 ; j <= n ; j ++ ) { if ( a [i] > a [j] ) { swap ( a [i] , a [j] ) ; } } } for ( int i = 1 ; i <= n ; i ++ ) { cout << a [i] ; if ( i == n + 1 ) { cout << endl ; } else { cout << ' ' ; } } return 0 ; }