Submission #1239904

#TimeUsernameProblemLanguageResultExecution timeMemory
1239904moondarksideStations (IOI20_stations)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; #define v vector<int> #define vv vector<v> #define I int vv N;v V;I d(I x,I p,I e,bool t){if(t==false){V[x]=e;I c=1+e;for(I i=0;i<N[x].size();i++){if(N[x][i]!=p){c+=d(N[x][i],x,c,true);}}return c-e;}I c=e;for(I i=0;i<N[x].size();i++){if(N[x][i]!=p){c += d(N[x][i],x,c,false);}}V[x]=c;c++;return c-e;}v label(I n,I k,v u,v P){N=vv(n);for(I i=0;i<n-1;i++){N[u[i]].push_back(P[i]);N[P[i]].push_back(u[i]);}V=v(n);d(0,-1,0,false);return V;}I find_Next_station(I s,I t,v c){I l=c.size()-1;if(s<c[0]){if(t<s){return c[l];}for(I i=0;i<l;i++){if(t<=c[i]){return c[i];}}return c[l];}if(t>s){return c[0];}for(I i=l;i>0;i--){if(t>=c[i]){return c[i];}}return c[0];}

Compilation message (stderr)

/usr/bin/ld: /tmp/cc09KSbW.o: in function `main':
stub.cpp:(.text.startup+0x4fc): undefined reference to `find_next_station(int, int, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status