# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
148104 | WhipppedCream | Cat in a tree (BOI17_catinatree) | C++17 | 319 ms | 51732 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
//Power Of Ninja Go
#include <bits/stdc++.h>
//#ifdef atom #else #endif
using namespace std;
typedef long long ll; typedef pair<int, int> ii; typedef vector<int> vi; typedef vector< ii > vii;
#define X first
#define Y second
#define pb push_back
int n, k;
const int maxn = 2e5+5;
vi adj[maxn];
int h[maxn];
multiset<int> bst[maxn];
void dfs(int u)
{
for(auto v : adj[u])
{
h[v] = 1+h[u];
dfs(v);
}
}
void solve(int u)
{
for(auto v : adj[u]) solve(v);
int big = -1;
for(auto v : adj[u])
{
if(big == -1 || bst[v].size()> bst[big].size()) big = v;
}
if(big == -1) return;
컴파일 시 표준 에러 (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... |