結果

問題 No.2210 equence Squence Seuence
ユーザー Mat_hMat_h
提出日時 2023-02-10 23:07:02
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 289 ms / 2,000 ms
コード長 738 bytes
コンパイル時間 97 ms
コンパイル使用メモリ 10,976 KB
実行使用メモリ 30,364 KB
最終ジャッジ日時 2023-09-22 00:13:22
合計ジャッジ時間 5,494 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,812 KB
testcase_01 AC 17 ms
7,788 KB
testcase_02 AC 16 ms
7,760 KB
testcase_03 AC 76 ms
12,976 KB
testcase_04 AC 82 ms
13,692 KB
testcase_05 AC 114 ms
16,624 KB
testcase_06 AC 101 ms
15,520 KB
testcase_07 AC 228 ms
26,788 KB
testcase_08 AC 17 ms
7,904 KB
testcase_09 AC 16 ms
7,836 KB
testcase_10 AC 16 ms
7,816 KB
testcase_11 AC 16 ms
7,820 KB
testcase_12 AC 17 ms
7,872 KB
testcase_13 AC 282 ms
30,100 KB
testcase_14 AC 284 ms
29,944 KB
testcase_15 AC 289 ms
30,032 KB
testcase_16 AC 280 ms
29,944 KB
testcase_17 AC 283 ms
30,108 KB
testcase_18 AC 17 ms
7,836 KB
testcase_19 AC 17 ms
7,824 KB
testcase_20 AC 17 ms
7,804 KB
testcase_21 AC 18 ms
7,804 KB
testcase_22 AC 17 ms
7,836 KB
testcase_23 AC 210 ms
26,076 KB
testcase_24 AC 160 ms
22,868 KB
testcase_25 AC 185 ms
24,572 KB
testcase_26 AC 244 ms
30,364 KB
testcase_27 AC 79 ms
14,260 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
    b=1
    count=0
    for i in range(n):
        if i==n-1:
            for j in range(count+1):
                ans[mae]=i-j
                mae+=1
        elif a[i]<a[i+1]:
            for j in range(count+1):
                ans[ato]=i-j
                ato-=1
            count=0
        elif a[i]==a[i+1]:
            count+=1
        else:
            for j in range(count+1):
                ans[mae]=i-j
                mae+=1
            count=0
    for i in range(n):
        if i!=ans[k-1]:
            print(a[i],end=" ")
    
    print()
    
    
                    
    
    
Main()

0