結果

問題 No.490 yukiソート
ユーザー kohei2019kohei2019
提出日時 2022-02-01 20:34:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 174 ms / 2,000 ms
コード長 272 bytes
コンパイル時間 376 ms
コンパイル使用メモリ 87,240 KB
実行使用メモリ 77,912 KB
最終ジャッジ日時 2023-09-02 02:35:01
合計ジャッジ時間 5,664 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,436 KB
testcase_01 AC 71 ms
71,412 KB
testcase_02 AC 69 ms
71,328 KB
testcase_03 AC 71 ms
71,364 KB
testcase_04 AC 86 ms
76,732 KB
testcase_05 AC 85 ms
76,328 KB
testcase_06 AC 85 ms
76,704 KB
testcase_07 AC 85 ms
76,332 KB
testcase_08 AC 84 ms
76,540 KB
testcase_09 AC 84 ms
76,320 KB
testcase_10 AC 85 ms
76,328 KB
testcase_11 AC 84 ms
76,756 KB
testcase_12 AC 85 ms
76,436 KB
testcase_13 AC 82 ms
76,660 KB
testcase_14 AC 172 ms
77,732 KB
testcase_15 AC 171 ms
77,892 KB
testcase_16 AC 172 ms
77,588 KB
testcase_17 AC 174 ms
77,772 KB
testcase_18 AC 171 ms
77,848 KB
testcase_19 AC 173 ms
77,824 KB
testcase_20 AC 169 ms
77,832 KB
testcase_21 AC 171 ms
77,912 KB
testcase_22 AC 170 ms
77,760 KB
testcase_23 AC 170 ms
77,844 KB
testcase_24 AC 72 ms
71,272 KB
testcase_25 AC 69 ms
71,280 KB
testcase_26 AC 71 ms
71,092 KB
testcase_27 AC 69 ms
71,312 KB
testcase_28 AC 71 ms
71,364 KB
testcase_29 AC 71 ms
71,324 KB
testcase_30 AC 72 ms
71,416 KB
testcase_31 AC 71 ms
71,428 KB
testcase_32 AC 71 ms
71,572 KB
testcase_33 AC 72 ms
71,532 KB
testcase_34 AC 69 ms
71,364 KB
testcase_35 AC 70 ms
71,252 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
lsA = list(map(int,input().split()))

for i in range(1,2*N-3):
    r = []
    for p in range((i+1)//2):
        if i -p < N:
            r.append((p,i-p))
    for p,q in r:
        if lsA[p] > lsA[q]:
            lsA[p],lsA[q] = lsA[q],lsA[p]
print(*lsA)
0