# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
839592 |
2023-08-30T10:05:35 Z |
kyaruru |
Pipes (CEOI15_pipes) |
C++17 |
|
1493 ms |
65536 KB |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
vector<int> adj[100001];
vector<int> tin(100001,-1),low(100001,-1);
vector<pii> ans;
bool vi[100001];
int t=0;
void dfs(int x,int p=-1){
vi[x]=true;
tin[x]=low[x]=t++;
for(int u:adj[x]){
if(u==p) continue;
if(vi[u]){
low[x]=min(low[x],tin[u]);
}else{
dfs(u,x);
low[x]=min(low[x],low[u]);
if(low[u]>tin[x]) cout<<u<<" "<<x<<"₩n";
}
}
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int a,b;
cin>>a>>b;
for(int i=0; i<b; i++){
int x,y;
cin>>x>>y;
adj[x].push_back(y);
adj[y].push_back(x);
}
for(int i=1; i<=a; i++){
if(!vi[i]) dfs(i);
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
3412 KB |
Expected integer, but "17₩n57" found |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
3924 KB |
Expected integer, but "3706₩n3943" found |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
81 ms |
11516 KB |
Output is correct |
2 |
Incorrect |
80 ms |
16260 KB |
Expected integer, but "6₩n6" found |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
148 ms |
14908 KB |
Output is correct |
2 |
Runtime error |
173 ms |
30644 KB |
Memory limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
266 ms |
25496 KB |
Memory limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
449 ms |
30732 KB |
Memory limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
685 ms |
62688 KB |
Memory limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1002 ms |
65536 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1209 ms |
65536 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1493 ms |
65536 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |