提出 #18356460
ソースコード 拡げる
Copy
#![allow(unused, non_snake_case, dead_code, non_upper_case_globals)] use { proconio::{marker::*, *}, std::*, std::{cmp::*, collections::*, convert::*, iter::*, marker::*, mem::*, ops::*}, }; /* ■ */ #[fastout] fn main() { input! {// n:usize, p:[usize;n], } let mut dp = vec![false; n * 102 + 1]; dp[0] = true; for &x in p.iter() { for i in (0..=n * 100).rev() { dp[i + x] |= dp[i]; } } println!("{}", dp.iter().filter(|&&x| x).count()); }
提出情報
ジャッジ結果
セット名 | All | ||||
---|---|---|---|---|---|
得点 / 配点 | 0 / 2 | ||||
結果 |
|
セット名 | テストケース |
---|---|
All | 00, 01, 02, 90, 91 |
ケース名 | 結果 | 実行時間 | メモリ |
---|---|---|---|
00 | RE | 6 ms | 1976 KB |
01 | AC | 2 ms | 2096 KB |
02 | AC | 3 ms | 1988 KB |
90 | AC | 1 ms | 2056 KB |
91 | AC | 1 ms | 1972 KB |