結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 16 ms
7,812 KB
testcase_02 AC 18 ms
7,788 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 184 ms
26,760 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 189 ms
30,044 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 188 ms
29,920 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 16 ms
7,776 KB
testcase_20 AC 16 ms
7,952 KB
testcase_21 AC 16 ms
7,904 KB
testcase_22 WA -
testcase_23 AC 182 ms
26,024 KB
testcase_24 AC 130 ms
22,900 KB
testcase_25 AC 162 ms
24,600 KB
testcase_26 AC 215 ms
30,308 KB
testcase_27 AC 69 ms
14,244 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