結果

問題 No.2210 equence Squence Seuence
ユーザー tamatotamato
提出日時 2023-02-10 21:33:02
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 582 bytes
コンパイル時間 1,363 ms
コンパイル使用メモリ 86,568 KB
実行使用メモリ 114,756 KB
最終ジャッジ日時 2023-09-21 22:36:24
合計ジャッジ時間 5,435 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,272 KB
testcase_01 AC 71 ms
71,116 KB
testcase_02 AC 71 ms
71,216 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 110 ms
90,972 KB
testcase_07 AC 145 ms
100,164 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 70 ms
70,892 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 164 ms
106,968 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 72 ms
71,136 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 139 ms
114,756 KB
testcase_24 AC 127 ms
105,936 KB
testcase_25 AC 133 ms
110,812 KB
testcase_26 AC 150 ms
107,008 KB
testcase_27 AC 102 ms
87,448 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 998244353


def main():
    import sys
    input = sys.stdin.readline

    N, K = map(int, input().split())
    A = list(map(int, input().split()))

    ans = [-1] * N
    l = 0
    r = N-1
    for i in range(N-1):
        if A[i] < A[i+1]:
            ans[r] = i
            r -= 1
        else:
            ans[l] = i
            l -= 1
    for i in range(N-1):
        if ans[i] == -1:
            ans[i] = N - 1
    B = []
    for i in range(N):
        if i == ans[K - 1]:
            continue
        B.append(A[i])
    print(*B)


if __name__ == '__main__':
    main()
0