# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
88714 | popovicirobert | Pipes (BOI13_pipes) | C++14 | 1094 ms | 22444 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 lsb(x) (x & (-x))
#define ll long long
#define ull unsigned long long
// 217
// 44
using namespace std;
const int MAXM = (int) 5e5;
const int MAXN = (int) 1e5;
vector < pair <int, int> > g[MAXN + 1];
int even[MAXN + 1], father[MAXN + 1], n;
bool vis[MAXN + 1];
void dfs(int nod) {
vis[nod] = 1;
for(auto it : g[nod]) {
if(vis[it.first] == 0) {
even[it.first] = (even[nod] ^ 1);
father[it.first] = nod;
dfs(it.first);
}
}
}
inline void detect_cycle(bool &cycle) {
memset(even, -1, sizeof(even));
even[1] = 0;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |