# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
198293 | forelax | popa (BOI18_popa) | C++14 | 24 ms | 504 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
#include "popa.h"
using namespace std;
int solve(int n,int* lf,int* rg){
stack<int> st;
for(int i = 0 ; i < n ; i ++){
lf[i]=-1;
rg[i]=-1;
while(st.size()&&!query(st.top(),st.top(),st.top(),i)){
lf[i]=st.top();
st.pop();
}
if(st.size()){
rg[st.top()]=i;
}
st.push(i);
}
while(st.size()>1)st.pop();
int rez=st.top();
st.pop();
return st.top();
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |