# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
61920 |
2018-07-27T05:17:35 Z |
김세빈(#1797) |
popa (BOI18_popa) |
C++11 |
|
123 ms |
664 KB |
#include "popa.h"
int S[1010];
int solve(int n, int* L, int* R)
{
int i, j, k, s;
s = 0;
for(i=0; i<n; i++){
L[i] = R[i] = -1;
for(j=s; j && query(S[j], i, i, i); j--);
for(k=j+1; k<s; k++) R[S[k]] = S[k + 1];
if(j + 1 <= s) L[i] = S[j + 1];
s = j + 1; S[s] = i;
}
for(i=1; i<s; i++) R[S[i]] = S[i + 1];
return S[1];
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
17 ms |
376 KB |
Output is correct |
2 |
Correct |
11 ms |
376 KB |
Output is correct |
3 |
Correct |
15 ms |
376 KB |
Output is correct |
4 |
Correct |
14 ms |
376 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
81 ms |
420 KB |
Output is correct |
2 |
Correct |
98 ms |
572 KB |
Output is correct |
3 |
Correct |
73 ms |
572 KB |
Output is correct |
4 |
Correct |
97 ms |
588 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
93 ms |
588 KB |
Output is correct |
2 |
Correct |
79 ms |
588 KB |
Output is correct |
3 |
Correct |
102 ms |
664 KB |
Output is correct |
4 |
Correct |
123 ms |
664 KB |
Output is correct |