Submission #33773

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
337732017-11-01 15:47:33dqhungdlBali Sculptures (APIO15_sculpture)C++14
100 / 100
103 ms10060 KiB
#include <bits/stdc++.h>
using namespace std;
const int64_t MAX=41;
int64_t n,A,B,a[2005],F1[2005];
bool Free[2005][2005],F[2005][2005],Free1[2005];
int64_t f1(int64_t i,int64_t mask)
{
if(Free1[i]==true)
return F1[i];
F1[i]=1e9;
Free1[i]=true;
if(i>n)
return F1[i]=0;
for(int64_t t=i; t<=n; t++)
{
int64_t tmp=a[t]-a[i-1];
if((mask|tmp)==mask)
F1[i]=min(F1[i],f1(t+1,mask)+1);
}
return F1[i];
}
bool f(int64_t i,int64_t j,int64_t mask)
{
if(Free[i][j]==true)
return F[i][j];
Free[i][j]=true;
if(j>B)
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...