結果

問題 No.490 yukiソート
ユーザー tsubametsubame
提出日時 2017-04-01 13:05:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 767 ms / 2,000 ms
コード長 308 bytes
コンパイル時間 194 ms
コンパイル使用メモリ 10,728 KB
実行使用メモリ 8,360 KB
最終ジャッジ日時 2023-09-22 02:02:09
合計ジャッジ時間 9,218 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,848 KB
testcase_01 AC 18 ms
7,792 KB
testcase_02 AC 17 ms
7,764 KB
testcase_03 AC 16 ms
7,908 KB
testcase_04 AC 32 ms
7,896 KB
testcase_05 AC 31 ms
7,916 KB
testcase_06 AC 30 ms
7,908 KB
testcase_07 AC 31 ms
7,796 KB
testcase_08 AC 31 ms
7,868 KB
testcase_09 AC 33 ms
7,804 KB
testcase_10 AC 30 ms
7,896 KB
testcase_11 AC 32 ms
7,840 KB
testcase_12 AC 32 ms
7,744 KB
testcase_13 AC 30 ms
7,744 KB
testcase_14 AC 670 ms
8,360 KB
testcase_15 AC 711 ms
8,284 KB
testcase_16 AC 707 ms
8,236 KB
testcase_17 AC 767 ms
8,232 KB
testcase_18 AC 687 ms
8,340 KB
testcase_19 AC 633 ms
8,232 KB
testcase_20 AC 648 ms
8,168 KB
testcase_21 AC 707 ms
8,336 KB
testcase_22 AC 706 ms
8,168 KB
testcase_23 AC 710 ms
8,232 KB
testcase_24 AC 17 ms
7,924 KB
testcase_25 AC 17 ms
7,796 KB
testcase_26 AC 17 ms
7,796 KB
testcase_27 AC 17 ms
7,864 KB
testcase_28 AC 17 ms
7,760 KB
testcase_29 AC 17 ms
7,820 KB
testcase_30 AC 17 ms
7,812 KB
testcase_31 AC 17 ms
7,740 KB
testcase_32 AC 17 ms
7,744 KB
testcase_33 AC 16 ms
7,856 KB
testcase_34 AC 17 ms
7,864 KB
testcase_35 AC 17 ms
7,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python

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

for i in range(1, 2 * n - 3):
    for p in range(max(0, i - n + 1), (i + 1) // 2):
        #print(i, p, i-p)
        if a[p] > a[i - p]:
            a[p], a[i - p] = a[i - p], a[p]
        
print(' '.join(list(map(str, a))))
0