# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
233733 | Haunted_Cpp | Bootfall (IZhO17_bootfall) | C++17 | 613 ms | 4088 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
const int N = 5e2 + 5;
const int S = N * N;
int cur [S];
int nxt [S];
int without [S];
bitset<S> ans;
bitset<S> Get;
int main () {
ios::sync_with_stdio(0);
cin.tie(0);
int n;
cin >> n;
vector<int> a (n);
for (int i = 0; i < n; i++) cin >> a[i];
int whole_sum = accumulate (a.begin(), a.end(), 0);
cur[0] = nxt[0] = 1;
for (int i = 0; i < n; i++) {
for (int j = a[i]; j < S; j++) {
nxt[j] += cur[j - a[i]];
}
for (int j = 0; j < S; j++) {
cur[j] = nxt[j];
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |