prize.cpp:14:13: error: 'pair' does not name a type
14 | using pii = pair<int, int>;
| ^~~~
prize.cpp:24:26: error: 'pii' has not been declared
24 | int search(int l, int r, pii left, pii right) {
| ^~~
prize.cpp:24:36: error: 'pii' has not been declared
24 | int search(int l, int r, pii left, pii right) {
| ^~~
prize.cpp: In function 'int search(int, int, int, int)':
prize.cpp:30:5: error: 'pii' was not declared in this scope
30 | pii curr = {c [0], c [1]};
| ^~~
prize.cpp:38:22: error: 'curr' was not declared in this scope
38 | if (c [1] > 0 && curr != right) {
| ^~~~
prize.cpp:41:35: error: 'curr' was not declared in this scope
41 | if (ret == -1 && c [0] > 0 && curr != left) {
| ^~~~
prize.cpp: In function 'int find_best(int)':
prize.cpp:48:18: error: no matching function for call to 'search(int, int, <brace-enclosed initializer list>, <brace-enclosed initializer list>)'
48 | return search(0, n - 1, {-1, -1}, {-1, -1});
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/algorithm:61,
from prize.cpp:2:
/usr/include/c++/13/bits/stl_algo.h:4137:5: note: candidate: 'template<class _FIter1, class _FIter2> constexpr _FIter1 std::search(_FIter1, _FIter1, _FIter2, _FIter2)'
4137 | search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
| ^~~~~~
/usr/include/c++/13/bits/stl_algo.h:4137:5: note: template argument deduction/substitution failed:
prize.cpp:48:18: note: couldn't deduce template parameter '_FIter2'
48 | return search(0, n - 1, {-1, -1}, {-1, -1});
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algo.h:4178:5: note: candidate: 'template<class _FIter1, class _FIter2, class _BinaryPredicate> constexpr _FIter1 std::search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate)'
4178 | search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
| ^~~~~~
/usr/include/c++/13/bits/stl_algo.h:4178:5: note: template argument deduction/substitution failed:
prize.cpp:48:18: note: candidate expects 5 arguments, 4 provided
48 | return search(0, n - 1, {-1, -1}, {-1, -1});
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algo.h:4273:5: note: candidate: 'template<class _ForwardIterator, class _Searcher> constexpr _ForwardIterator std::search(_ForwardIterator, _ForwardIterator, const _Searcher&)'
4273 | search(_ForwardIterator __first, _ForwardIterator __last,
| ^~~~~~
/usr/include/c++/13/bits/stl_algo.h:4273:5: note: template argument deduction/substitution failed:
prize.cpp:48:18: note: candidate expects 3 arguments, 4 provided
48 | return search(0, n - 1, {-1, -1}, {-1, -1});
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/algorithm:73:
/usr/include/c++/13/pstl/glue_algorithm_defs.h:112:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::search(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _BinaryPredicate)'
112 | search(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __s_first,
| ^~~~~~
/usr/include/c++/13/pstl/glue_algorithm_defs.h:112:1: note: template argument deduction/substitution failed:
prize.cpp:48:18: note: candidate expects 6 arguments, 4 provided
48 | return search(0, n - 1, {-1, -1}, {-1, -1});
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/pstl/glue_algorithm_defs.h:117:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::search(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2)'
117 | search(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __s_first,
| ^~~~~~
/usr/include/c++/13/pstl/glue_algorithm_defs.h:117:1: note: template argument deduction/substitution failed:
prize.cpp:48:18: note: candidate expects 5 arguments, 4 provided
48 | return search(0, n - 1, {-1, -1}, {-1, -1});
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prize.cpp:24:5: note: candidate: 'int search(int, int, int, int)'
24 | int search(int l, int r, pii left, pii right) {
| ^~~~~~
prize.cpp:24:30: note: no known conversion for argument 3 from '<brace-enclosed initializer list>' to 'int'
24 | int search(int l, int r, pii left, pii right) {
| ~~~~^~~~