結果

問題 No.2210 equence Squence Seuence
ユーザー first_vilfirst_vil
提出日時 2023-02-10 22:02:48
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 862 bytes
コンパイル時間 416 ms
コンパイル使用メモリ 87,036 KB
実行使用メモリ 124,860 KB
最終ジャッジ日時 2023-09-21 23:18:09
合計ジャッジ時間 5,786 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,332 KB
testcase_01 AC 73 ms
71,472 KB
testcase_02 AC 74 ms
71,172 KB
testcase_03 AC 106 ms
84,252 KB
testcase_04 WA -
testcase_05 AC 116 ms
92,892 KB
testcase_06 AC 111 ms
91,028 KB
testcase_07 AC 145 ms
106,760 KB
testcase_08 AC 74 ms
71,316 KB
testcase_09 AC 73 ms
71,228 KB
testcase_10 AC 77 ms
71,416 KB
testcase_11 WA -
testcase_12 AC 74 ms
71,292 KB
testcase_13 AC 157 ms
107,556 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 155 ms
107,340 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 73 ms
71,240 KB
testcase_20 AC 72 ms
71,360 KB
testcase_21 AC 74 ms
71,352 KB
testcase_22 WA -
testcase_23 AC 140 ms
115,300 KB
testcase_24 AC 125 ms
105,968 KB
testcase_25 AC 135 ms
110,832 KB
testcase_26 AC 153 ms
124,860 KB
testcase_27 AC 110 ms
87,928 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

int1 = lambda x: int(x) - 1

# input = lambda: sys.stdin.buffer.readline()
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
i1 = lambda: int1(input())
mi = lambda: map(int, input().split())
mi1 = lambda: map(int1, input().split())
li = lambda: list(mi())
li1 = lambda: list(mi1())
lli = lambda n: [li() for _ in range(n)]

INF = float("inf")
# mod = int(1e9 + 7)
mod = 998244353

n, k = mi()
a = li()

b = []
for i in range(n - 1):
    # i要素目の値が何になるか考える
    if a[i] == a[i + 1]:
        b.append(a[i])
        continue

    suf = n - i - 1
    if a[i] < a[i + 1]:
        if k <= suf:
            pass
        else:
            b += a[i + 1 :]
            break
    else:
        if k <= 1:
            b += a[i + 1 :]
            break
        else:
            k -= 1
    b.append(a[i])
print(*b)
0