제출 #867518

#제출 시각아이디문제언어결과실행 시간메모리
86751842kangaroopopa (BOI18_popa)C++17
0 / 100
5 ms456 KiB
// Created by 42kangaroo on 28/10/2023. // #include "bits/stdc++.h" #include "popa.h" using namespace std; struct Node { int p, l, r; }; int solve(int N, int* Left, int* Right) { int nowN = 0; vector<Node> no(N, {-1,-1,-1}); for (int i = 1; i < N; ++i) { if (query(nowN, i, i, i)) { no[nowN].p = i; no[i].l = nowN; nowN = i; } else { no[i].p = i - 1; no[i - 1].r = i; } } for (int i = 0; i < N; ++i) { Left[i] = no[i].l; Right[i] = no[i].r; } return nowN; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...