horses.cpp: In function 'void update_seg(int, int, int, int, int)':
horses.cpp:52:54: warning: declaration of 'x' shadows a global declaration [-Wshadow]
52 | void update_seg(int v, int tl, int tr, int pos, int x){
| ^
horses.cpp:36:5: note: shadowed declaration is here
36 | int x[500010], y[500010];
| ^
horses.cpp: In function 'int get_resp(int)':
horses.cpp:86:19: warning: declaration of 'N' shadows a global declaration [-Wshadow]
86 | int get_resp(int N){
| ^
horses.cpp:15:5: note: shadowed declaration is here
15 | int N;
| ^
horses.cpp:93:31: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
93 | res=query(1, 1, N, 1, lt);
| ^~
horses.cpp:94:26: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
94 | return (res*prod)%mod;
| ~~~~~~~~~~^~~~
horses.cpp:99:29: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
99 | ll Y=query(1, 1, N, pos, lt);
| ^~~
horses.cpp:99:34: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
99 | ll Y=query(1, 1, N, pos, lt);
| ^~
horses.cpp:115:32: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
115 | ll Y=query(1, 1, N, 1, lt);
| ^~
horses.cpp:122:12: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
122 | return res;
| ^~~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:147:49: error: no matching function for call to 'std::multiset<std::pair<int, int> >::find(std::multiset<std::pair<int, int> >::iterator)'
147 | auto it=suf.find(suf.lower_bound({pos+1, 0}));
| ^
In file included from /usr/include/c++/9/set:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:87,
from horses.cpp:3:
/usr/include/c++/9/bits/stl_multiset.h:775:7: note: candidate: 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::find(const key_type&) [with _Key = std::pair<int, int>; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >; std::multiset<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<std::pair<int, int> >; std::multiset<_Key, _Compare, _Alloc>::key_type = std::pair<int, int>]'
775 | find(const key_type& __x)
| ^~~~
/usr/include/c++/9/bits/stl_multiset.h:775:28: note: no known conversion for argument 1 from 'std::multiset<std::pair<int, int> >::iterator' {aka 'std::_Rb_tree_const_iterator<std::pair<int, int> >'} to 'const key_type&' {aka 'const std::pair<int, int>&'}
775 | find(const key_type& __x)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/9/bits/stl_multiset.h:779:7: note: candidate: 'std::multiset<_Key, _Compare, _Alloc>::const_iterator std::multiset<_Key, _Compare, _Alloc>::find(const key_type&) const [with _Key = std::pair<int, int>; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >; std::multiset<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<std::pair<int, int> >; std::multiset<_Key, _Compare, _Alloc>::key_type = std::pair<int, int>]'
779 | find(const key_type& __x) const
| ^~~~
/usr/include/c++/9/bits/stl_multiset.h:779:28: note: no known conversion for argument 1 from 'std::multiset<std::pair<int, int> >::iterator' {aka 'std::_Rb_tree_const_iterator<std::pair<int, int> >'} to 'const key_type&' {aka 'const std::pair<int, int>&'}
779 | find(const key_type& __x) const
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/9/bits/stl_multiset.h:785:2: note: candidate: 'template<class _Kt> decltype (std::multiset<_Key, _Compare, _Alloc>::iterator{((std::multiset<_Key, _Compare, _Alloc>*)this)->std::multiset<_Key, _Compare, _Alloc>::_M_t._M_find_tr(__x)}) std::multiset<_Key, _Compare, _Alloc>::find(const _Kt&) [with _Kt = _Kt; _Key = std::pair<int, int>; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >]'
785 | find(const _Kt& __x)
| ^~~~
/usr/include/c++/9/bits/stl_multiset.h:785:2: note: template argument deduction/substitution failed:
/usr/include/c++/9/bits/stl_multiset.h: In substitution of 'template<class _Kt> decltype (std::multiset<std::pair<int, int> >::iterator{((std::multiset<std::pair<int, int> >*)this)->std::multiset<std::pair<int, int> >::_M_t.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int> >, std::less<std::pair<int, int> >, std::allocator<std::pair<int, int> > >::_M_find_tr(__x)}) std::multiset<std::pair<int, int> >::find<_Kt>(const _Kt&) [with _Kt = std::_Rb_tree_const_iterator<std::pair<int, int> >]':
horses.cpp:147:49: required from here
/usr/include/c++/9/bits/stl_multiset.h:785:2: error: no matching function for call to 'std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int> >, std::less<std::pair<int, int> >, std::allocator<std::pair<int, int> > >::_M_find_tr(const std::_Rb_tree_const_iterator<std::pair<int, int> >&)'
In file included from /usr/include/c++/9/map:60,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:81,
from horses.cpp:3:
/usr/include/c++/9/bits/stl_tree.h:1306:2: note: candidate: 'template<class _Kt, class _Req> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_find_tr(const _Kt&) [with _Kt = _Kt; _Req = _Req; _Key = std::pair<int, int>; _Val = std::pair<int, int>; _KeyOfValue = std::_Identity<std::pair<int, int> >; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >]'
1306 | _M_find_tr(const _Kt& __k)
| ^~~~~~~~~~
/usr/include/c++/9/bits/stl_tree.h:1306:2: note: template argument deduction/substitution failed:
/usr/include/c++/9/bits/stl_tree.h: In substitution of 'template<class _Cmp, class _SfinaeType> using __has_is_transparent_t = typename std::__has_is_transparent<_Cmp, _SfinaeType>::type [with _Cmp = std::less<std::pair<int, int> >; _SfinaeType = std::_Rb_tree_const_iterator<std::pair<int, int> >]':
/usr/include/c++/9/bits/stl_tree.h:1304:9: required by substitution of 'template<class _Kt> decltype (std::multiset<std::pair<int, int> >::iterator{((std::multiset<std::pair<int, int> >*)this)->std::multiset<std::pair<int, int> >::_M_t.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int> >, std::less<std::pair<int, int> >, std::allocator<std::pair<int, int> > >::_M_find_tr(__x)}) std::multiset<std::pair<int, int> >::find<_Kt>(const _Kt&) [with _Kt = std::_Rb_tree_const_iterator<std::pair<int, int> >]'
horses.cpp:147:49: required from here
/usr/include/c++/9/bits/stl_tree.h:425:11: error: no type named 'type' in 'struct std::__has_is_transparent<std::less<std::pair<int, int> >, std::_Rb_tree_const_iterator<std::pair<int, int> >, void>'
425 | using __has_is_transparent_t
| ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_multiset.h: In substitution of 'template<class _Kt> decltype (std::multiset<std::pair<int, int> >::iterator{((std::multiset<std::pair<int, int> >*)this)->std::multiset<std::pair<int, int> >::_M_t.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int> >, std::less<std::pair<int, int> >, std::allocator<std::pair<int, int> > >::_M_find_tr(__x)}) std::multiset<std::pair<int, int> >::find<_Kt>(const _Kt&) [with _Kt = std::_Rb_tree_const_iterator<std::pair<int, int> >]':
horses.cpp:147:49: required from here
/usr/include/c++/9/bits/stl_tree.h:1315:2: note: candidate: 'template<class _Kt, class _Req> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_find_tr(const _Kt&) const [with _Kt = _Kt; _Req = _Req; _Key = std::pair<int, int>; _Val = std::pair<int, int>; _KeyOfValue = std::_Identity<std::pair<int, int> >; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >]'
1315 | _M_find_tr(const _Kt& __k) const
| ^~~~~~~~~~
/usr/include/c++/9/bits/stl_tree.h:1315:2: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/9/set:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:87,
from horses.cpp:3:
/usr/include/c++/9/bits/stl_multiset.h:785:2: error: no matching function for call to 'std::_Rb_tree_const_iterator<std::pair<int, int> >::_Rb_tree_const_iterator(<brace-enclosed initializer list>)'
785 | find(const _Kt& __x)
| ^~~~
In file included from /usr/include/c++/9/map:60,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:81,
from horses.cpp:3:
/usr/include/c++/9/bits/stl_tree.h:348:7: note: candidate: 'std::_Rb_tree_const_iterator<_Tp>::_Rb_tree_const_iterator(const iterator&) [with _Tp = std::pair<int, int>; std::_Rb_tree_const_iterator<_Tp>::iterator = std::_Rb_tree_iterator<std::pair<int, int> >]'
348 | _Rb_tree_const_iterator(const iterator& __it) _GLIBCXX_NOEXCEPT
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_tree.h:348:7: note: conversion of argument 1 would be ill-formed:
/usr/include/c++/9/bits/stl_tree.h:345:7: note: candidate: 'std::_Rb_tree_const_iterator<_Tp>::_Rb_tree_const_iterator(std::_Rb_tree_const_iterator<_Tp>::_Base_ptr) [with _Tp = std::pair<int, int>; std::_Rb_tree_const_iterator<_Tp>::_Base_ptr = const std::_Rb_tree_node_base*]'
345 | _Rb_tree_const_iterator(_Base_ptr __x) _GLIBCXX_NOEXCEPT
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_tree.h:345:7: note: conversion of argument 1 would be ill-formed:
/usr/include/c++/9/bits/stl_tree.h:341:7: note: candidate: 'std::_Rb_tree_const_iterator<_Tp>::_Rb_tree_const_iterator() [with _Tp = std::pair<int, int>]'
341 | _Rb_tree_const_iterator() _GLIBCXX_NOEXCEPT
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_tree.h:341:7: note: candidate expects 0 arguments, 1 provided
/usr/include/c++/9/bits/stl_tree.h:326:12: note: candidate: 'constexpr std::_Rb_tree_const_iterator<std::pair<int, int> >::_Rb_tree_const_iterator(const std::_Rb_tree_const_iterator<std::pair<int, int> >&)'
326 | struct _Rb_tree_const_iterator
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_tree.h:326:12: note: conversion of argument 1 would be ill-formed:
/usr/include/c++/9/bits/stl_tree.h:326:12: note: candidate: 'constexpr std::_Rb_tree_const_iterator<std::pair<int, int> >::_Rb_tree_const_iterator(std::_Rb_tree_const_iterator<std::pair<int, int> >&&)'
/usr/include/c++/9/bits/stl_tree.h:326:12: note: conversion of argument 1 would be ill-formed:
In file included from /usr/include/c++/9/set:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:87,
from horses.cpp:3:
/usr/include/c++/9/bits/stl_multiset.h:791:2: note: candidate: 'template<class _Kt> decltype (std::multiset<_Key, _Compare, _Alloc>::const_iterator{((const std::multiset<_Key, _Compare, _Alloc>*)this)->std::multiset<_Key, _Compare, _Alloc>::_M_t._M_find_tr(__x)}) std::multiset<_Key, _Compare, _Alloc>::find(const _Kt&) const [with _Kt = _Kt; _Key = std::pair<int, int>; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >]'
791 | find(const _Kt& __x) const
| ^~~~
/usr/include/c++/9/bits/stl_multiset.h:791:2: note: template argument deduction/substitution failed:
/usr/include/c++/9/bits/stl_multiset.h: In substitution of 'template<class _Kt> decltype (std::multiset<std::pair<int, int> >::const_iterator{((const std::multiset<std::pair<int, int> >*)this)->std::multiset<std::pair<int, int> >::_M_t.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int> >, std::less<std::pair<int, int> >, std::allocator<std::pair<int, int> > >::_M_find_tr(__x)}) std::multiset<std::pair<int, int> >::find<_Kt>(const _Kt&) const [with _Kt = std::_Rb_tree_const_iterator<std::pair<int, int> >]':
horses.cpp:147:49: required from here
/usr/include/c++/9/bits/stl_multiset.h:791:2: error: no matching function for call to 'std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int> >, std::less<std::pair<int, int> >, std::allocator<std::pair<int, int> > >::_M_find_tr(const std::_Rb_tree_const_iterator<std::pair<int, int> >&) const'
In file included from /usr/include/c++/9/map:60,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:81,
from horses.cpp:3:
/usr/include/c++/9/bits/stl_tree.h:1306:2: note: candidate: 'template<class _Kt, class _Req> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_find_tr(const _Kt&) [with _Kt = _Kt; _Req = _Req; _Key = std::pair<int, int>; _Val = std::pair<int, int>; _KeyOfValue = std::_Identity<std::pair<int, int> >; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >]'
1306 | _M_find_tr(const _Kt& __k)
| ^~~~~~~~~~
/usr/include/c++/9/bits/stl_tree.h:1306:2: note: template argument deduction/substitution failed:
/usr/include/c++/9/bits/stl_tree.h:1315:2: note: candidate: 'template<class _Kt, class _Req> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_find_tr(const _Kt&) const [with _Kt = _Kt; _Req = _Req; _Key = std::pair<int, int>; _Val = std::pair<int, int>; _KeyOfValue = std::_Identity<std::pair<int, int> >; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >]'
1315 | _M_find_tr(const _Kt& __k) const
| ^~~~~~~~~~
/usr/include/c++/9/bits/stl_tree.h:1315:2: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/9/set:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:87,
from horses.cpp:3:
/usr/include/c++/9/bits/stl_multiset.h:791:2: error: no matching function for call to 'std::_Rb_tree_const_iterator<std::pair<int, int> >::_Rb_tree_const_iterator(<brace-enclosed initializer list>)'
791 | find(const _Kt& __x) const
| ^~~~
In file included from /usr/include/c++/9/map:60,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:81,
from horses.cpp:3:
/usr/include/c++/9/bits/stl_tree.h:348:7: note: candidate: 'std::_Rb_tree_const_iterator<_Tp>::_Rb_tree_const_iterator(const iterator&) [with _Tp = std::pair<int, int>; std::_Rb_tree_const_iterator<_Tp>::iterator = std::_Rb_tree_iterator<std::pair<int, int> >]'
348 | _Rb_tree_const_iterator(const iterator& __it) _GLIBCXX_NOEXCEPT
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_tree.h:348:7: note: conversion of argument 1 would be ill-formed:
/usr/include/c++/9/bits/stl_tree.h:345:7: note: candidate: 'std::_Rb_tree_const_iterator<_Tp>::_Rb_tree_const_iterator(std::_Rb_tree_const_iterator<_Tp>::_Base_ptr) [with _Tp = std::pair<int, int>; std::_Rb_tree_const_iterator<_Tp>::_Base_ptr = const std::_Rb_tree_node_base*]'
345 | _Rb_tree_const_iterator(_Base_ptr __x) _GLIBCXX_NOEXCEPT
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_tree.h:345:7: note: conversion of argument 1 would be ill-formed:
/usr/include/c++/9/bits/stl_tree.h:341:7: note: candidate: 'std::_Rb_tree_const_iterator<_Tp>::_Rb_tree_const_iterator() [with _Tp = std::pair<int, int>]'
341 | _Rb_tree_const_iterator() _GLIBCXX_NOEXCEPT
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_tree.h:341:7: note: candidate expects 0 arguments, 1 provided
/usr/include/c++/9/bits/stl_tree.h:326:12: note: candidate: 'constexpr std::_Rb_tree_const_iterator<std::pair<int, int> >::_Rb_tree_const_iterator(const std::_Rb_tree_const_iterator<std::pair<int, int> >&)'
326 | struct _Rb_tree_const_iterator
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_tree.h:326:12: note: conversion of argument 1 would be ill-formed:
/usr/include/c++/9/bits/stl_tree.h:326:12: note: candidate: 'constexpr std::_Rb_tree_const_iterator<std::pair<int, int> >::_Rb_tree_const_iterator(std::_Rb_tree_const_iterator<std::pair<int, int> >&&)'
/usr/include/c++/9/bits/stl_tree.h:326:12: note: conversion of argument 1 would be ill-formed: