# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
679125 | PoonYaPat | 철인 이종 경기 (APIO18_duathlon) | C++14 | 45 ms | 10576 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int n,m,disc[100001],low[100001],sz[200001],cnt,bcc_cnt;
vector<int> adj[100001],bcc[200001];
ll ans,N;
stack<int> st;
void tarjan(int x, int par) {
st.push(x);
low[x]=disc[x]=++cnt;
++N;
for (auto s : adj[x]) {
if (s==par) continue;
if (disc[s]) low[x]=min(low[x],disc[s]);
else {
tarjan(s,x);
low[x]=min(low[x],low[s]);
if (low[s]>=disc[x]) {
++bcc_cnt;
bcc[x].push_back(N+bcc_cnt);
while (!bcc[n+bcc_cnt].size() || bcc[n+bcc_cnt].back()!=s) {
bcc[N+bcc_cnt].push_back(st.top());
st.pop();
}
# | 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... |