# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
973311 | happy_node | Bitaro's travel (JOI23_travel) | C++17 | 349 ms | 74772 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;
typedef long long ll;
const int MX=2e5+5;
int N,Q;
ll X[MX];
ll val[MX], LOG[MX];
struct ST1 {
ll st[MX][20];
int que(int l, int r) {
int lg=LOG[r-l+1];
return min(st[l][lg],st[r-(1<<lg)+1][lg]);
}
void prep() {
for(int i=1;i<N;i++) st[i][0]=2*X[i]-X[i+1];
st[N][0]=-2e9;
for(int k=1;k<20;k++) {
for(int i=1;i+(1<<k)<=N;i++) {
st[i][k]=min(st[i][k-1],st[i+(1<<(k-1))][k-1]);
}
}
}
} st;
# | 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... |