# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
729387 | hoainiem | Bali Sculptures (APIO15_sculpture) | C++14 | 3 ms | 340 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>
#define fi first
#define se second
#define lc id<<1
#define rc id<<1^1
const long long inf = 1e18;
using namespace std;
typedef pair<int, int> pii;
int n, l, r;
int a[2008], p[2008][38], orr[2008][2008];
long long ans = inf, f[2008];
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
freopen("file.inp", "r", stdin);
freopen("file.out", "w", stdout);
cin >> n >> l >> r;
fill(p[0], p[0] + 30, 0);
for (int i = 1; i <= n; i++){
cin >> a[i];
for (int j = i; j <= n; j++)
orr[i][j] = orr[i][j - 1] | a[j];
for (int j = 0; j < 30; j++)
p[i][j] = ((a[i] >> j) & 1) ? i : p[i - 1][j];
f[i] = a[i];
}
f[0] = 0;
if (l <= 1 && 1 <= r)
ans = min(ans, f[n]);
for (int j = 2; j <= r; j++){
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... |