結果

問題 No.490 yukiソート
ユーザー nbisconbisco
提出日時 2018-04-01 17:16:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 495 bytes
コンパイル時間 111 ms
コンパイル使用メモリ 10,880 KB
実行使用メモリ 12,708 KB
最終ジャッジ日時 2023-09-08 12:29:32
合計ジャッジ時間 22,301 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
12,256 KB
testcase_01 AC 16 ms
7,776 KB
testcase_02 AC 15 ms
7,856 KB
testcase_03 AC 16 ms
7,788 KB
testcase_04 AC 1,766 ms
7,864 KB
testcase_05 AC 1,740 ms
7,732 KB
testcase_06 AC 1,668 ms
7,820 KB
testcase_07 AC 1,986 ms
7,884 KB
testcase_08 AC 1,719 ms
7,736 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 1,920 ms
7,772 KB
testcase_14 TLE -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input().strip())
a = [int(i) for i in input().strip().split(" ")]

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