結果

問題 No.490 yukiソート
ユーザー nisizawanisizawa
提出日時 2017-12-05 21:02:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 645 ms / 2,000 ms
コード長 262 bytes
コンパイル時間 83 ms
コンパイル使用メモリ 10,672 KB
実行使用メモリ 8,520 KB
最終ジャッジ日時 2023-08-19 03:35:08
合計ジャッジ時間 8,402 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
7,820 KB
testcase_01 AC 13 ms
7,820 KB
testcase_02 AC 13 ms
7,856 KB
testcase_03 AC 12 ms
7,916 KB
testcase_04 AC 26 ms
7,824 KB
testcase_05 AC 26 ms
7,848 KB
testcase_06 AC 26 ms
7,820 KB
testcase_07 AC 26 ms
7,888 KB
testcase_08 AC 25 ms
7,784 KB
testcase_09 AC 26 ms
7,832 KB
testcase_10 AC 26 ms
7,856 KB
testcase_11 AC 26 ms
7,812 KB
testcase_12 AC 27 ms
7,832 KB
testcase_13 AC 27 ms
7,900 KB
testcase_14 AC 618 ms
8,384 KB
testcase_15 AC 638 ms
8,444 KB
testcase_16 AC 631 ms
8,488 KB
testcase_17 AC 625 ms
8,388 KB
testcase_18 AC 638 ms
8,404 KB
testcase_19 AC 645 ms
8,388 KB
testcase_20 AC 644 ms
8,520 KB
testcase_21 AC 638 ms
8,404 KB
testcase_22 AC 625 ms
8,472 KB
testcase_23 AC 569 ms
8,408 KB
testcase_24 AC 13 ms
7,848 KB
testcase_25 AC 13 ms
7,820 KB
testcase_26 AC 13 ms
7,960 KB
testcase_27 AC 13 ms
7,916 KB
testcase_28 AC 12 ms
7,752 KB
testcase_29 AC 13 ms
7,964 KB
testcase_30 AC 12 ms
7,848 KB
testcase_31 AC 13 ms
7,900 KB
testcase_32 AC 12 ms
7,904 KB
testcase_33 AC 13 ms
7,752 KB
testcase_34 AC 12 ms
7,816 KB
testcase_35 AC 13 ms
7,860 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

for i in range(1, 2 * n - 3):
    for p in range(max(i - n + 1, 0), int(i / 2 + 0.5)):
        q = i - p
        if a[p] > a[q]:
            a[p], a[q] = a[q], a[p]
for i in a:
    print(i, end=' ')
print('')
0