Submission #112050

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1120502019-05-17 07:35:15Eug1enaBali Sculptures (APIO15_sculpture)C++14
100 / 100
192 ms632 KiB
#include <bits/stdc++.h>
using namespace std;
using lint = long long;
int N, A, B;
vector<lint> sum{0};
lint notbit = 0;
lint dp[105][105];
bool minimum(int now, int cnt){
if(now == N){
return (A <= cnt && cnt <= B);
}else if(dp[now][cnt] != -1){
return dp[now][cnt];
}
int ans = false;
for(int i = now + 1; i <= N; i++){
if(((sum[i] - sum[now]) & notbit) == 0){
ans |= minimum(i, cnt + 1);
}
}
return dp[now][cnt] = ans;
}
int dp2[2020];
int minimum2(int now){
if(now == N){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

sculpture.cpp: In function 'bool minimum(int, int)':
sculpture.cpp:24:25: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
     return dp[now][cnt] = ans;
            ~~~~~~~~~~~~~^~~~~
#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...