제출 #1346020

#제출 시각아이디문제언어결과실행 시간메모리
1346020Jer이주 (IOI25_migrations)C++20
10 / 100
20 ms444 KiB
#include "migrations.h"
#include <bits/stdc++.h>

using namespace std;

const int MAXN = 10005;
int depth[MAXN], best_depth = -1, best = 0;

int send_message(int n, int i, int p)
{
	if (i != 0)
		depth[i] = depth[p] + 1;
	if (depth[i] > best_depth)
		best = i, best_depth = depth[i];
	return (i == n - 1 ? best : 0);
}

std::pair<int, int> longest_path(std::vector<int> s)
{
	return {0, s[s.size() - 1]};
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...