結果

問題 No.490 yukiソート
ユーザー tsubametsubame
提出日時 2017-04-01 12:47:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 332 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 10,696 KB
実行使用メモリ 8,380 KB
最終ジャッジ日時 2023-09-22 02:01:03
合計ジャッジ時間 22,878 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,792 KB
testcase_01 WA -
testcase_02 AC 18 ms
7,732 KB
testcase_03 AC 17 ms
7,920 KB
testcase_04 AC 65 ms
7,924 KB
testcase_05 AC 56 ms
7,792 KB
testcase_06 AC 61 ms
7,944 KB
testcase_07 AC 61 ms
7,876 KB
testcase_08 AC 61 ms
7,772 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 TLE -
testcase_16 TLE -
testcase_17 WA -
testcase_18 TLE -
testcase_19 WA -
testcase_20 WA -
testcase_21 TLE -
testcase_22 TLE -
testcase_23 TLE -
testcase_24 AC 17 ms
7,812 KB
testcase_25 AC 16 ms
7,816 KB
testcase_26 AC 17 ms
7,768 KB
testcase_27 AC 17 ms
7,912 KB
testcase_28 AC 16 ms
7,764 KB
testcase_29 AC 17 ms
7,812 KB
testcase_30 AC 16 ms
7,952 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python

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

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