# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
447748 | prvocislo | Pipes (BOI13_pipes) | C++17 | 84 ms | 19424 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>
typedef long long ll;
using namespace std;
void end()
{
cout << 0 << endl;
exit(0);
}
const int maxn = 1e5 + 5;
vector<pair<int, int> > g[maxn];
int deg[maxn], vis[maxn], n[maxn], e[maxn];
ll sum[maxn*2];
vector<int> cy;
void dfs(int u, int p, int st)
{
if (u == st && p != -1) return;
sum[cy.size()] = n[u];
for (pair<int, int> v : g[u]) if (!vis[v.first] && v.first != p)
{
cy.push_back(v.second);
dfs(v.first, u, st);
if (u == st) return;
}
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
int N, M;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |