結果

問題 No.2774 Wake up Record 2
ユーザー いまり💣🍠いまり💣🍠
提出日時 2024-06-07 21:36:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 263 bytes
コンパイル時間 159 ms
コンパイル使用メモリ 82,240 KB
実行使用メモリ 96,724 KB
最終ジャッジ日時 2024-06-07 21:36:13
合計ジャッジ時間 1,872 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
52,020 KB
testcase_01 AC 36 ms
53,684 KB
testcase_02 AC 35 ms
52,440 KB
testcase_03 AC 34 ms
52,544 KB
testcase_04 AC 35 ms
52,484 KB
testcase_05 AC 34 ms
53,124 KB
testcase_06 AC 33 ms
52,080 KB
testcase_07 AC 38 ms
53,652 KB
testcase_08 AC 34 ms
52,112 KB
testcase_09 AC 43 ms
61,008 KB
testcase_10 AC 37 ms
53,804 KB
testcase_11 AC 59 ms
73,272 KB
testcase_12 AC 54 ms
70,116 KB
testcase_13 AC 75 ms
85,220 KB
testcase_14 AC 67 ms
84,884 KB
testcase_15 AC 63 ms
85,528 KB
testcase_16 AC 61 ms
84,584 KB
testcase_17 AC 81 ms
96,724 KB
testcase_18 AC 58 ms
83,012 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, input().split())
A = list(map(int, input().split()))

A_sorted = sorted(A)

sleep_value = A_sorted[K - 1]

ans = []
for k in range(1, N):
    if A[k - 1] <= sleep_value and A[k] > sleep_value:
        ans.append(k + 1)

print(len(ans))
print(*ans)
0