Submission #18356460


Source Code Expand

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());
}

Submission Info

Submission Time
Task A - コンテスト
User yvay5cqe
Language Rust (1.42.0)
Score 0
Code Size 529 Byte
Status RE
Exec Time 6 ms
Memory 2096 KB

Judge Result

Set Name All
Score / Max Score 0 / 2
Status
AC × 4
RE × 1
Set Name Test Cases
All 00, 01, 02, 90, 91
Case Name Status Exec Time Memory
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