# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
198291 |
2020-01-25T12:31:32 Z |
forelax |
popa (BOI18_popa) |
C++14 |
|
79 ms |
376 KB |
#include<bits/stdc++.h>
#include "popa.h"
using namespace std;
int solve(int n,int* lf,int* rg){
stack<int> s;
for(int i = 0 ; i < n ; i ++){
lf[i]=-1;
rg[i]=-1;
while(s.size()&&!query(s.top(),s.top(),s.top(),i)){
lf[i]=s.top();
s.pop();
}
if(s.size()){
rg[s.top()]=i;
}
s.push(i);
}
while(s.size()>1)s.pop();
return s.top();
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
248 KB |
Output is correct |
2 |
Correct |
17 ms |
376 KB |
Output is correct |
3 |
Correct |
7 ms |
248 KB |
Output is correct |
4 |
Correct |
7 ms |
312 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
55 ms |
324 KB |
Output is correct |
2 |
Correct |
79 ms |
328 KB |
Output is correct |
3 |
Correct |
48 ms |
328 KB |
Output is correct |
4 |
Correct |
57 ms |
324 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
58 ms |
328 KB |
Output is correct |
2 |
Correct |
58 ms |
324 KB |
Output is correct |
3 |
Correct |
60 ms |
328 KB |
Output is correct |
4 |
Correct |
54 ms |
328 KB |
Output is correct |