結果

問題 No.490 yukiソート
ユーザー Mario
提出日時 2018-05-14 00:01:03
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 1,969 ms / 2,000 ms
コード長 266 bytes
コンパイル時間 294 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-06-28 10:47:49
合計ジャッジ時間 22,195 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 34
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))

for i in range(0, 2 * n - 3):
    for p in range(min(i, n-1)):
        q = i - p
        if p < q and q <= n - 1:
            if a[p] > a[q]:
                a[p], a[q] = a[q], a[p]

print(" ".join(map(str, a)))
0