結果

問題 No.1537 私の代わりに仕事やっといてください。
コンテスト
ユーザー H3PO4
提出日時 2024-04-14 09:02:49
言語 Python3
(3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 377 ms / 2,000 ms
+ 434µs
コード長 312 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 52 ms
コンパイル使用メモリ 14,976 KB
実行使用メモリ 51,468 KB
最終ジャッジ日時 2026-09-09 11:38:14
合計ジャッジ時間 6,975 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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