結果
問題 | No.1380 Borderline |
ユーザー |
![]() |
提出日時 | 2023-03-16 22:55:24 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 612 bytes |
コンパイル時間 | 13,999 ms |
コンパイル使用メモリ | 404,712 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-18 09:34:44 |
合計ジャッジ時間 | 15,677 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 41 |
ソースコード
fn main() {let mut s = String::new();std::io::stdin().read_line(&mut s).ok();let mut itr = s.trim().split_whitespace();let _n: usize = itr.next().unwrap().parse().unwrap();let k: usize = itr.next().unwrap().parse().unwrap();let mut p = String::new();std::io::stdin().read_line(&mut p).ok();let p: Vec<usize> = p.trim().split_whitespace().map(|x| x.parse().unwrap()).collect();let mut ans = 0;for i in (0..=400).rev() {let y = p.iter().filter(|&x| x >= &i).count();if y > k { break; }ans = y;}println!("{}", ans);}