# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
49443 | wzy | Bali Sculptures (APIO15_sculpture) | C++11 | 427 ms | 24496 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;
#define int long long
int n , a , b;
int v[3000];
int c[2500][2500];
bool dp[2500][2500];
int mask;
bool vis[2500][2500];
int cg[2500];
bool can(int i , int j){
if(i == n + 1){
if(a <= j && j <= b) return 1;
else return 0;
}
if(vis[i][j]) return dp[i][j];
vis[i][j] = 1;
for(int w = i ; w <= n ; w++){
if((c[i][w] & mask) == 0){
dp[i][j] = max(dp[i][j] , can(w + 1 , j + 1));
}
}
return dp[i][j];
}
int32_t main(){
scanf("%lld%lld%lld" , &n , &a , &b);
for(int i = 1 ; i <= n; i ++) scanf("%lld" , &v[i]);
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... |