結果

問題 No.2210 equence Squence Seuence
ユーザー kuro_Bkuro_B
提出日時 2023-05-12 15:17:37
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,575 bytes
コンパイル時間 336 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 121,984 KB
最終ジャッジ日時 2024-05-06 07:33:47
合計ジャッジ時間 7,537 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
82,548 KB
testcase_01 AC 137 ms
82,556 KB
testcase_02 AC 139 ms
82,432 KB
testcase_03 AC 158 ms
91,776 KB
testcase_04 WA -
testcase_05 AC 173 ms
101,504 KB
testcase_06 AC 170 ms
97,256 KB
testcase_07 AC 205 ms
107,904 KB
testcase_08 AC 133 ms
82,604 KB
testcase_09 AC 136 ms
82,696 KB
testcase_10 AC 136 ms
82,692 KB
testcase_11 WA -
testcase_12 AC 134 ms
82,432 KB
testcase_13 AC 216 ms
115,912 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 212 ms
115,712 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 135 ms
82,688 KB
testcase_20 AC 134 ms
82,688 KB
testcase_21 AC 134 ms
82,680 KB
testcase_22 WA -
testcase_23 AC 205 ms
121,984 KB
testcase_24 AC 190 ms
113,400 KB
testcase_25 AC 201 ms
117,684 KB
testcase_26 AC 205 ms
115,420 KB
testcase_27 AC 167 ms
94,340 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

###スニペット始まり###
import sys, re
from copy import copy, deepcopy
from math import ceil, floor, sqrt,factorial, gcd, pi, degrees, radians, sin, asin, cos, acos, tan, atan2
from statistics import mean, median
from collections import Counter, deque, defaultdict
from heapq import heapify, heappop, heappush
from itertools import permutations, accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce, lru_cache
from string import ascii_uppercase, ascii_lowercase
from decimal import Decimal, ROUND_HALF_UP #四捨五入用

def input(): return sys.stdin.readline().rstrip('\n')
#easy-testのpypyでは再帰数を下げる。
if __file__=='prog.py':
    sys.setrecursionlimit(10**5)
else:
    sys.setrecursionlimit(10**6)

def lcm(a, b): return a * b // gcd(a, b)

#3つ以上の最大公約数/最小公倍数。Nを要素数、Mを数値の大きさとして、O(NlogM)
def gcd_v2(l: list): return reduce(gcd, l)
def lcm_v2(l: list): return reduce(lcm, l)

#nPk
def nPk(n, k): return factorial(n) // factorial(n - k)

#逆元
def modinv(a, mod=10**9+7): return pow(a, mod-2, mod)
INF = float('inf')
MOD = 10 ** 9 + 7
###スニペット終わり###

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

res=[-1]*N
L=0
R=N-1

for i in range(N-1):
    if A[i]>A[i+1]:
        res[L]=i
        L+=1
    else:
        res[R]=i
        R-=1
res[res.index(-1)]=N-1

ans_idx=res[K-1]
ans=[]
for i,a in enumerate(A):
    if i!=ans_idx:
        ans.append(a)
print(*ans)
0