shortcut.cpp: In lambda function:
shortcut.cpp:90:20: error: expected ')' before 'for'
90 | qmax(i, nxtp2)
| ^
| )
91 | for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
| ~~~
shortcut.cpp:89:15: note: to match this '('
89 | diam1 = max(diam1, qmin(k + 1, j + 1) -
| ^
shortcut.cpp:91:26: error: no match for 'operator!=' (operand types are 'std::vector<int>' and 'nagai' {aka 'long long int'})
91 | for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
| ~ ^~ ~~~~~
| | |
| | nagai {aka long long int}
| std::vector<int>
In file included from /usr/include/c++/10/utility:70,
from /usr/include/c++/10/algorithm:60,
from shortcut.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:496:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator!=(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)'
496 | operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_pair.h:496:5: note: template argument deduction/substitution failed:
shortcut.cpp:91:29: note: 'std::vector<int>' is not derived from 'const std::pair<_T1, _T2>'
91 | for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
| ^~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
from /usr/include/c++/10/algorithm:61,
from shortcut.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:372:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator!=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)'
372 | operator!=(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:372:5: note: template argument deduction/substitution failed:
shortcut.cpp:91:29: note: 'std::vector<int>' is not derived from 'const std::reverse_iterator<_Iterator>'
91 | for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
| ^~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
from /usr/include/c++/10/algorithm:61,
from shortcut.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:410:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator!=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)'
410 | operator!=(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:410:5: note: template argument deduction/substitution failed:
shortcut.cpp:91:29: note: 'std::vector<int>' is not derived from 'const std::reverse_iterator<_Iterator>'
91 | for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
| ^~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
from /usr/include/c++/10/algorithm:61,
from shortcut.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:1444:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator!=(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)'
1444 | operator!=(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:1444:5: note: template argument deduction/substitution failed:
shortcut.cpp:91:29: note: 'std::vector<int>' is not derived from 'const std::move_iterator<_IteratorL>'
91 | for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
| ^~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
from /usr/include/c++/10/algorithm:61,
from shortcut.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:1501:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator!=(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)'
1501 | operator!=(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:1501:5: note: template argument deduction/substitution failed:
shortcut.cpp:91:29: note: 'std::vector<int>' is not derived from 'const std::move_iterator<_IteratorL>'
91 | for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
| ^~~~~
In file included from /usr/include/c++/10/tuple:39,
from /usr/include/c++/10/functional:54,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from shortcut.cpp:1:
/usr/include/c++/10/array:278:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> bool std::operator!=(const std::array<_Tp, _Nm>&, const std::array<_Tp, _Nm>&)'
278 | operator!=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two)
| ^~~~~~~~
/usr/include/c++/10/array:278:5: note: template argument deduction/substitution failed:
shortcut.cpp:91:29: note: 'std::vector<int>' is not derived from 'const std::array<_Tp, _Nm>'
91 | for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
| ^~~~~
In file included from /usr/include/c++/10/functional:54,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from shortcut.cpp:1:
/usr/include/c++/10/tuple:1448:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator!=(const std::tuple<_Tps ...>&, const std::tuple<_UTypes ...>&)'
1448 | operator!=(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/10/tuple:1448:5: note: template argument deduction/substitution failed:
shortcut.cpp:91:29: note: 'std::vector<int>' is not derived from 'const std::tuple<_Tps ...>'
91 | for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
| ^~~~~
In file included from /usr/include/c++/10/functional:59,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from shortcut.cpp:1:
/usr/include/c++/10/bits/std_function.h:699:5: note: candidate: 'template<class _Res, class ... _Args> bool std::operator!=(const std::function<_Res(_ArgTypes ...)>&, std::nullptr_t)'
699 | operator!=(const function<_Res(_Args...)>& __f, nullptr_t) noexcept
| ^~~~~~~~
/usr/include/c++/10/bits/std_function.h:699:5: note: template argument deduction/substitution failed:
shortcut.cpp:91:29: note: 'std::vector<int>' is not derived from 'const std::function<_Res(_ArgTypes ...)>'
91 | for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
| ^~~~~
In file included from /usr/include/c++/10/functional:59,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from shortcut.cpp:1:
/usr/include/c++/10/bits/std_function.h:705:5: note: candidate: 'template<class _Res, class ... _Args> bool std::operator!=(std::nullptr_t, const std::function<_Res(_ArgTypes ...)>&)'
705 | operator!=(nullptr_t, const function<_Res(_Args...)>& __f) noexcept
| ^~~~~~~~
/usr/include/c++/10/bits/std_function.h:705:5: note: template argument deduction/substitution failed:
shortcut.cpp:91:29: note: mismatched types 'const std::function<_Res(_ArgTypes ...)>' and 'nagai' {aka 'long long int'}
91 | for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
| ^~~~~
In file included from /usr/include/c++/10/unordered_map:40,
from /usr/include/c++/10/functional:61,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from shortcut.cpp:1:
/usr/include/c++/10/bits/allocator.h:213:5: note: candidate: 'template<class _T1, class _T2> bool std::operator!=(const std::allocator<_Tp1>&, const std::allocator<_T2>&)'
213 | operator!=(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/10/bits/allocator.h:213:5: note: template argument deduction/substitution failed:
shortcut.cpp:91:29: note: 'std::vector<int>' is not derived from 'const std::allocator<_Tp1>'
91 | for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
| ^~~~~
In file included from /usr/include/c++/10/bits/node_handle.h:39,
from /usr/include/c++/10/bits/hashtable.h:37,
from /usr/include/c++/10/unordered_map:46,
from /usr/include/c++/10/functional:61,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from shortcut.cpp:1:
/usr/include/c++/10/optional:994:5: note: candidate: 'template<class _Tp, class _Up> constexpr std::__optional_relop_t<decltype ((declval<_Tp>() != declval<_Up>()))> std::operator!=(const std::optional<_Tp>&, const std::optional<_Up>&)'
994 | operator!=(const optional<_Tp>& __lhs, const optional<_Up>& __rhs)
| ^~~~~~~~
/usr/include/c++/10/optional:994:5: note: template argument deduction/substitution failed:
shortcut.cpp:91:29: note: 'std::vector<int>' is not derived from 'const std::optional<_Tp>'
91 | for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
| ^~~~~
In file included from /usr/include/c++/10/bits/node_handle.h:39,
from /usr/include/c++/10/bits/hashtable.h:37,
from /usr/include/c++/10/unordered_map:46,
from /usr/include/c++/10/functional:61,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from shortcut.cpp:1:
/usr/include/c++/10/optional:1061:5: note: candidate: 'template<class _Tp> constexpr bool std::operator!=(const std::optional<_Tp>&, std::nullopt_t)'
1061 | operator!=(const optional<_Tp>& __lhs, nullopt_t) noexcept
| ^~~~~~~~
/usr/include/c++/10/optional:1061:5: note: template argument deduction/substitution failed:
shortcut.cpp:91:29: note: 'std::vector<int>' is not derived from 'const std::optional<_Tp>'
91 | for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
| ^~~~~
In file included from /usr/include/c++/10/bits/node_handle.h:39,
from /usr/include/c++/10/bits/hashtable.h:37,
from /usr/include/c++/10/unordered_map:46,
from /usr/include/c++/10/functional:61,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from shortcut.cpp:1:
/usr/include/c++/10/optional:1066:5: note: candidate: 'template<class _Tp> constexpr bool std::operator!=(std::nullopt_t, const std::optional<_Tp>&)'
1066 | operator!=(nullopt_t, const optional<_Tp>& __rhs) noexcept
| ^~~~~~~~
/usr/include/c++/10/optional:1066:5: note: template argument deduction/substitution failed:
shortcut.cpp:91:29: note: mismatched types 'const std::optional<_Tp>' and 'nagai' {aka 'long long int'}
91 | for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
| ^~~~~
In file included from /usr/include/c++/10/bits/node_handle.h:39,
from /usr/include/c++/10/bits/hashtable.h:37,
from /usr/include/c++/10/unordered_map:46,
from /usr/include/c++/10/functional:61,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from shortcut.cpp:1:
/usr/include/c++/10/optional:1125:5: note: candidate: 'template<class _Tp, class _Up> constexpr std::__optional_relop_t<decltype ((declval<_Tp>() != declval<_Up>()))> std::operator!=(const std::optional<_Tp>&, const _Up&)'
1125 | operator!=(const optional<_Tp>& __lhs, const _Up& __rhs)
| ^~~~~~~~
/usr/include/c++/10/optional:1125:5: note: template argument deduction/substitution failed:
shortcut.cpp:91:29: note: 'std::vector<int>' is not derived from 'const std::optional<_Tp>'
91 | for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
| ^~~~~
In file included from /usr/include/c++/10/bits/node_handle.h:39,
from /usr/include/c++/10/bits/hashtable.h:37,
from /usr/include/c++/10/unordered_map:46,
from /usr/include/c++/10/functional:61,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from shortcut.cpp:1:
/usr/include/c++/10/optional:1131:5: note: candidate: 'template<class _Tp, class _Up> constexpr std::__optional_relop_t<decltype ((declval<_Up>() != declval<_Tp>()))> std::operator!=(const _Up&, const std::optional<_Tp>&)'
1131 | operator!=(const _Up& __lhs, const optional<_Tp>& __rhs)
| ^~~~~~~~
/usr/include/c++/10/optional:1131:5: note: template argument deduction/substitution failed:
shortcut.cpp:91:29: note: mismatched types 'const std::optional<_Tp>' and 'nagai' {aka 'long long int'}
91 | for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
| ^~~~~
In file included from /usr/include/c++/10/unordered_map:47,
from /usr/include/c++/10/functional:61,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from shortcut.cpp:1:
/usr/include/c++/10/bits/unordered_map.h:2097:5: note: candidate: 'template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> bool std::operator!=(const std::unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&, const std::unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&)'
2097 | operator!=(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
| ^~~~~~~~
/usr/include/c++/10/bits/unordered_map.h:2097:5: note: template argument deduction/substitution failed:
shortcut.cpp:91:29: note: 'std::vector<int>' is not derived from 'const std::unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>'
91 | for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
| ^~~~~
In file included from /usr/include/c++/10/unordered_map:47,
from /usr/include/c++/10/functional:61,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from shortcut.cpp:1:
/usr/include/c++/10/bits/unordered_map.h:2111:5: note: candidate: 'template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> bool std::operator!=(const std::unordered_multimap<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&, const std::unordered_multimap<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&)'
2111 | operator!=(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
| ^~~~~~~~
/usr/include/c++/10/bits/unordered_map.h:2111:5: note: template argument deduction/substitution failed:
shortcut.cpp:91:29: note: 'std::vector<int>' is not derived from 'const std::unordered_multimap<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>'
91 | for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
| ^~~~~
In file included from /usr/include/c++/10/vector:67,
from /usr/include/c++/10/functional:62,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from shortcut.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:1937:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator!=(const std::vector<_Tp, _Alloc>&, const std::vector<_Tp, _Alloc>&)'
1937 | operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:1937:5: note: template argument deduction/substitution failed:
shortcut.cpp:91:29: note: mismatched types 'const std::vector<_Tp, _Alloc>' and 'nagai' {aka 'long long int'}
91 | for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
| ^~~~~
In file included from /usr/include/c++/10/iosfwd:40,
from /usr/include/c++/10/ios:38,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from shortcut.cpp:2:
/usr/include/c++/10/bits/postypes.h:227:5: note: candidate: 'template<class _StateT> bool std::operator!=(const std::fpos<_StateT>&, const std::fpos<_StateT>&)'
227 | operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/10/bits/postypes.h:227:5: note: template argument deduction/substitution failed:
shortcut.cpp:91:29: note: 'std::vector<int>' is not derived from 'const std::fpos<_StateT>'
91 | for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
| ^~~~~
In file included from /usr/include/c++/10/bits/basic_string.h:48,
from /usr/include/c++/10/string:55,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from shortcut.cpp:2:
/usr/include/c++/10/string_view:525:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator!=(std::basic_string_view<_CharT, _Traits>, std::basic_string_view<_CharT, _Traits>)'
525 | operator!=(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/10/string_view:525:5: note: template argument deduction/substitution failed:
shortcut.cpp:91:29: note: 'std::vector<int>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
91 | for (int l = k + 1; l != nxtp2; l = l == j ? i : l + 1)
| ^~~~~
In file included from /usr/include/c++/10/bits/basic_string.h:48,
from /usr/include/c++/10/string:55,
from