# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
41849 | XmtosX | Bali Sculptures (APIO15_sculpture) | C++14 | 1072 ms | 1684 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;
int n,a,b;
long long y[2003],ans,o,memo1[2003];
bool memo[102][102],vis[102][102];
bool dp (int pos,int cnt)
{
if (pos==n)
{
if (cnt<=a&&cnt>=b)
return 1;
return 0;
}
if (vis[pos][cnt])
return memo[pos][cnt];
vis[pos][cnt]=true;
long long sum=0;
for (int i=pos;i<n;i++)
{
sum+=y[i];
bool flag=false;
for (long long j=40;(1LL<<j)>=o;j--)
{
if ((sum&(1LL<<j))>((ans&(1LL<<j))))
flag=true;
}
if (!flag)
memo[pos][cnt]|=dp(i+1,cnt+1);
}
return memo[pos][cnt];
# | 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... |