Submission #208533

# Submission time Handle Problem Language Result Execution time Memory
208533 2020-03-11T13:18:25 Z dolphingarlic popa (BOI18_popa) C++14
0 / 100
23 ms 376 KB
#include "popa.h"
int solve(int N,int* L,int* R){int r=-1,P[1000];for(int i=0;i<N;i++){L[i]=R[i]=P[i]=-1;int p=i-1;while(p!=-1&&query(i,i,p,i)){R[p]=L[i];P[L[i]]=p;L[i]=p;int pp=P[p];P[p]=i;p=pp;}if(p==-1){L[i]=r;if(r!=-1)P[r]=i;r=i;}else{R[p]=i;P[i]=p;}}return r;}
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 376 KB invalid argument
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 23 ms 248 KB invalid argument
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 22 ms 248 KB invalid argument
2 Halted 0 ms 0 KB -