結果

問題 No.490 yukiソート
ユーザー @abcde
提出日時 2019-02-23 09:24:38
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 509 bytes
コンパイル時間 1,196 ms
コンパイル使用メモリ 159,232 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-11-28 15:24:42
合計ジャッジ時間 2,178 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13 WA * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long LL;

int main() {
    
    // 1. 入力情報取得.
    int N;
    cin >> N;
    
    // 2. yukiソートを確認.
    LL ans[N];
    for(int i = 0; i < N; i++) cin >> ans[i];
    // corner_3.txt などで, WAとなった.
    // sort(ans, ans + N);
    for(int q = 1; q < N; q++) for(int p = 0; p < q; p++) if(ans[p] > ans[q]) swap(ans[p], ans[q]);

    // 3. 出力.
    for(int i = 0; i < N; i++) cout << ans[i] << " ";
    return 0;
    
}
0