結果

問題 No.490 yukiソート
ユーザー TatsunoTatsuno
提出日時 2017-03-12 18:24:24
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 387 bytes
コンパイル時間 236 ms
コンパイル使用メモリ 10,448 KB
実行使用メモリ 12,704 KB
最終ジャッジ日時 2023-09-12 12:06:18
合計ジャッジ時間 5,376 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
12,112 KB
testcase_01 AC 15 ms
7,820 KB
testcase_02 AC 16 ms
7,784 KB
testcase_03 AC 16 ms
7,732 KB
testcase_04 AC 111 ms
7,728 KB
testcase_05 AC 108 ms
7,824 KB
testcase_06 AC 110 ms
7,696 KB
testcase_07 AC 107 ms
7,720 KB
testcase_08 AC 112 ms
7,788 KB
testcase_09 AC 105 ms
7,888 KB
testcase_10 AC 110 ms
7,696 KB
testcase_11 AC 104 ms
7,784 KB
testcase_12 AC 105 ms
7,820 KB
testcase_13 AC 104 ms
7,760 KB
testcase_14 TLE -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=list(map(int,input().split()))
while True:
    ok = False
    for i in range(1, 2*n-3):
        for p in range(0, n-1):
            q = i-p
            if p >= q or not (0 <= p < n and 0 <= q < n):
                continue
            if a[p] > a[q]:
                a[p],a[q]=a[q],a[p]
                ok = True
    if not ok:
        break
print(' '.join(map(str,a)))
0