Problem oranges2
User boaznumberd5555
Submission Time 2025-10-27 00:33:36
Score 0
Max Time N/A
Max Memory N/A

Compile Error

oranges2.cpp: In function ‘void dfs(int, int)’:
oranges2.cpp:36:21: error: cannot convert ‘std::pair<int, int>’ to ‘int’ in initialization
36 | for(int i: adj[x]){
| ^
oranges2.cpp: At global scope:
oranges2.cpp:41:1: error: expected declaration before ‘}’ token
41 | }
| ^
oranges2.cpp: In function ‘std::pair<int, int> kth_parent(int, int)’:
oranges2.cpp:44:5: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
44 | ans = 0;
| ^~~
| abs
oranges2.cpp:47:30: error: could not convert ‘-1’ from ‘int’ to ‘std::pair<int, int>’
47 | if (x <= -1) return -1;
| ^
| |
| int
oranges2.cpp:49:12: error: could not convert ‘x’ from ‘int’ to ‘std::pair<int, int>’
49 | return x;
| ^
|