# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1167265 | Muhammet | Bali Sculptures (APIO15_sculpture) | C++17 | 61 ms | 460 KiB |
#include "bits/stdc++.h"
using namespace std;
#define ff first
#define ss second
#define ll long long
#define SZ(s) (int)s.size()
const int N = 1e2 + 5;
int n, A, B, a[20005], dp[N][N], dp1[20005];
ll ans;
bool check(ll x) {
memset (dp, -1, sizeof dp);
dp[0][0] = 1;
for(int i = 1; i <= n; i++) {
ll s = 0;
for(int j = i; j > 0; j--) {
s += a[j];
if((s | x) == x) {
for(int k = 0; k < B; k++) {
if(dp[j-1][k] == 1) dp[i][k+1] = 1;
}
}
}
}
for(int k = A; k <= B; k++) {
# | 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... |