結果

問題 No.2210 equence Squence Seuence
ユーザー hiryuNhiryuN
提出日時 2023-02-10 21:46:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 163 ms / 2,000 ms
コード長 358 bytes
コンパイル時間 820 ms
コンパイル使用メモリ 86,476 KB
実行使用メモリ 111,264 KB
最終ジャッジ日時 2023-09-21 22:55:07
合計ジャッジ時間 6,059 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,284 KB
testcase_01 AC 78 ms
71,088 KB
testcase_02 AC 79 ms
71,280 KB
testcase_03 AC 107 ms
83,520 KB
testcase_04 AC 108 ms
84,452 KB
testcase_05 AC 117 ms
90,240 KB
testcase_06 AC 110 ms
87,240 KB
testcase_07 AC 145 ms
103,768 KB
testcase_08 AC 77 ms
70,944 KB
testcase_09 AC 77 ms
71,208 KB
testcase_10 AC 78 ms
71,272 KB
testcase_11 AC 79 ms
71,328 KB
testcase_12 AC 77 ms
70,924 KB
testcase_13 AC 158 ms
108,900 KB
testcase_14 AC 163 ms
107,112 KB
testcase_15 AC 160 ms
107,224 KB
testcase_16 AC 158 ms
108,980 KB
testcase_17 AC 162 ms
109,072 KB
testcase_18 AC 79 ms
71,096 KB
testcase_19 AC 80 ms
71,324 KB
testcase_20 AC 79 ms
71,084 KB
testcase_21 AC 78 ms
70,924 KB
testcase_22 AC 78 ms
71,136 KB
testcase_23 AC 140 ms
104,320 KB
testcase_24 AC 128 ms
97,684 KB
testcase_25 AC 135 ms
100,892 KB
testcase_26 AC 151 ms
111,264 KB
testcase_27 AC 108 ms
84,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k=map(int,input().split())
A=list(map(int,input().split()))
A.append(0)
start=0 
end=n+1 
pok=1
for q in range(n):
    if A[q]>A[q+1]:
        start+=pok 
        pok=1
    elif A[q]<A[q+1]:
        end-=pok
        pok=1
    else:
        pok+=1
    if start>=k or end<=k:
            del A[n]
            del A[q]
            print(*A)
            exit()
0