結果

問題 No.490 yukiソート
ユーザー _KingdomOfMoray_KingdomOfMoray
提出日時 2019-12-30 23:55:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 83 ms / 2,000 ms
コード長 456 bytes
コンパイル時間 190 ms
コンパイル使用メモリ 82,328 KB
実行使用メモリ 65,356 KB
最終ジャッジ日時 2024-04-27 17:58:05
合計ジャッジ時間 3,332 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,276 KB
testcase_01 AC 39 ms
52,344 KB
testcase_02 AC 39 ms
53,652 KB
testcase_03 AC 40 ms
52,552 KB
testcase_04 AC 52 ms
62,636 KB
testcase_05 AC 55 ms
62,820 KB
testcase_06 AC 54 ms
62,176 KB
testcase_07 AC 56 ms
63,264 KB
testcase_08 AC 58 ms
62,520 KB
testcase_09 AC 55 ms
62,064 KB
testcase_10 AC 54 ms
63,168 KB
testcase_11 AC 57 ms
63,572 KB
testcase_12 AC 53 ms
62,812 KB
testcase_13 AC 52 ms
63,268 KB
testcase_14 AC 79 ms
64,700 KB
testcase_15 AC 83 ms
65,356 KB
testcase_16 AC 80 ms
64,996 KB
testcase_17 AC 79 ms
64,260 KB
testcase_18 AC 78 ms
64,596 KB
testcase_19 AC 77 ms
63,592 KB
testcase_20 AC 78 ms
65,240 KB
testcase_21 AC 78 ms
64,784 KB
testcase_22 AC 78 ms
64,332 KB
testcase_23 AC 78 ms
64,832 KB
testcase_24 AC 38 ms
53,292 KB
testcase_25 AC 38 ms
53,144 KB
testcase_26 AC 38 ms
52,404 KB
testcase_27 AC 38 ms
52,952 KB
testcase_28 AC 37 ms
53,684 KB
testcase_29 AC 38 ms
52,580 KB
testcase_30 AC 38 ms
52,316 KB
testcase_31 AC 40 ms
53,200 KB
testcase_32 AC 38 ms
52,616 KB
testcase_33 AC 39 ms
53,060 KB
testcase_34 AC 38 ms
53,376 KB
testcase_35 AC 37 ms
51,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a_list = list(map(int,input().split()))

start = 0
end = 2 * n - 3

for i in range(start + 1, end):
    for j in range(0, i // 2 + 1):
        if i - j <= n - 1:
            if j == i - j:
                pass
            else:
                if a_list[j] > a_list[i - j]:
                    a_list[j], a_list[i - j] = a_list[i - j], a_list[j]
                
a_list_str = [str(e) for e in a_list]
res = ' '.join(a_list_str)

print(res)
0