# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
75466 | MiricaMatei | Bali Sculptures (APIO15_sculpture) | C++14 | 118 ms | 5596 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 MAX_N = 2005;
int v[MAX_N];
int dp1[MAX_N];
bool dp[MAX_N][MAX_N];
int n;
long long pref;
bool check1(int bit, int b) {
dp1[0] = 0;
for (int i = 1; i <= n; ++i) {
dp1[i] = b + 1;
long long s = 0;
for (int j = i; j >= 1; --j) {
s += v[j];
if (dp1[j - 1] != b + 1 && (s & pref) == 0)
dp1[i] = min(dp1[i], 1 + dp1[j - 1]);
}
}
return dp1[n] <= b;
}
bool check2(int bit, int a, int b) {
memset(dp, 0, sizeof(dp));
dp[0][0] = 1;
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... |