# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
99473 | Shafin666 | Bali Sculptures (APIO15_sculpture) | C++14 | 441 ms | 31996 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>
#define mp make_pair
#define pb push_back
#define pii pair<int, int>
typedef long long ll;
typedef long double ld;
using namespace std;
int n, a, b;
ll num[2005], pre[2050];
ll dp[2005], dp2[2005][2005];
ll bit = 43, mask;
ll c(int i, int j) {
return pre[j] - pre[i-1];
}
void can(int x) {
mask ^= (1LL << x);
for(int i = 1; i <= n; i++) {
dp[i] = 1e18+7;
for(int j = 0; j < i; j++) {
if((mask | c(j+1, i)) == mask) dp[i] = min(dp[i], dp[j]+1);
}
}
if(dp[n] > b) mask |= (1LL << x);
}
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... |