結果

問題 No.490 yukiソート
ユーザー 👑 yumechiyumechi
提出日時 2017-03-10 22:34:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 146 ms / 2,000 ms
コード長 321 bytes
コンパイル時間 1,257 ms
コンパイル使用メモリ 87,120 KB
実行使用メモリ 77,108 KB
最終ジャッジ日時 2023-09-06 15:39:28
合計ジャッジ時間 5,976 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,508 KB
testcase_01 AC 69 ms
71,512 KB
testcase_02 AC 69 ms
71,532 KB
testcase_03 AC 70 ms
71,484 KB
testcase_04 AC 82 ms
76,204 KB
testcase_05 AC 80 ms
76,104 KB
testcase_06 AC 81 ms
75,812 KB
testcase_07 AC 82 ms
76,084 KB
testcase_08 AC 80 ms
76,088 KB
testcase_09 AC 83 ms
76,204 KB
testcase_10 AC 85 ms
75,860 KB
testcase_11 AC 82 ms
75,920 KB
testcase_12 AC 84 ms
76,092 KB
testcase_13 AC 82 ms
76,048 KB
testcase_14 AC 146 ms
76,868 KB
testcase_15 AC 144 ms
76,628 KB
testcase_16 AC 143 ms
76,728 KB
testcase_17 AC 142 ms
76,632 KB
testcase_18 AC 141 ms
77,108 KB
testcase_19 AC 145 ms
76,800 KB
testcase_20 AC 142 ms
76,836 KB
testcase_21 AC 144 ms
76,952 KB
testcase_22 AC 140 ms
76,804 KB
testcase_23 AC 141 ms
76,724 KB
testcase_24 AC 71 ms
71,256 KB
testcase_25 AC 71 ms
71,436 KB
testcase_26 AC 72 ms
71,212 KB
testcase_27 AC 72 ms
71,316 KB
testcase_28 AC 69 ms
71,204 KB
testcase_29 AC 71 ms
71,556 KB
testcase_30 AC 71 ms
71,260 KB
testcase_31 AC 71 ms
71,280 KB
testcase_32 AC 71 ms
71,128 KB
testcase_33 AC 71 ms
71,260 KB
testcase_34 AC 71 ms
71,288 KB
testcase_35 AC 71 ms
71,076 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    n = int(input())
    al = [int(i) for i in input().split()]
    for i in range(1, 2 * n - 3):
        for j in range(n - 1):
            p, q = j, i - j
            if 0 <= p < q <= n - 1 and al[p] > al[q]:
                al[p], al[q] = al[q], al[p]
    print(*al)

if __name__=="__main__":
    solve()
0