結果

問題 No.490 yukiソート
ユーザー pofpof
提出日時 2019-07-16 13:22:13
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,278 ms / 2,000 ms
コード長 237 bytes
コンパイル時間 116 ms
コンパイル使用メモリ 10,724 KB
実行使用メモリ 8,376 KB
最終ジャッジ日時 2023-08-20 12:34:20
合計ジャッジ時間 14,697 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,832 KB
testcase_01 AC 15 ms
7,784 KB
testcase_02 AC 15 ms
7,800 KB
testcase_03 AC 14 ms
7,820 KB
testcase_04 AC 41 ms
7,924 KB
testcase_05 AC 42 ms
7,860 KB
testcase_06 AC 42 ms
7,820 KB
testcase_07 AC 40 ms
7,820 KB
testcase_08 AC 39 ms
7,912 KB
testcase_09 AC 40 ms
7,804 KB
testcase_10 AC 41 ms
7,804 KB
testcase_11 AC 45 ms
7,872 KB
testcase_12 AC 44 ms
7,992 KB
testcase_13 AC 42 ms
7,924 KB
testcase_14 AC 1,156 ms
8,240 KB
testcase_15 AC 1,208 ms
8,248 KB
testcase_16 AC 1,167 ms
8,376 KB
testcase_17 AC 1,224 ms
8,316 KB
testcase_18 AC 1,236 ms
8,296 KB
testcase_19 AC 1,227 ms
8,292 KB
testcase_20 AC 1,208 ms
8,240 KB
testcase_21 AC 1,263 ms
8,376 KB
testcase_22 AC 1,193 ms
8,224 KB
testcase_23 AC 1,278 ms
8,244 KB
testcase_24 AC 14 ms
7,832 KB
testcase_25 AC 14 ms
7,804 KB
testcase_26 AC 15 ms
7,868 KB
testcase_27 AC 13 ms
7,852 KB
testcase_28 AC 14 ms
7,980 KB
testcase_29 AC 15 ms
7,804 KB
testcase_30 AC 14 ms
7,868 KB
testcase_31 AC 15 ms
7,888 KB
testcase_32 AC 14 ms
7,800 KB
testcase_33 AC 15 ms
7,912 KB
testcase_34 AC 14 ms
7,824 KB
testcase_35 AC 14 ms
7,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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