제출 #293470

#제출 시각아이디문제언어결과실행 시간메모리
293470Dovran통행료 (IOI18_highway)C++11
0 / 100
14 ms3220 KiB
#include <bits/stdc++.h> #include "highway.h" #define N 100009 #define pii pair <int, int> #define ff first #define ss second #define pb push_back #define ll long long using namespace std; int n, m, x, dsa; vector<int>e[N]; void f(int nd, int pr, int lv){ if(lv==x){ answer(0, nd); dsa=1; return; } for(auto i:e[nd]){ if(i!=pr) f(i, nd, lv+1); if(dsa) return; } } void find_pair(int NN, std::vector<int>u, std::vector<int>v, int a, int b){ n=NN, m=u.size(); vector<int>asd; for(int i=0; i<m; i++) e[u[i]].pb(v[i]), e[v[i]].pb(u[i]), asd.pb(0); x=ask(asd), x/=a; f(0, -1, 1); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...