이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "popa.h"
using namespace std;
using ll = long long;
using vi = vector<int>;
#define pb push_back
#define rsz resize
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
using pi = pair<int,int>;
#define f first
#define s second
#define mp make_pair
int solve(int N, int *L, int *R) {
vector<int> st;
st.pb(0);
L[0] = R[0] = -1;
for (int i = 1; i < N; i++) {
L[i] = -1, R[i] = -1;
while (!st.empty() && query(st.back(), i, i, i)) {
L[i] = st.back();
st.pop_back();
}
if (!st.empty()) {
R[st.back()] = i;
}
st.pb(i);
}
return st.back();
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |