# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
989117 | aykhn | Bitaro’s Party (JOI18_bitaro) | C++17 | 1277 ms | 437768 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>
using namespace std;
const int MXN = 2e5 + 5;
const int B = 500;
int n, m, q;
vector<int> adj[MXN];
int used[MXN], dp[MXN], inq[MXN], in[MXN];
vector<array<int, 2>> b[MXN];
vector<int> o;
void init(int a)
{
used[a] = 1;
b[a].push_back({0, a});
vector<array<int, 2>> nw;
for (int v : adj[a])
{
if (!used[v]) init(v);
nw.clear();
int i = 0, j = 0;
while (nw.size() < B + 1 && i < b[a].size() && j < b[v].size())
{
if (in[b[a][i][1]])
{
i++;
continue;
}
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... |