結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,912 KB
testcase_01 AC 16 ms
7,804 KB
testcase_02 AC 16 ms
7,844 KB
testcase_03 AC 63 ms
13,096 KB
testcase_04 WA -
testcase_05 AC 95 ms
17,012 KB
testcase_06 AC 84 ms
15,436 KB
testcase_07 AC 187 ms
26,860 KB
testcase_08 AC 16 ms
7,844 KB
testcase_09 AC 16 ms
7,944 KB
testcase_10 AC 16 ms
7,840 KB
testcase_11 WA -
testcase_12 AC 16 ms
7,860 KB
testcase_13 AC 229 ms
29,940 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 226 ms
29,868 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 16 ms
7,852 KB
testcase_20 AC 16 ms
7,912 KB
testcase_21 AC 16 ms
7,768 KB
testcase_22 WA -
testcase_23 AC 183 ms
27,948 KB
testcase_24 AC 140 ms
22,828 KB
testcase_25 AC 165 ms
24,608 KB
testcase_26 AC 216 ms
30,248 KB
testcase_27 AC 72 ms
14,548 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


def Main():
    n,k=map(int,input().split())
    a=list(map(int,input().split()))
    ans=[0 for _ in range(n)]
    mae=0
    ato=n-1
    for i in range(n):
        if i==n-1:
            ans[mae]=i
        elif a[i]<=a[i+1]:
            ans[ato]=i
            ato-=1
        else:
            ans[mae]=i
            mae+=1
    for i in range(n):
        if i!=ans[k-1]:
            print(a[i],end=" ")
    print()
                    
    
    
Main()

0