# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1043378 | Pekiban | Pipes (CEOI15_pipes) | C++14 | 631 ms | 44884 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;
#define pb push_back
const int N = 1e5+5;
mt19937 rng(time(0));
// upravo sam imao najgenijalniju ideju svih vremena
vector<int> g[N];
int p[N], dp[N], vis[N];
int get(int x) {
if (x == p[x]) return x;
return p[x] = get(p[x]);
}
bool unite(int u, int v) {
if (get(u) == get(v)) return 0;
p[get(v)] = get(u);
g[u].pb(v); g[v].pb(u);
return 1;
}
void upd(int u, int v) {
int x = rng() % (1LL << 31);
dp[u] ^= x;
dp[v] ^= x;
}
void dfs(int &s, int &e) {
for (auto &u : g[s]) {
if (u == e) continue;
dfs(u, s);
dp[s] ^= dp[u];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |