# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
70658 | evpipis | Bali Sculptures (APIO15_sculpture) | C++11 | 112 ms | 1176 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;
typedef long long ll;
const int inf = 1e9;
int dp1[105][105], dp2[2005], n, a, b, arr[2005];
bool solve1(ll x){
dp1[n+1][0] = 1;
for (int i = n; i >= 1; i--)
for (int k = 1; k <= b; k++){
ll sum = 0;
dp1[i][k] = 0;
for (int j = i; j <= n; j++){
sum += arr[j];
if ((sum|x) == x)
dp1[i][k] |= dp1[j+1][k-1];
}
}
for (int k = a; k <= b; k++)
if (dp1[1][k]) return true;
return false;
}
bool solve2(ll x){
for (int i = n; i >= 1; i--){
ll sum = 0;
dp2[i] = inf;
for (int j = i; j <= n; j++){
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... |