結果
問題 | No.490 yukiソート |
ユーザー |
![]() |
提出日時 | 2018-01-02 23:21:15 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 622 bytes |
コンパイル時間 | 2,357 ms |
コンパイル使用メモリ | 165,804 KB |
実行使用メモリ | 13,568 KB |
最終ジャッジ日時 | 2024-12-23 01:14:19 |
合計ジャッジ時間 | 33,447 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 WA * 9 TLE * 10 |
ソースコード
#include <bits/stdc++.h> #define pout(n) printf ("%d\n", n) #define rep(i,a,n) for (int i = a;i < n;i++) #define per(i,n,a) for (int i = n-1;i >= a;i--) const int d4x[4] = {1, 0, -1, 0}; const int d4y[4] = {0, 1, 0, -1}; const int d8x[8] = { 1,1,0,-1,-1,-1,0,1 }; const int d8y[8] = { 0,1,1,1,0,-1,-1,-1 }; typedef long long ll; using namespace std; int main() { int n; cin >> n; int a[n]; rep(i,0,n){ cin >> a[i]; } rep(i,0,2*n-3){ rep(p,0,n-1){ rep(q,p,n-1){ if(a[p]>a[q]) swap(a[p],a[q]); } } } rep(i,0,n){ printf("%d ",a[i]); } printf("\n"); return 0; }