# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
208535 |
2020-03-11T13:19:03 Z |
dolphingarlic |
popa (BOI18_popa) |
C++14 |
|
97 ms |
500 KB |
#include "popa.h"
int P[1000];int solve(int N,int* L,int* R) {int r=-1;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 |
Correct |
14 ms |
252 KB |
Output is correct |
2 |
Correct |
16 ms |
248 KB |
Output is correct |
3 |
Correct |
14 ms |
248 KB |
Output is correct |
4 |
Correct |
12 ms |
248 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
92 ms |
248 KB |
Output is correct |
2 |
Correct |
96 ms |
376 KB |
Output is correct |
3 |
Correct |
58 ms |
376 KB |
Output is correct |
4 |
Correct |
86 ms |
316 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
89 ms |
500 KB |
Output is correct |
2 |
Correct |
82 ms |
320 KB |
Output is correct |
3 |
Correct |
86 ms |
420 KB |
Output is correct |
4 |
Correct |
97 ms |
248 KB |
Output is correct |