結果

問題 No.2774 Wake up Record 2
ユーザー ntuda
提出日時 2025-07-03 19:48:02
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 334 bytes
コンパイル時間 358 ms
コンパイル使用メモリ 82,040 KB
実行使用メモリ 96,372 KB
最終ジャッジ日時 2025-07-03 19:48:06
合計ジャッジ時間 2,768 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 14 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K = map(int,input().split())
A = list(map(int,input().split()))
if N == K:
    print(0)
    exit()
B = A[:]
B.sort()
thres = B[K]
ans = []
f = 1
for i in range(N):
    if not f:
        if A[i] >= thres:
            f = 1
            ans.append(i+1)
    else:
        if A[i] < thres:
            f = 0
print(len(ans))
print(*ans)

0