# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
37474 | HardNut | Bootfall (IZhO17_bootfall) | C++14 | 973 ms | 4824 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 = 250005;
const int mod = 1e9 + 7;
typedef long long ll;
int n, a[505], sum;
vector<int> vec;
int ans[N];
int dp[N];
bool used[505];
void add(int v) {
for (int i = sum; i >= 0; i--) {
dp[i + v] += dp[i];
if (dp[i + v] >= mod)
dp[i + v] -= mod;
}
sum += v;
}
void del(int v) {
sum -= v;
for (int i = 0; i <= sum; i++) {
dp[i + v] = (dp[i + v] - dp[i] + mod);
if (dp[i + v] >= mod)
dp[i + v] -= mod;
Compilation message (stderr)
# | 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... |