jumps.cpp:7:8: error: expected unqualified-id before 'int'
7 | int n, int dist[200005], l[200005], r[200005];
| ^~~
jumps.cpp: In function 'void init(int, std::vector<int>)':
jumps.cpp:24:23: error: 'r' was not declared in this scope
24 | if(it != s.end()) r[x] = (*it).ss;
| ^
jumps.cpp:26:13: error: 'l' was not declared in this scope
26 | it--; l[x] = (*it).ss;
| ^
jumps.cpp: In function 'int minimum_jumps(int, int, int, int)':
jumps.cpp:35:30: error: 'dist' was not declared in this scope
35 | for(int i = 0; i < n; i++) dist[i] = INT_MAX;
| ^~~~
jumps.cpp:37:30: error: 'dist' was not declared in this scope
37 | if(c <= idx && idx <= d) dist[x] = 0;
| ^~~~
jumps.cpp:38:46: error: 'dist' was not declared in this scope
38 | if(a <= idx && idx <= b) ans = min({ans, dist[l[x]] + 1, dist[r[x]] + 1});
| ^~~~
jumps.cpp:38:51: error: 'l' was not declared in this scope
38 | if(a <= idx && idx <= b) ans = min({ans, dist[l[x]] + 1, dist[r[x]] + 1});
| ^
jumps.cpp:38:67: error: 'r' was not declared in this scope
38 | if(a <= idx && idx <= b) ans = min({ans, dist[l[x]] + 1, dist[r[x]] + 1});
| ^
jumps.cpp:38:77: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
38 | if(a <= idx && idx <= b) ans = min({ans, dist[l[x]] + 1, dist[r[x]] + 1});
| ^
In file included from /usr/include/c++/10/vector:60,
from jumps.h:1,
from jumps.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:230:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
230 | min(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:230:5: note: template argument deduction/substitution failed:
jumps.cpp:38:77: note: candidate expects 2 arguments, 1 provided
38 | if(a <= idx && idx <= b) ans = min({ans, dist[l[x]] + 1, dist[r[x]] + 1});
| ^
In file included from /usr/include/c++/10/vector:60,
from jumps.h:1,
from jumps.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:278:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
278 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:278:5: note: template argument deduction/substitution failed:
jumps.cpp:38:77: note: candidate expects 3 arguments, 1 provided
38 | if(a <= idx && idx <= b) ans = min({ans, dist[l[x]] + 1, dist[r[x]] + 1});
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from jumps.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:3468:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)'
3468 | min(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3468:5: note: template argument deduction/substitution failed:
/usr/include/c++/10/bits/stl_algo.h:3474:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)'
3474 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3474:5: note: template argument deduction/substitution failed:
jumps.cpp:39:5: error: 'dist' was not declared in this scope
39 | dist[x] = min({dist[x], dist[l[x]] + 1, dist[r[x]] + 1});
| ^~~~
jumps.cpp:39:34: error: 'l' was not declared in this scope
39 | dist[x] = min({dist[x], dist[l[x]] + 1, dist[r[x]] + 1});
| ^
jumps.cpp:39:50: error: 'r' was not declared in this scope
39 | dist[x] = min({dist[x], dist[l[x]] + 1, dist[r[x]] + 1});
| ^
jumps.cpp:39:60: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
39 | dist[x] = min({dist[x], dist[l[x]] + 1, dist[r[x]] + 1});
| ^
In file included from /usr/include/c++/10/vector:60,
from jumps.h:1,
from jumps.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:230:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
230 | min(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:230:5: note: template argument deduction/substitution failed:
jumps.cpp:39:60: note: candidate expects 2 arguments, 1 provided
39 | dist[x] = min({dist[x], dist[l[x]] + 1, dist[r[x]] + 1});
| ^
In file included from /usr/include/c++/10/vector:60,
from jumps.h:1,
from jumps.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:278:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
278 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:278:5: note: template argument deduction/substitution failed:
jumps.cpp:39:60: note: candidate expects 3 arguments, 1 provided
39 | dist[x] = min({dist[x], dist[l[x]] + 1, dist[r[x]] + 1});
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from jumps.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:3468:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)'
3468 | min(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3468:5: note: template argument deduction/substitution failed:
/usr/include/c++/10/bits/stl_algo.h:3474:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)'
3474 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3474:5: note: template argument deduction/substitution failed: