結果

問題 No.2210 equence Squence Seuence
ユーザー ntudantuda
提出日時 2023-02-12 00:35:26
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 322 bytes
コンパイル時間 570 ms
コンパイル使用メモリ 87,068 KB
実行使用メモリ 107,992 KB
最終ジャッジ日時 2023-09-22 19:20:59
合計ジャッジ時間 6,395 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,364 KB
testcase_01 AC 77 ms
71,420 KB
testcase_02 AC 72 ms
71,352 KB
testcase_03 AC 117 ms
85,868 KB
testcase_04 WA -
testcase_05 AC 110 ms
88,416 KB
testcase_06 AC 105 ms
86,116 KB
testcase_07 AC 151 ms
100,560 KB
testcase_08 AC 72 ms
71,472 KB
testcase_09 AC 71 ms
71,240 KB
testcase_10 AC 71 ms
71,372 KB
testcase_11 WA -
testcase_12 AC 72 ms
71,384 KB
testcase_13 AC 167 ms
107,716 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 166 ms
107,728 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 73 ms
71,244 KB
testcase_20 AC 75 ms
71,220 KB
testcase_21 AC 73 ms
71,360 KB
testcase_22 WA -
testcase_23 AC 146 ms
100,776 KB
testcase_24 AC 129 ms
96,736 KB
testcase_25 AC 137 ms
98,276 KB
testcase_26 AC 162 ms
107,012 KB
testcase_27 AC 107 ms
89,692 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, input().split())
A = list(map(int, input().split()))
A.append(10 ** 6)
B1 = []
B2 = []
tmp = []
for i in range(N):
    tmp.append(i)
    if A[i] > A[i + 1]:
        B1 += tmp
        tmp = []
    else:
        B2 += tmp
        tmp = []
B1 += list(reversed(B2))
x = B1[K - 1]
print(*(A[:x] + A[x + 1:-1]))
0