# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
76359 | shoemakerjo | Bali Sculptures (APIO15_sculpture) | C++14 | 170 ms | 1304 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;
#define maxn 2010
const int inf = 123456789;
#define ll long long
int N, A, B;
ll nums[maxn];
ll pref = 0LL;
bool dp[maxn][maxn];
//is it possible to end at some guy using exactly some other amount
//use this dp table for N <= 100
//else we just want the minimum number
int mym[maxn];
bool check(ll bit) {
fill(mym, mym+maxn, inf);
mym[0] = 0;
for (int i = 1; i <= N; i++) {
ll csum = 0;
for (int j = i; j >= 1; j--) {
csum += nums[j];
if ( (csum | pref) - pref >= bit) continue;
mym[i] = min(mym[i], mym[j-1]+1);
}
}
# | 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... |