# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
98533 | tincamatei | Bali Sculptures (APIO15_sculpture) | C++14 | 99 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;
const int MAX_N = 2000;
const int MAX_N2 = 100;
int dp1[1+MAX_N];
bool dp2[1+MAX_N2][1+MAX_N2];
int y[1+MAX_N];
long long dodp1(int n, int lim) {
long long rez = 0LL;
for(int l = 41; l >= 0; --l) {
long long allowedSet = (rez | ((1LL << l) - 1));
for(int i = 1; i <= n; ++i) {
long long s = 0LL;
dp1[i] = n + 1;
for(int j = i; j > 0; --j) {
s += y[j];
if((s | allowedSet) == allowedSet)
dp1[i] = min(dp1[i], dp1[j - 1] + 1);
}
}
if(dp1[n] > lim)
rez = (rez | (1LL << l));
}
return rez;
}
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... |