結果

問題 No.1537 私の代わりに仕事やっといてください。
ユーザー H3PO4H3PO4
提出日時 2024-04-14 09:02:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 854 ms / 2,000 ms
コード長 312 bytes
コンパイル時間 343 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 58,972 KB
最終ジャッジ日時 2024-04-14 09:03:00
合計ジャッジ時間 10,480 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 558 ms
44,316 KB
testcase_01 AC 562 ms
44,452 KB
testcase_02 AC 854 ms
58,972 KB
testcase_03 AC 603 ms
44,444 KB
testcase_04 AC 533 ms
44,320 KB
testcase_05 AC 537 ms
44,452 KB
testcase_06 AC 623 ms
44,444 KB
testcase_07 AC 544 ms
44,444 KB
testcase_08 AC 556 ms
44,580 KB
testcase_09 AC 540 ms
44,448 KB
testcase_10 AC 550 ms
44,192 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np

N = int(input())
A = np.fromstring(input(), dtype=int, sep=" ")
sorted_order = np.argsort(A) + 1
answer_order = np.concatenate([sorted_order[::2], sorted_order[1::2][::-1]])
one_key = np.where(answer_order == 1)[0][0]
ans = np.roll(answer_order, -one_key)
ans = np.append(ans, 1)
print(*ans)
0