結果

問題 No.1537 私の代わりに仕事やっといてください。
ユーザー 👑 rin204rin204
提出日時 2022-04-15 16:35:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 659 ms / 2,000 ms
コード長 305 bytes
コンパイル時間 713 ms
コンパイル使用メモリ 87,164 KB
実行使用メモリ 128,168 KB
最終ジャッジ日時 2023-08-26 06:05:01
合計ジャッジ時間 3,456 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,448 KB
testcase_01 AC 71 ms
71,284 KB
testcase_02 AC 659 ms
128,168 KB
testcase_03 AC 71 ms
71,164 KB
testcase_04 AC 70 ms
71,400 KB
testcase_05 AC 72 ms
71,316 KB
testcase_06 AC 72 ms
71,456 KB
testcase_07 AC 87 ms
76,620 KB
testcase_08 AC 84 ms
77,000 KB
testcase_09 AC 92 ms
76,852 KB
testcase_10 AC 120 ms
78,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = list(map(int, input().split()))
L = []
R = []
A = [(a, i) for i, a in enumerate(A, 1)]
A.sort(reverse = True)
t = 0
for _, i in A:
    if t:
        L.append(i)
    else:
        R.append(i)
    t ^= 1
ans = L[::-1] + R
ind = ans.index(1)
ans = ans[ind:] + ans[:ind] + [1]
print(*ans)
0