# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
46371 |
2018-04-20T02:50:58 Z |
sorry_Benq |
Pipes (CEOI15_pipes) |
C++17 |
|
958 ms |
5140 KB |
#include <bits/stdc++.h>
using namespace std;
int n; // number of nodes
vector<vector<int>> adj; // adjacency list of graph
vector<bool> visited;
vector<int> tin, fup;
int timer;
void dfs(int v, int p = -1) {
visited[v] = true;
tin[v] = fup[v] = timer++;
for (int to : adj[v]) {
if (to == p) continue;
if (visited[to]) {
fup[v] = min(fup[v], tin[to]);
} else {
dfs(to, v);
fup[v] = min(fup[v], fup[to]);
if (fup[to] > tin[v])
cout << v + 1 << ' ' << to + 1 << endl;
}
}
}
void find_bridges() {
timer = 0;
visited.assign(n, false);
tin.assign(n, -1);
fup.assign(n, -1);
for (int i = 0; i < n; ++i) {
if (!visited[i])
dfs(i);
}
}
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
cin >> n; int M; cin >> M;
adj.resize(n);
for (int i = 0; i < M; i++){
int u, v; cin >> u >> v;
}
cout << 1/0 << endl;
}
Compilation message
pipes.cpp: In function 'int main()':
pipes.cpp:45:11: warning: division by zero [-Wdiv-by-zero]
cout << 1/0 << endl;
~^~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
2 ms |
512 KB |
Execution killed with signal 4 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
4 ms |
768 KB |
Execution killed with signal 4 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
88 ms |
732 KB |
Execution killed with signal 4 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
152 ms |
996 KB |
Execution killed with signal 4 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
249 ms |
1584 KB |
Execution killed with signal 4 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
295 ms |
3816 KB |
Execution killed with signal 4 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
493 ms |
4324 KB |
Execution killed with signal 4 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
606 ms |
5140 KB |
Execution killed with signal 4 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
772 ms |
5140 KB |
Execution killed with signal 4 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
958 ms |
4892 KB |
Execution killed with signal 4 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |