Submission #1307137
Source Code Expand
#include <iostream> using namespace std; static const int MAX_N = 100; int main(){ int n, p, maxp; bool point[MAX_N*MAX_N+1] = {0}; point[0] = true; maxp = 0; cin >> n; for(int i = 0; i < n; i++){ cin >> p; for(int j = 0; j <= maxp; j++) if(point[j]) point[j+p] = true; maxp += p; } int count = 0; for(int i = 0; i <= maxp; i++) if(point[i]) count++; cout << count << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - コンテスト |
User | alttkymmm |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 456 Byte |
Status | WA |
Exec Time | 1 ms |
Memory | 256 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 | WA | 1 ms | 256 KB |
01 | WA | 1 ms | 256 KB |
02 | AC | 1 ms | 256 KB |
90 | AC | 1 ms | 256 KB |
91 | AC | 1 ms | 256 KB |