# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
885414 | TahirAliyev | 경주 (Race) (IOI11_race) | C++17 | 360 ms | 97656 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "race.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pii pair<ll, ll>
#define oo 1e9
const int MAX = 2e5 + 5;
vector<pii> g[MAX];
int n, k;
map<ll, int> mp[MAX];
int ans = oo;
void dfs(int node, int p, ll d, int h){
for(pii to : g[node]){
if(to.first == p) continue;
dfs(to.first, node, d + to.second, h + 1);
if(mp[to.first].size() > mp[node].size()){
swap(mp[node], mp[to.first]);
}
}
for(pii to : g[node]){
if(to.first == p) continue;
for(auto a : mp[to.first]){
if(!a.second) continue;
# | 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... |