eastereggs.cpp: In function 'void dfs(int, int)':
eastereggs.cpp:16:38: error: too few arguments to function 'void dfs(int, int)'
for(int v : adj[u]) if(v != p) dfs(v);
^
eastereggs.cpp:14:6: note: declared here
void dfs(int u, int p){
^~~
eastereggs.cpp: In function 'int findEgg(int, std::vector<std::pair<int, int> >)':
eastereggs.cpp:23:17: error: 'n' was not declared in this scope
int l = 1, r = n, res;
^
eastereggs.cpp:25:15: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int mid = l + r >> 1;
~~^~~
eastereggs.cpp:27:18: error: 'res' was not declared in this scope
if(query(ask)) res = mid, r = mid - 1;
^~~
eastereggs.cpp:30:13: error: 'res' was not declared in this scope
return arr[res];
^~~