結果

問題 No.490 yukiソート
ユーザー aaaaaaiu
提出日時 2019-07-30 23:12:54
言語 C++17(gcc12)
(gcc 12.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 323 bytes
コンパイル時間 7,632 ms
コンパイル使用メモリ 252,384 KB
最終ジャッジ日時 2025-01-07 10:10:36
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 5 WA * 9 RE * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#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 l=0,r=i;l<r;l++,r--)
            if(a[l]>a[r])swap(a[l],a[r]);
    for(int x:a)cout<<x<<' ';
    cout<<endl;
    return 0;
}
0