# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
392956 | asbsfds | Torrent (COI16_torrent) | C++14 | 82 ms | 26108 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>
#define X first
#define Y second
using namespace std;
typedef long long llint;
const int maxn = 2e5+10;
const int base = 31337;
const int mod = 1e9+7;
const int inf = 0x3f3f3f3f;
const int logo = 20;
const int off = 1 << logo;
const int treesiz = off << 1;
int n, a, b;
vector< int > graph[maxn];
int dp[maxn];
vector< int > v;
bool dfs(int x, int parr) {
bool out = (x == b);
for (int i = 0; i < graph[x].size(); i++) {
int tren = graph[x][i];
if (tren == parr) continue;
out |= dfs(tren, x);
}
if (out) v.push_back(x);
return out;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |