結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 95 ms
71,784 KB
testcase_01 AC 95 ms
71,608 KB
testcase_02 AC 98 ms
71,900 KB
testcase_03 AC 134 ms
86,116 KB
testcase_04 WA -
testcase_05 AC 143 ms
96,880 KB
testcase_06 AC 141 ms
92,660 KB
testcase_07 AC 184 ms
120,772 KB
testcase_08 AC 94 ms
71,840 KB
testcase_09 AC 92 ms
71,828 KB
testcase_10 AC 93 ms
71,732 KB
testcase_11 WA -
testcase_12 AC 93 ms
71,820 KB
testcase_13 AC 198 ms
111,464 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 204 ms
111,640 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 98 ms
71,708 KB
testcase_20 AC 99 ms
71,592 KB
testcase_21 AC 96 ms
71,740 KB
testcase_22 WA -
testcase_23 AC 174 ms
118,388 KB
testcase_24 AC 157 ms
108,500 KB
testcase_25 AC 165 ms
113,492 KB
testcase_26 AC 188 ms
129,320 KB
testcase_27 AC 131 ms
89,164 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]

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