# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
340082 | wildturtle | One-Way Streets (CEOI17_oneway) | C++17 | 487 ms | 43376 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
long long a,b,c,d,i,e,f,g,n,m,k,l,t,q;
long long disc[500005],low[500005],A[500005],B[500005],C[500005],D[500005],E[500005];
long long P[22][500005],br[500005],ans[500005],in[500005],out[500005];
vector < pair <long long , long long > > v[500005];
void dfs(long long x,long long y) {
t++;
disc[x]=t; low[x]=t;
for(long long i=0;i<v[x].size();i++) {
if(v[x][i].first==x) continue;
if(disc[v[x][i].first]==0) {
P[0][v[x][i].first]=x; D[v[x][i].first]=D[x]+1; E[v[x][i].first]=v[x][i].second;
dfs(v[x][i].first,x);
low[x]=min(low[x],low[v[x][i].first]);
if(low[v[x][i].first]>disc[x]) br[v[x][i].first]=1;
}
else {
if(P[0][v[x][i].first]==x) br[v[x][i].first]=0;
if(v[x][i].first!=P[0][x]) low[x]=min(low[x],disc[v[x][i].first]);
}
}
}
int LCA(int u, int v) {
if(D[u]<D[v]) swap(u, v);
for(int k = 18 - 1; ~k; k--)
if (D[P[k][u]]>=D[v]) u=P[k][u];
if(u==v) return u;
for (int k=18-1; ~k; k--)
if(P[k][u]!=P[k][v]) { u=P[k][u]; v=P[k][v]; }
컴파일 시 표준 에러 (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... |