# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
558771 | Trunkty | Amusement Park (JOI17_amusement_park) | C++14 | 32 ms | 6540 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long ll;
#define DEBUG
#ifdef DEBUG
#define debug(x) cout << #x << ": " << x << endl
#else
#define debug(x)
#endif
#include "Joi.h"
vector<int> roads[10005],tree[10005];
ll siz[100005],pos[100005],dia,pa,pb;
bool check[10005];
void dfs(int x){
check[x] = true;
siz[x] = 1;
pos[x] = x;
for(int i:roads[x]){
if(!check[i]){
tree[x].push_back(i);
tree[i].push_back(x);
dfs(i);
if(siz[x]+siz[i]>dia){
pa = pos[x];
# | 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... |