Submission #973311

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9733112024-05-01 18:02:15happy_nodeBitaro's travel (JOI23_travel)C++17
100 / 100
349 ms74772 KiB
#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;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...