結果

問題 No.2210 equence Squence Seuence
ユーザー MasKoaTSMasKoaTS
提出日時 2023-02-10 22:22:45
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 406 bytes
コンパイル時間 331 ms
コンパイル使用メモリ 87,240 KB
実行使用メモリ 129,396 KB
最終ジャッジ日時 2023-09-21 23:37:49
合計ジャッジ時間 6,297 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 95 ms
71,616 KB
testcase_01 AC 93 ms
71,620 KB
testcase_02 AC 91 ms
71,832 KB
testcase_03 AC 125 ms
85,920 KB
testcase_04 WA -
testcase_05 AC 144 ms
97,044 KB
testcase_06 AC 136 ms
92,764 KB
testcase_07 AC 179 ms
120,688 KB
testcase_08 AC 91 ms
71,844 KB
testcase_09 AC 93 ms
71,704 KB
testcase_10 AC 93 ms
71,592 KB
testcase_11 WA -
testcase_12 AC 93 ms
71,544 KB
testcase_13 AC 193 ms
111,464 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 191 ms
111,560 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 92 ms
71,548 KB
testcase_20 AC 94 ms
71,848 KB
testcase_21 AC 92 ms
71,580 KB
testcase_22 WA -
testcase_23 AC 169 ms
118,188 KB
testcase_24 AC 155 ms
108,520 KB
testcase_25 AC 162 ms
113,696 KB
testcase_26 AC 184 ms
129,396 KB
testcase_27 AC 125 ms
89,268 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque

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

que = deque([*range(n)])
ans = [-1] * n
for i in range(n - 1):
	if(a[i] <= a[i + 1]):
		ans[que.pop()] = i
	else:
		ans[que.popleft()] = i

for i in range(n):
	if(ans[i] == -1):
		ans[que.pop()] = n - 1
x = ans[t - 1]

ans = []
for i, k in enumerate(a):
	if(i == x):
		continue
	ans.append(k)
print(*ans)
0