# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
24675 | chan492811 | Bali Sculptures (APIO15_sculpture) | C++11 | 176 ms | 1184 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 <algorithm>
#define ll long long
using namespace std;
int n,a,b;
ll sum[2010],res;
int table[2010],table2[110][110];
bool make(int flag){
int i,j,k;
if(flag){
for(i=1;i<=n;i++){
for(j=0;j<i;j++){
if((sum[i]-sum[j]|res)==res) table[i]=min(table[i],table[j]+1);
}
}
if(table[n]<=b) return 1; return 0;
}else{
for(k=1;k<=b;k++){
for(i=1;i<=n;i++){
table2[k][i]=0;
for(j=0;j<i;j++){
if((sum[i]-sum[j]|res)==res){
table2[k][i]= max(table2[k][i],table2[k-1][j] ? 1 : 0 );
}
}
}
}
for(i=a;i<=b;i++){
if(table2[i][n]) return 1;
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... |