結果

問題 No.490 yukiソート
コンテスト
ユーザー aaaaaaiu
提出日時 2019-07-30 23:12:54
言語 C++17(gcc12)
(gcc 12.4.0 + boost 1.89.0)
コンパイル:
g++-12 -O2 -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
RE  
実行時間 -
コード長 323 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,681 ms
コンパイル使用メモリ 200,652 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-06-07 15:41:38
合計ジャッジ時間 7,279 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1 RE * 1
other AC * 8 WA * 5 RE * 21
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#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