# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
244513 | dantoh000 | Pipes (CEOI15_pipes) | C++14 | 499 ms | 24700 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> ii;
int n,m;
bitset<10005> M[10005];
bitset<10005> G[10005];
int num[10005];
int p[10005];
int low[10005];
int ct = 1;
void dfs(int u){
low[u] = num[u] = ct++;
for (int v = 1; v <= n; v++){
if (G[u][v]){
if (num[v] == 0){
p[v] = u;
dfs(v);
if (low[v] > num[u]){
if (M[u][v] == 0){
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);
if (G[u][v]){
M[u][v] = M[v][u] = 1;
}
else{
G[u][v] = G[v][u] = 1;
}
}
for (int i = 1; i <= n; i++){
if (num[i] == 0){
dfs(i);
}
}
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |