Submission #415886

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4158862021-06-01 16:32:02A_DRainforest Jumps (APIO21_jumps)C++14
48 / 100
1656 ms56828 KiB
#include "jumps.h"
#include <bits/stdc++.h>
using namespace std;
const int NN=2e5+100;
const int L=18;
const int INF=1e9;
int a[NN],lo[NN];
bool vis[NN];
int seg[4*NN];
int n;
vector<int> g[NN];
vector<int> vec;
int st[NN][L][2];
int stt[NN][L];
void build()
{
lo[1]=0;
for(int i=2;i<=n+1;i++){
lo[i]=lo[i/2]+1;
}
for (int j=1;j<L;j++){
for (int i=0;i+(1 << j)<=n;i++){
stt[i][j]=max(stt[i][j-1],stt[i+(1<<(j-1))][j-1]);
}
}
}
int get(int L,int R)
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

jumps.cpp: In function 'void init(int, std::vector<int>)':
jumps.cpp:51:17: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
   51 |             int ans,l=i+1,r=n-1;
      |                 ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...