# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
64388 | 2018-08-04T09:22:36 Z | Just_Solve_The_Problem | popa (BOI18_popa) | C++11 | 110 ms | 656 KB |
#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; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 12 ms | 248 KB | Output is correct |
2 | Correct | 16 ms | 436 KB | Output is correct |
3 | Correct | 16 ms | 436 KB | Output is correct |
4 | Correct | 12 ms | 528 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 94 ms | 608 KB | Output is correct |
2 | Correct | 104 ms | 608 KB | Output is correct |
3 | Correct | 76 ms | 608 KB | Output is correct |
4 | Correct | 104 ms | 608 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 110 ms | 656 KB | Output is correct |
2 | Correct | 63 ms | 656 KB | Output is correct |
3 | Correct | 97 ms | 656 KB | Output is correct |
4 | Correct | 88 ms | 656 KB | Output is correct |