Problem oranges2
User boaznumberd5555
Submission Time 2024-12-18 17:11:06
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:43:33: error: wrong number of template arguments (1, should be 2)
43 | pair<int kth_parent(int x, int k){
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from oranges2.cpp:1:
/usr/include/c++/9/bits/stl_pair.h:208:12: note: provided for ‘template<class _T1, class _T2> struct std::pair’
208 | struct pair
| ^~~~