# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
49626 | mra2322001 | Fortune Telling 2 (JOI14_fortune_telling2) | C++14 | 2039 ms | 30508 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 f0(i, n) for(int i=(0); i<n; i++)
#define f1(i, n) for(int i=(1); i<=n; i++)
using namespace std;
typedef long long ll;
const int N = 200002;
ll a[N], b[N], c[N], t[N][18];
int n, k, answer[N];
void rmq(){
f1(i, k) t[i][0] = c[i];
int l = log2(k);
f1(j, l){
int u = (1 << j);
for(int i = 1; i <= n - u + 1; i++){
t[i][j] = max(t[i][j - 1], t[i + (1 << (j - 1))][j - 1]);
}
}
}
int get1(int u, int v){
if(u==0) ++u;
if(u > v) return 0;
int x = log2(v - u + 1);
int res = max(t[u][x], t[v - (1 << x) + 1][x]);
return res;
}
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... |