| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 244571 | dantoh000 | Pipes (CEOI15_pipes) | C++14 | 3743 ms | 50380 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
///happy birthday errorgorn
#include <bitset>
#include <utility>
#include <algorithm>
using namespace std;
typedef pair<int,int> ii;
int n,m;
bitset<450000000> M;
bitset<450000000> G;
int num[30005];
int low[30005];
int ct = 1;
int hm[30005];
int f(int u, int v){
if (u > v) swap(u,v);
//printf("%d %d %d\n",u,v,hm[u]+v);
return hm[u]+v;
}
void dfs(int u, int p){
low[u] = num[u] = ct++;
for (int v = 0; v < n; v++){
int F = f(u,v);
if (G[F]){
if (num[v] == 0){
dfs(v,u);
if (low[v] > num[u]){
if (M[F] == 0){
printf("%d %d\n",u+1,v+1);
}
}
low[u] = min(low[u],low[v]);
}
else if (v != p){
low[u] = min(low[u],num[v]);
}
}
}
}
int main(){
scanf("%d%d",&n,&m);
for (int i = 1; i < n; i++){
hm[i] = hm[i-1]+(n-i-1);
}
for (int i = 0; i < m; i++){
int u,v;
scanf("%d%d",&u,&v);
u--; v--;
int F = f(u,v);
if (G[F]){
M[F] = 1;
}
else{
G[F] = 1;
}
}
/*for (int i = 0; i < n; i++){
for (int j = i+1; j < n; j++){
printf("%d %d %d\n",i,j,f(i,j));
}
}*/
for (int i = 0; i < n; i++){
if (num[i] == 0){
dfs(i,-1);
}
}
}
컴파일 시 표준 에러 (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... | ||||
