garden.cpp: In function 'void count_routes(int, int, int, int (*)[2], int, int*)':
garden.cpp:23:20: error: redeclaration of 'int v'
int v = R[i][0], v = R[i][1];
^
garden.cpp:23:7: note: 'int v' previously declared here
int v = R[i][0], v = R[i][1];
^
garden.cpp:24:32: error: 'u' was not declared in this scope
if(!best[v][0]) best[v][0] = u;
^
garden.cpp:25:37: error: 'u' was not declared in this scope
else if(!best[v][1]) best[v][1] = u;
^
garden.cpp:26:12: error: 'u' was not declared in this scope
if(!best[u][0]) best[u][0] = v;
^
garden.cpp:45:33: error: invalid conversion from 'int*' to 'int' [-fpermissive]
time[i][1] = time[best[i][0]] + 1;
~~~~~~~~~~~~~~~~~^~~