pyramid_base.cpp: In function 'void add(int, int, int, int, int, int)':
pyramid_base.cpp:27:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
add(p<<1, s, s+e>>1, l, r, v);
~^~
pyramid_base.cpp:28:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
add(p<<1|1, (s+e>>1)+1, e, l, r, v);
~^~
pyramid_base.cpp: In function 'bool check(int)':
pyramid_base.cpp:43:34: error: no matching function for call to 'min(int, obstacle&)'
if(1 <= min(K1[i].x-t, K2[j+1]) && K2[j].x+1 <= min(K1[i].x-t, K2[j+1].x) && K2[j].x <= n-t) f |= (T[1] + L[1] == 0);
^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from pyramid_base.cpp:1:
/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:
pyramid_base.cpp:43:34: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'obstacle')
if(1 <= min(K1[i].x-t, K2[j+1]) && K2[j].x+1 <= min(K1[i].x-t, K2[j+1].x) && K2[j].x <= n-t) f |= (T[1] + L[1] == 0);
^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from pyramid_base.cpp:1:
/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:
pyramid_base.cpp:43:34: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'obstacle')
if(1 <= min(K1[i].x-t, K2[j+1]) && K2[j].x+1 <= min(K1[i].x-t, K2[j+1].x) && K2[j].x <= n-t) f |= (T[1] + L[1] == 0);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from pyramid_base.cpp:1:
/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:
pyramid_base.cpp:43:34: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
if(1 <= min(K1[i].x-t, K2[j+1]) && K2[j].x+1 <= min(K1[i].x-t, K2[j+1].x) && K2[j].x <= n-t) f |= (T[1] + L[1] == 0);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from pyramid_base.cpp:1:
/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:
pyramid_base.cpp:43:34: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
if(1 <= min(K1[i].x-t, K2[j+1]) && K2[j].x+1 <= min(K1[i].x-t, K2[j+1].x) && K2[j].x <= n-t) f |= (T[1] + L[1] == 0);
^
pyramid_base.cpp:55:33: error: no matching function for call to 'min(int, obstacle&)'
if(1 <= min(K1[i].x-t, K2[j+1]) && K2[j].x+1 <= min(K1[i].x-t, K2[j+1].x) && K2[j].x <= n-t) f |= (T[1] + L[1] == 0);
^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from pyramid_base.cpp:1:
/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:
pyramid_base.cpp:55:33: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'obstacle')
if(1 <= min(K1[i].x-t, K2[j+1]) && K2[j].x+1 <= min(K1[i].x-t, K2[j+1].x) && K2[j].x <= n-t) f |= (T[1] + L[1] == 0);
^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from pyramid_base.cpp:1:
/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:
pyramid_base.cpp:55:33: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'obstacle')
if(1 <= min(K1[i].x-t, K2[j+1]) && K2[j].x+1 <= min(K1[i].x-t, K2[j+1].x) && K2[j].x <= n-t) f |= (T[1] + L[1] == 0);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from pyramid_base.cpp:1:
/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:
pyramid_base.cpp:55:33: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
if(1 <= min(K1[i].x-t, K2[j+1]) && K2[j].x+1 <= min(K1[i].x-t, K2[j+1].x) && K2[j].x <= n-t) f |= (T[1] + L[1] == 0);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from pyramid_base.cpp:1:
/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:
pyramid_base.cpp:55:33: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
if(1 <= min(K1[i].x-t, K2[j+1]) && K2[j].x+1 <= min(K1[i].x-t, K2[j+1].x) && K2[j].x <= n-t) f |= (T[1] + L[1] == 0);
^
pyramid_base.cpp:35:12: warning: unused variable 'p' [-Wunused-variable]
int i, j, p, l, r;
^
pyramid_base.cpp: In function 'int main()':
pyramid_base.cpp:84:13: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
if(check(s+e>>1)) s = (s+e>>1) + 1;
~^~
pyramid_base.cpp:84:27: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
if(check(s+e>>1)) s = (s+e>>1) + 1;
~^~
pyramid_base.cpp:85:14: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
else e = (s+e>>1) - 1;
~^~
pyramid_base.cpp:68:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d%d", &n, &m, &c, &k);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pyramid_base.cpp:73:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d%d%d", &x1, &y1, &x2, &y2, &z);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~