# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
244450 | 2020-07-04T06:17:26 Z | dantoh000 | Pipes (CEOI15_pipes) | C++14 | 2741 ms | 65540 KB |
#include <bits/stdc++.h> using namespace std; int n,m; vector<int> G[100005]; int num[100005]; int p[100005]; int low[100005]; int ct = 1; int root; void dfs(int u){ low[u] = num[u] = ct++; for (auto v : G[u]){ if (num[v] == 0){ p[v] = u; dfs(v); if (low[v] > num[u]){ printf("%d %d\n",u,v); } low[u] = min(low[u],low[v]); } else if (v != p[u]){ low[u] = min(low[u],num[v]); } } } int main(){ scanf("%d%d",&n,&m); for (int i = 0; i < m; i++){ int u,v; scanf("%d%d",&u,&v); G[u].push_back(v); G[v].push_back(u); } for (int i = 1; i <= n; i++){ if (num[i] == 0){ dfs(i); } } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 6 ms | 2688 KB | Output is correct |
2 | Incorrect | 6 ms | 2688 KB | Wrong number of edges |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 10 ms | 3200 KB | Output is correct |
2 | Incorrect | 10 ms | 3072 KB | Wrong number of edges |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 176 ms | 16120 KB | Output is correct |
2 | Correct | 184 ms | 15480 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 320 ms | 20984 KB | Memory limit exceeded (if you are sure your verdict is not MLE, please contact us) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 640 ms | 31760 KB | Memory limit exceeded (if you are sure your verdict is not MLE, please contact us) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 906 ms | 32388 KB | Memory limit exceeded (if you are sure your verdict is not MLE, please contact us) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1488 ms | 52008 KB | Memory limit exceeded (if you are sure your verdict is not MLE, please contact us) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2016 ms | 65536 KB | Memory limit exceeded (if you are sure your verdict is not MLE, please contact us) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2433 ms | 65540 KB | Execution killed with signal 9 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2741 ms | 65540 KB | Execution killed with signal 9 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |