Submission #6414788
Source Code Expand
#include <bits/stdc++.h> using namespace std; int n; int p[109]; set<int> score; int main() { cin >> n; for(int i = 1; i <= n; i++) cin >> p[i]; score.insert(0); for(int i = 1; i <= n; i++) { set<int> s_new(score); for(auto x : score) s_new.insert(x + p[i]); score = s_new; } cout << score.size() << endl; }
Submission Info
Submission Time | |
---|---|
Task | A - コンテスト |
User | zukash |
Language | C++14 (GCC 5.4.1) |
Score | 2 |
Code Size | 398 Byte |
Status | AC |
Exec Time | 35 ms |
Memory | 768 KB |
Judge Result
Set Name | All | ||
---|---|---|---|
Score / Max Score | 2 / 2 | ||
Status |
|
Set Name | Test Cases |
---|---|
All | 00, 01, 02, 90, 91 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00 | AC | 1 ms | 256 KB |
01 | AC | 10 ms | 512 KB |
02 | AC | 35 ms | 768 KB |
90 | AC | 1 ms | 256 KB |
91 | AC | 1 ms | 256 KB |