X.cpp: In function ‘int Gap(SegTree*, long long int, long long int, int, int)’:
X.cpp:47:54: error: no matching function for call to ‘min(long long int&, int&)’
if(nd->c1 && s <= m)r += Gap(nd->c1,b,m,s,min(m,l));
^
X.cpp:47:54: note: candidates are:
In file included from /usr/include/c++/4.9/algorithm:61:0,
from X.cpp:2:
/usr/include/c++/4.9/bits/stl_algobase.h:194:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
min(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/4.9/bits/stl_algobase.h:194:5: note: template argument deduction/substitution failed:
X.cpp:47:54: note: deduced conflicting types for parameter ‘const _Tp’ (‘long long int’ and ‘int’)
if(nd->c1 && s <= m)r += Gap(nd->c1,b,m,s,min(m,l));
^
In file included from /usr/include/c++/4.9/algorithm:61:0,
from X.cpp:2:
/usr/include/c++/4.9/bits/stl_algobase.h:240:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
/usr/include/c++/4.9/bits/stl_algobase.h:240:5: note: template argument deduction/substitution failed:
X.cpp:47:54: note: deduced conflicting types for parameter ‘const _Tp’ (‘long long int’ and ‘int’)
if(nd->c1 && s <= m)r += Gap(nd->c1,b,m,s,min(m,l));
^
X.cpp:48:55: error: no matching function for call to ‘max(long long int, int&)’
if(nd->c2 && l > m)r += Gap(nd->c2,m+1,e,max(m+1,s),l);
^
X.cpp:48:55: note: candidates are:
In file included from /usr/include/c++/4.9/algorithm:61:0,
from X.cpp:2:
/usr/include/c++/4.9/bits/stl_algobase.h:217:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/4.9/bits/stl_algobase.h:217:5: note: template argument deduction/substitution failed:
X.cpp:48:55: note: deduced conflicting types for parameter ‘const _Tp’ (‘long long int’ and ‘int’)
if(nd->c2 && l > m)r += Gap(nd->c2,m+1,e,max(m+1,s),l);
^
In file included from /usr/include/c++/4.9/algorithm:61:0,
from X.cpp:2:
/usr/include/c++/4.9/bits/stl_algobase.h:261:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
/usr/include/c++/4.9/bits/stl_algobase.h:261:5: note: template argument deduction/substitution failed:
X.cpp:48:55: note: deduced conflicting types for parameter ‘const _Tp’ (‘long long int’ and ‘int’)
if(nd->c2 && l > m)r += Gap(nd->c2,m+1,e,max(m+1,s),l);
^
X.cpp: In function ‘int main()’:
X.cpp:123:9: warning: unused variable ‘i’ [-Wunused-variable]
int i, p, r;
^
X.cpp:128:28: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld%lld",&L,&Q);
^
X.cpp:131:37: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld%d%lld",&t,&p,&a);
^
X.cpp:134:27: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&b);
^