# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
70085 | octopuses | popa (BOI18_popa) | C++17 | 16 ms | 436 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#include "popa.h"
#pragma GCC optimize("O3")
using namespace std;
int solve(int n, int* lt, int* rt)
{
int root = 0;
lt[0] = -1;
rt[n - 1] = -1;
for(int i = 1; i < n; ++ i)
if(query(i - 1, i, i - 1, i - 1))
{
rt[i - 1] = i;
lt[i] = -1;
} else
{
lt[i] = root;
rt[i - 1] = -1;
root = i;
}
}
Compilation message (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... |