# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1175929 | KhanhDang | Bootfall (IZhO17_bootfall) | C++17 | 558 ms | 2872 KiB |
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pll pair<ll, ll>
#define pii pair<int, int>
#define fi first
#define se second
#define all(v) (v).begin(),(v).end()
#define Unique(v) sort(all(v)); (v).erase(unique(all(v)), (v).end());
const int N = 505;
const int mod = 293847109;
int n, a[N], dp[N * N], sum;
int cnt[N * N], ans;
void add(int x) {
for (int s = sum; s >= x; s--)
(dp[s] += dp[s - x]) %= mod;
}
void del(int x) {
for (int s = x; s <= sum; s++)
(dp[s] += mod - dp[s - x]) %= mod;
}
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
#define task "task"
if (fopen(task".INP", "r")) {
freopen(task".INP", "r", stdin);
freopen(task".OUT", "w", stdout);
}
if (fopen("task.INP", "r")) {
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... |