# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
64388 | Just_Solve_The_Problem | popa (BOI18_popa) | C++11 | 110 ms | 656 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "popa.h"
#include <bits/stdc++.h>
#define pb push_back
#define pii pair < int, int >
#define fr first
#define sc second
#define mk make_pair
using namespace std;
const int N = (int)1e3 + 7;
int pr[N];
int solve(int n, int left[], int right[]) {
vector < int > stk;
int root;
for (int i = 0; i < n; i++) {
left[i] = right[i] = -1;
while (!stk.empty() && query(stk.back(), i, i, i)) {
right[stk.back()] = left[i];
left[i] = stk.back();
stk.pop_back();
}
if (!stk.empty()) right[stk.back()] = i;
else root = i;
stk.pb(i);
}
return root;
}
컴파일 시 표준 에러 (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... |