# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
137073 | thebes | One-Way Streets (CEOI17_oneway) | C++14 | 235 ms | 31420 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int MN = 1e5+5, LG = 19;
int N, M, Q, S, i, x, y, vis[MN][2], sp[MN][LG], cmp[MN], st[MN], nxt, ans[MN], u[MN], d[MN], dep[MN], cnt, vs[MN];
vector<pair<int,int>> adj[MN], cadj[MN];
stack<int> s;
pair<int,int> ree[MN];
string ans2;
void dfs(int n,int id){
vis[n][0]=vis[n][1]=++nxt;
st[n]=1; s.push(n);
for(auto v : adj[n]){
if(v.second==id) continue;
if(!vis[v.first][0]){
dfs(v.first, v.second);
vis[n][1]=min(vis[n][1],vis[v.first][1]);
}
else if(st[v.first]){
vis[n][1]=min(vis[n][1],vis[v.first][0]);
}
}
if(vis[n][0]==vis[n][1]){
S++;
while(s.size()&&s.top()!=n){
int x = s.top(); s.pop();
cmp[x] = S; st[x] = 0;
}
int x = s.top(); s.pop();
컴파일 시 표준 에러 (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... |