Submission #293548

#TimeUsernameProblemLanguageResultExecution timeMemory
293548DovranHighway Tolls (IOI18_highway)C++11
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "highway.h" #define N 200009 #define pii pair <int, int> #define ff first #define ss second #define pb push_back #define ll long long using namespace std; ll n, m, dsa, l[N]; vector<int>e[N]; ll x; void f(int nd, int pr, int lv){ l[nd]=lv; for(auto i:e[nd]) if(i!=pr) f(i, nd, lv+1); } 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=x/a; f(0, 0, 0); for(int i=0; i<n; i++){ if(l[i]==x){ answer(0, i); return; } } }

Compilation message (stderr)

highway.cpp: In function 'void find_pair(int, std::vector<int>, std::vector<int>, int, int)':
highway.cpp:25:6: error: expected ';' before 'm'
   25 |  n=NN
      |      ^
      |      ;
   26 |  m=u.size();
      |  ~