結果

問題 No.2210 equence Squence Seuence
ユーザー Mat_hMat_h
提出日時 2023-02-10 22:26:26
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 618 bytes
コンパイル時間 101 ms
コンパイル使用メモリ 10,896 KB
実行使用メモリ 30,396 KB
最終ジャッジ日時 2023-09-21 23:40:28
合計ジャッジ時間 4,447 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,956 KB
testcase_01 AC 16 ms
7,824 KB
testcase_02 AC 16 ms
7,840 KB
testcase_03 AC 60 ms
13,056 KB
testcase_04 WA -
testcase_05 AC 91 ms
16,896 KB
testcase_06 WA -
testcase_07 AC 182 ms
26,780 KB
testcase_08 AC 16 ms
7,904 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 16 ms
7,796 KB
testcase_12 WA -
testcase_13 AC 186 ms
29,996 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 185 ms
29,884 KB
testcase_17 WA -
testcase_18 AC 16 ms
7,776 KB
testcase_19 AC 16 ms
7,940 KB
testcase_20 WA -
testcase_21 AC 16 ms
7,836 KB
testcase_22 AC 16 ms
7,804 KB
testcase_23 AC 168 ms
25,884 KB
testcase_24 AC 117 ms
22,984 KB
testcase_25 AC 149 ms
24,636 KB
testcase_26 AC 195 ms
30,396 KB
testcase_27 AC 65 ms
14,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


def Main():
    n,k=map(int,input().split())
    a=list(map(int,input().split()))
    count=0
    b=0
    ans=0
    for i in range(n):
        if i==n-1:
            if a[i]>=a[i-1]:
                count+=1
        elif a[i]>=a[i+1]:
            count+=1
        if count==k:
            ans=i
            b=1
            break
    for i in range(n-2,-1,-1):
        if b:
            break
        
        if a[i]<a[i+1]:
            count+=1
        if count==k:
            ans=i
            break
    for i in range(n):
        if i!=ans:
            print(a[i],end=" ")
    print()
        
    
    
Main()

0