pinball.cpp: In function 'void Set(int&, int, int, int, long long int)':
pinball.cpp:15:15: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int mid=ss+se>>1;
~~^~~
pinball.cpp: In function 'long long int Get(int, int, int, int, int)':
pinball.cpp:23:15: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int mid=ss+se>>1;
~~^~~
pinball.cpp: In function 'int main()':
pinball.cpp:39:41: error: no matching function for call to 'min(std::map<int, long long int>::mapped_type&, int&)'
dp1[c[i]]=min(dp1[c[i]],d[i]);
^
In file included from /usr/include/c++/7/bits/stl_tree.h:63:0,
from /usr/include/c++/7/map:60,
from pinball.cpp:2:
/usr/include/c++/7/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
min(const _Tp& __a, const _Tp& __b)
^~~
/usr/include/c++/7/bits/stl_algobase.h:195:5: note: template argument deduction/substitution failed:
pinball.cpp:39:41: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
dp1[c[i]]=min(dp1[c[i]],d[i]);
^
In file included from /usr/include/c++/7/bits/stl_tree.h:63:0,
from /usr/include/c++/7/map:60,
from pinball.cpp:2:
/usr/include/c++/7/bits/stl_algobase.h:243:5: note: candidate: 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++/7/bits/stl_algobase.h:243:5: note: template argument deduction/substitution failed:
pinball.cpp:39:41: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
dp1[c[i]]=min(dp1[c[i]],d[i]);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from pinball.cpp:3:
/usr/include/c++/7/bits/stl_algo.h:3450:5: note: candidate: template<class _Tp> _Tp std::min(std::initializer_list<_Tp>)
min(initializer_list<_Tp> __l)
^~~
/usr/include/c++/7/bits/stl_algo.h:3450:5: note: template argument deduction/substitution failed:
pinball.cpp:39:41: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
dp1[c[i]]=min(dp1[c[i]],d[i]);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from pinball.cpp:3:
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: candidate: template<class _Tp, class _Compare> _Tp std::min(std::initializer_list<_Tp>, _Compare)
min(initializer_list<_Tp> __l, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: template argument deduction/substitution failed:
pinball.cpp:39:41: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
dp1[c[i]]=min(dp1[c[i]],d[i]);
^
pinball.cpp:40:37: error: 's' was not declared in this scope
Set(root,1,m,c[i],d[i]);s
^
pinball.cpp:53:41: error: no matching function for call to 'min(std::map<int, long long int>::mapped_type&, int&)'
dp2[c[i]]=min(dp2[c[i]],d[i]);
^
In file included from /usr/include/c++/7/bits/stl_tree.h:63:0,
from /usr/include/c++/7/map:60,
from pinball.cpp:2:
/usr/include/c++/7/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
min(const _Tp& __a, const _Tp& __b)
^~~
/usr/include/c++/7/bits/stl_algobase.h:195:5: note: template argument deduction/substitution failed:
pinball.cpp:53:41: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
dp2[c[i]]=min(dp2[c[i]],d[i]);
^
In file included from /usr/include/c++/7/bits/stl_tree.h:63:0,
from /usr/include/c++/7/map:60,
from pinball.cpp:2:
/usr/include/c++/7/bits/stl_algobase.h:243:5: note: candidate: 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++/7/bits/stl_algobase.h:243:5: note: template argument deduction/substitution failed:
pinball.cpp:53:41: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
dp2[c[i]]=min(dp2[c[i]],d[i]);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from pinball.cpp:3:
/usr/include/c++/7/bits/stl_algo.h:3450:5: note: candidate: template<class _Tp> _Tp std::min(std::initializer_list<_Tp>)
min(initializer_list<_Tp> __l)
^~~
/usr/include/c++/7/bits/stl_algo.h:3450:5: note: template argument deduction/substitution failed:
pinball.cpp:53:41: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
dp2[c[i]]=min(dp2[c[i]],d[i]);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from pinball.cpp:3:
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: candidate: template<class _Tp, class _Compare> _Tp std::min(std::initializer_list<_Tp>, _Compare)
min(initializer_list<_Tp> __l, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: template argument deduction/substitution failed:
pinball.cpp:53:41: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
dp2[c[i]]=min(dp2[c[i]],d[i]);
^
pinball.cpp:33:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%i %i",&n,&m);
~~~~~^~~~~~~~~~~~~~~
pinball.cpp:34:91: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(i=1;i<=n;i++) scanf("%i %i %i %i",&a[i],&b[i],&c[i],&d[i]),dp1[c[i]]=dp2[c[i]]=inf,d1[i]=d2[i]=inf;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~