結果
問題 | No.2774 Wake up Record 2 |
ユーザー |
|
提出日時 | 2024-06-07 21:31:30 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 16 ms / 2,000 ms |
コード長 | 430 bytes |
コンパイル時間 | 27,139 ms |
コンパイル使用メモリ | 377,200 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-26 07:09:13 |
合計ジャッジ時間 | 14,755 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 |
ソースコード
use proconio::input;fn main() {input! {n:usize,k:usize,a:[usize;n],}let mut a_copy = a.clone();a_copy.sort();let bound = a_copy[k - 1];let mut ans = vec![];for i in 1..n {if a[i - 1] <= bound && bound < a[i] {ans.push(i + 1);}}println!("{}", ans.len());for i in ans {print!("{} ", i);}println!();}