garden.cpp:2:1: error: 'vector' does not name a type
vector <pair<int,int> > adj[2000];
^~~~~~
garden.cpp: In function 'int dfs(int, int, int, int)':
garden.cpp:9:8: error: 'adj' was not declared in this scope
if(adj[v].size() == 1)
^~~
garden.cpp: In function 'void count_routes(int, int, int, int (*)[2], int, int*)':
garden.cpp:37:7: error: 'adj' was not declared in this scope
adj[v].push_back(make_pair(u,beauty));
^~~
garden.cpp:37:24: error: 'make_pair' was not declared in this scope
adj[v].push_back(make_pair(u,beauty));
^~~~~~~~~
garden.cpp:48:5: error: 'answer' was not declared in this scope
answer(res);
^~~~~~