Submission #3232354
Source Code Expand
using System; class Program { static void Main() { int n = int.Parse(Console.ReadLine()); int[] nums = Array.ConvertAll(Console.ReadLine().Split(' '),int.Parse); int answer = 0; bool[] answers = new bool[10001]; for(int i = 0; i < answers.Length; i++) answers[i] = false; answers[0] = true; for(int i = 0; i < n; i++) { for(int j = 0; j < answers.Length; j++) { if(answers[j]) answers[j+nums[i]] = true; } } for(int i = 0; i < answers.Length; i++) { if(answers[i]) answer++; } Console.WriteLine(answer); } }
Submission Info
Submission Time | |
---|---|
Task | A - コンテスト |
User | suikameron |
Language | C# (Mono 4.6.2.0) |
Score | 0 |
Code Size | 611 Byte |
Status | RE |
Exec Time | 19 ms |
Memory | 12640 KB |
Judge Result
Set Name | All | ||
---|---|---|---|
Score / Max Score | 0 / 2 | ||
Status |
|
Set Name | Test Cases |
---|---|
All | 00, 01, 02, 90, 91 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00 | RE | 19 ms | 8544 KB |
01 | RE | 19 ms | 10592 KB |
02 | RE | 19 ms | 12640 KB |
90 | RE | 18 ms | 8544 KB |
91 | RE | 19 ms | 10592 KB |