# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
101325 | arman_ferdous | Bali Sculptures (APIO15_sculpture) | C++17 | 186 ms | 512 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;
using ll = long long;
const int N = 2010;
int n, A, B;
ll a[N], mask, bitpos;
int dp4[105][105];
int DP4(int pos, int parts) {
if(pos > n) {
if(A <= parts && parts <= B) return 1;
return 0;
}
if(dp4[pos][parts] != -1) return dp4[pos][parts];
int &ret = dp4[pos][parts]; ret = 0;
ll s = 0;
for(int i = pos; i <= n; i++) {
s += a[i];
if(((mask >> bitpos) & (s >> bitpos)) == (s>>bitpos)) ret |= DP4(i+1, parts+1);
}
return ret;
}
int dp5[N];
int DP5(int pos) {
if(pos > n) return 0;
if(dp5[pos] != -1) return dp5[pos];
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... |