結果
問題 | No.490 yukiソート |
ユーザー |
|
提出日時 | 2019-07-30 23:23:17 |
言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 350 bytes |
コンパイル時間 | 6,938 ms |
コンパイル使用メモリ | 252,884 KB |
最終ジャッジ日時 | 2025-01-07 10:11:35 |
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | AC * 2 WA * 16 RE * 16 |
ソースコード
#include <bits/stdc++.h>using namespace std;typedef long long ll;int main() {int n;cin>>n;int a[n];for(int i=0;i<n;i++)cin>>a[i];for(int i=1;i<2*n-3;i++)for(int p=0;p<=i;p++){int q=i-p;if(a[p]>a[q])swap(a[p],a[q]);}for(int x:a)cout<<x<<' ';cout<<endl;return 0;}