結果

問題 No.490 yukiソート
ユーザー convexineqconvexineq
提出日時 2021-02-09 06:32:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 122 ms / 2,000 ms
コード長 241 bytes
コンパイル時間 1,072 ms
コンパイル使用メモリ 87,128 KB
実行使用メモリ 76,960 KB
最終ジャッジ日時 2023-09-20 17:21:14
合計ジャッジ時間 5,640 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,244 KB
testcase_01 AC 77 ms
71,404 KB
testcase_02 AC 75 ms
71,448 KB
testcase_03 AC 74 ms
71,096 KB
testcase_04 AC 87 ms
76,304 KB
testcase_05 AC 85 ms
76,324 KB
testcase_06 AC 83 ms
76,324 KB
testcase_07 AC 87 ms
76,292 KB
testcase_08 AC 85 ms
76,364 KB
testcase_09 AC 84 ms
76,264 KB
testcase_10 AC 84 ms
76,320 KB
testcase_11 AC 86 ms
76,324 KB
testcase_12 AC 85 ms
76,328 KB
testcase_13 AC 87 ms
76,220 KB
testcase_14 AC 122 ms
76,784 KB
testcase_15 AC 120 ms
76,776 KB
testcase_16 AC 119 ms
76,724 KB
testcase_17 AC 121 ms
76,812 KB
testcase_18 AC 122 ms
76,936 KB
testcase_19 AC 119 ms
76,864 KB
testcase_20 AC 120 ms
76,704 KB
testcase_21 AC 117 ms
76,788 KB
testcase_22 AC 118 ms
76,532 KB
testcase_23 AC 119 ms
76,960 KB
testcase_24 AC 74 ms
71,316 KB
testcase_25 AC 74 ms
71,224 KB
testcase_26 AC 76 ms
71,224 KB
testcase_27 AC 73 ms
71,260 KB
testcase_28 AC 74 ms
71,540 KB
testcase_29 AC 74 ms
71,176 KB
testcase_30 AC 76 ms
71,216 KB
testcase_31 AC 77 ms
71,348 KB
testcase_32 AC 76 ms
71,220 KB
testcase_33 AC 80 ms
71,096 KB
testcase_34 AC 74 ms
71,032 KB
testcase_35 AC 75 ms
71,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
*a, = map(int,input().split())
for i in range(1,2*n-3):
    for p in range(min(n,i+1)):
        q = i-p
        if q >= n: continue
        if p >= q: break
        if a[p] > a[q]:
            a[p],a[q] = a[q],a[p]
print(*a)
0