답안 #208536

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
208536 2020-03-11T13:20:01 Z dolphingarlic popa (BOI18_popa) C++14
100 / 100
95 ms 376 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;}
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 248 KB Output is correct
2 Correct 12 ms 248 KB Output is correct
3 Correct 13 ms 248 KB Output is correct
4 Correct 14 ms 248 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 91 ms 376 KB Output is correct
2 Correct 93 ms 248 KB Output is correct
3 Correct 58 ms 248 KB Output is correct
4 Correct 85 ms 248 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 84 ms 376 KB Output is correct
2 Correct 88 ms 248 KB Output is correct
3 Correct 90 ms 248 KB Output is correct
4 Correct 95 ms 376 KB Output is correct