#include <bits/stdc++.h>
#include <graderlib.h>
#define forn(i, a, b) for(int i = int(a); i <= int(b); ++ i)
#define pb push_back
using namespace std;
typedef vector<int> vi;
const int lim = 15e4;
vi graph[lim + 2];
int res = 0;
int limite, objetivo;
void dfs(int padre, int u, int paso){
if(paso == limite){
if(objetivo == u){
res ++;
}
return;
}
if((int) graph[u].size() == 1){
dfs(u, graph[u][0], paso + 1);
return;
}
for(int &v : graph[u]){
if(v != padre){
dfs(u, v, paso + 1);
return;
}
}
}
void count_routes(int N, int M, int P, int R[][2], int Q, int G[]) {
forn(i, 0, M - 1){
if((int) graph[R[i][0]].size() < 2){
graph[R[i][0]].pb(R[i][1]);
}
if((int) graph[R[i][1]].size() < 2){
graph[R[i][1]].pb(R[i][0]);
}
}
objetivo = P;
limite = G[0];
forn(i, 0, N - 1){
dfs(i, i, 0);
}
answer(res);
}
Compilation message
garden.cpp:2:10: fatal error: graderlib.h: No such file or directory
2 | #include <graderlib.h>
| ^~~~~~~~~~~~~
compilation terminated.