# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
463933 | bonopo | Railway (BOI17_railway) | C++14 | 111 ms | 23824 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define pb push_back
#define rc (i<<1)|1
#define lc (i<<1)
#define el "\n"
#define f first
#define s second
typedef long long ll;
const int MM=1e5+5, MOD=1e9+7, LOG=19;
int N, M, K, psa[MM], dep[MM], son[MM], top[MM], fa[MM], sz[MM], in[MM], ot[MM], cnt;
vector<pair<int,int>> adj[MM];
vector<int> vdj[MM], ans;
void df1(int u, int pa=0) {
dep[u]=dep[pa]+1; fa[u]=pa; sz[u]=1; in[u]=++cnt;
for(auto &e:adj[u]) if(e.f!=pa) {
int v=e.f;
df1(v, u); sz[u]+=sz[v];
if(sz[v]>sz[son[u]]) son[u]=v; }
ot[u]=++cnt;
}
void df2(int u, int pa=0) {
if(son[u]) {
top[son[u]]=top[u]; df2(son[u], u); }
for(auto &e:adj[u]) if(e.f!=pa&&e.f!=son[u]) {
컴파일 시 표준 에러 (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... |