結果
| 問題 | No.5 数字のブロック |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-10-09 02:44:36 |
| 言語 | Rust (1.97.1 + proconio + num + itertools + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 5,000 ms |
| + 124µs | |
| コード長 | 363 bytes |
| 記録 | |
| コンパイル時間 | 717 ms |
| コンパイル使用メモリ | 196,908 KB |
| 実行使用メモリ | 9,860 KB |
| 最終ジャッジ日時 | 2026-10-09 02:44:39 |
| 合計ジャッジ時間 | 2,906 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 |
ソースコード
use proconio::{fastout, input};
#[fastout]
fn main() {
input! {
l: usize,
n: usize,
mut w: [usize; n],
}
w.sort_unstable();
let mut cnt = 0;
let mut ans = 0;
for wi in w {
cnt += wi;
if cnt > l {
break;
} else {
ans += 1;
}
}
println!("{}", ans);
}