結果

問題 No.490 yukiソート
ユーザー TatsunoTatsuno
提出日時 2017-03-12 18:34:32
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 205 ms / 2,000 ms
コード長 387 bytes
コンパイル時間 307 ms
コンパイル使用メモリ 87,176 KB
実行使用メモリ 77,052 KB
最終ジャッジ日時 2023-09-12 12:06:26
合計ジャッジ時間 5,675 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,520 KB
testcase_01 AC 74 ms
71,612 KB
testcase_02 AC 77 ms
71,572 KB
testcase_03 AC 79 ms
71,444 KB
testcase_04 AC 87 ms
76,672 KB
testcase_05 AC 85 ms
76,484 KB
testcase_06 AC 86 ms
76,684 KB
testcase_07 AC 85 ms
76,468 KB
testcase_08 AC 88 ms
76,688 KB
testcase_09 AC 85 ms
76,584 KB
testcase_10 AC 85 ms
76,624 KB
testcase_11 AC 85 ms
76,580 KB
testcase_12 AC 89 ms
76,604 KB
testcase_13 AC 85 ms
76,268 KB
testcase_14 AC 205 ms
76,696 KB
testcase_15 AC 177 ms
76,676 KB
testcase_16 AC 176 ms
76,824 KB
testcase_17 AC 176 ms
76,720 KB
testcase_18 AC 177 ms
76,816 KB
testcase_19 AC 179 ms
76,736 KB
testcase_20 AC 184 ms
77,052 KB
testcase_21 AC 176 ms
77,000 KB
testcase_22 AC 185 ms
76,980 KB
testcase_23 AC 175 ms
76,848 KB
testcase_24 AC 73 ms
71,452 KB
testcase_25 AC 72 ms
71,484 KB
testcase_26 AC 72 ms
71,548 KB
testcase_27 AC 71 ms
71,452 KB
testcase_28 AC 72 ms
71,516 KB
testcase_29 AC 71 ms
71,464 KB
testcase_30 AC 70 ms
71,684 KB
testcase_31 AC 71 ms
71,444 KB
testcase_32 AC 73 ms
71,296 KB
testcase_33 AC 73 ms
71,496 KB
testcase_34 AC 72 ms
71,444 KB
testcase_35 AC 72 ms
71,608 KB
権限があれば一括ダウンロードができます

ソースコード

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