# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
96951 |
2019-02-12T21:05:51 Z |
dalgerok |
popa (BOI18_popa) |
C++14 |
|
87 ms |
444 KB |
#include<bits/stdc++.h>
#include<popa.h>
using namespace std;
const int N = 1005;
int le[N], ri[N];
int solve(int n, int *le, int *ri){
for(int i = 0; i < n; i++){
le[i] = ri[i] = -1;
}
vector < int > st;
for(int i = 0; i < n; i++){
while(!st.empty() && query(st.back(), i, i, i) == true){
ri[st.back()] = le[i];
le[i] = st.back();
st.pop_back();
}
st.push_back(i);
}
while((int)st.size() > 1){
ri[st[(int)st.size() - 2]] = st.back();
st.pop_back();
}
return st[0];
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
404 KB |
Output is correct |
2 |
Correct |
11 ms |
384 KB |
Output is correct |
3 |
Correct |
7 ms |
384 KB |
Output is correct |
4 |
Correct |
10 ms |
384 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
76 ms |
324 KB |
Output is correct |
2 |
Correct |
87 ms |
256 KB |
Output is correct |
3 |
Correct |
41 ms |
328 KB |
Output is correct |
4 |
Correct |
71 ms |
444 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
68 ms |
336 KB |
Output is correct |
2 |
Correct |
72 ms |
340 KB |
Output is correct |
3 |
Correct |
81 ms |
436 KB |
Output is correct |
4 |
Correct |
71 ms |
328 KB |
Output is correct |