# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
14393 | gs14004 | Bali Sculptures (APIO15_sculpture) | C++14 | 198 ms | 1116 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 <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
typedef long long lint;
int n,s,e;
lint a[2005];
char dp[101][101];
lint criteria;
int f(int pos, int grp){
if(pos == 0) return grp <= e && grp >= s;
if(~dp[pos][grp]) return dp[pos][grp];
int t = 0;
for(int j=pos-1; j>=0; j--){
if(((~criteria) & (a[pos] - a[j])) == 0){
t |= f(j,grp+1);
if(t == 1) break;
}
}
return dp[pos][grp] = t;
}
int dp2[2001];
int f2(int x){
if(x == 0) return 0;
if(~dp2[x]) return dp2[x];
# | 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... |