結果

問題 No.2210 equence Squence Seuence
ユーザー MasKoaTSMasKoaTS
提出日時 2023-02-10 22:22:45
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 406 bytes
コンパイル時間 185 ms
コンパイル使用メモリ 82,336 KB
実行使用メモリ 108,816 KB
最終ジャッジ日時 2024-07-07 16:33:58
合計ジャッジ時間 4,439 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
54,072 KB
testcase_01 AC 43 ms
54,524 KB
testcase_02 AC 43 ms
54,512 KB
testcase_03 AC 84 ms
85,844 KB
testcase_04 WA -
testcase_05 AC 99 ms
95,380 KB
testcase_06 AC 93 ms
90,976 KB
testcase_07 AC 138 ms
103,304 KB
testcase_08 AC 43 ms
54,116 KB
testcase_09 AC 43 ms
53,848 KB
testcase_10 AC 43 ms
54,548 KB
testcase_11 WA -
testcase_12 AC 43 ms
54,200 KB
testcase_13 AC 153 ms
108,580 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 154 ms
108,476 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 43 ms
53,956 KB
testcase_20 AC 43 ms
55,112 KB
testcase_21 AC 42 ms
53,612 KB
testcase_22 WA -
testcase_23 AC 127 ms
103,856 KB
testcase_24 AC 109 ms
96,200 KB
testcase_25 AC 118 ms
102,272 KB
testcase_26 AC 137 ms
108,772 KB
testcase_27 AC 85 ms
87,800 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