# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
212400 | gs14004 | 별자리 3 (JOI20_constellation3) | C++17 | 572 ms | 95224 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(), (v).end()
using namespace std;
using lint = long long;
using pi = pair<lint, lint>;
const int MAXN = 200005;
const int MAXT = 530000;
namespace gugugu{
struct path{
int cost, s, e;
};
int n, m;
vector<int> gph[MAXN];
vector<path> paths[MAXN];
int par[MAXN][18], dep[MAXN];
int dfn[MAXN], sz[MAXN], p0, tra[MAXN];
int comp[MAXN], cnum[MAXN], chead[MAXN], csize[MAXN], piv;
int son[MAXN];
int lca(int x, int y){
if(dep[x] > dep[y]) swap(x,y);
int diff = dep[y] - dep[x];
for (int i=0; i<18; i++) {
if((diff >> i) & 1) y = par[y][i];
}
for (int i=17; i>=0; i--) {
컴파일 시 표준 에러 (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... |