Submission #97366


Source Code Expand

Copy
import std.stdio, std.string, std.conv;
import std.algorithm, std.array;

void main()
{
    for(; readln().length;)
    {
        auto p = array(readln().split().map!(to!int)());
        bool[int] dp;
        dp[0]=true;
        foreach(a;p)
        {
            auto dpn = dp.dup;
            foreach(d,_;dp)
                dpn[d+a]=true;
            swap(dpn,dp);
        }
        writeln(dp.length);
    }
}

Submission Info

Submission Time
Task A - コンテスト
User jasy
Language D (DMD 2.060)
Score 0
Code Size 432 Byte
Status CE

Compile Error

bash: line 2: dmd: command not found