結果

問題 No.490 yukiソート
ユーザー nbisconbisco
提出日時 2018-04-01 17:29:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 142 ms / 2,000 ms
コード長 324 bytes
コンパイル時間 1,068 ms
コンパイル使用メモリ 86,972 KB
実行使用メモリ 76,728 KB
最終ジャッジ日時 2023-09-08 12:31:10
合計ジャッジ時間 5,881 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,168 KB
testcase_01 AC 71 ms
71,328 KB
testcase_02 AC 72 ms
71,200 KB
testcase_03 AC 72 ms
71,248 KB
testcase_04 AC 85 ms
76,188 KB
testcase_05 AC 85 ms
76,332 KB
testcase_06 AC 83 ms
76,060 KB
testcase_07 AC 85 ms
76,068 KB
testcase_08 AC 85 ms
76,116 KB
testcase_09 AC 85 ms
76,140 KB
testcase_10 AC 85 ms
76,120 KB
testcase_11 AC 88 ms
76,036 KB
testcase_12 AC 82 ms
76,256 KB
testcase_13 AC 83 ms
76,132 KB
testcase_14 AC 140 ms
76,412 KB
testcase_15 AC 142 ms
76,516 KB
testcase_16 AC 138 ms
76,588 KB
testcase_17 AC 139 ms
76,376 KB
testcase_18 AC 140 ms
76,560 KB
testcase_19 AC 139 ms
76,504 KB
testcase_20 AC 141 ms
76,728 KB
testcase_21 AC 139 ms
76,496 KB
testcase_22 AC 139 ms
76,332 KB
testcase_23 AC 140 ms
76,496 KB
testcase_24 AC 72 ms
71,132 KB
testcase_25 AC 72 ms
71,100 KB
testcase_26 AC 72 ms
71,376 KB
testcase_27 AC 72 ms
71,188 KB
testcase_28 AC 73 ms
71,252 KB
testcase_29 AC 71 ms
71,232 KB
testcase_30 AC 72 ms
71,256 KB
testcase_31 AC 72 ms
71,248 KB
testcase_32 AC 72 ms
71,240 KB
testcase_33 AC 72 ms
71,208 KB
testcase_34 AC 72 ms
71,040 KB
testcase_35 AC 73 ms
71,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input().strip())
a = [int(i) for i in input().strip().split(" ")]

for i in range(1, 2*n-3):
    for p in range(i+1):
        q = i - p
        if p > q or q >= n:
            continue
        if a[p] > a[q]:
            tmp = a[q]
            a[q] = a[p]
            a[p] = tmp
print(" ".join([str(i) for i in a]))
0