library.cpp: In function 'int willQuery(std::vector<int>)':
library.cpp:81:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<x.size();i++){
~^~~~~~~~~
library.cpp:87:16: error: cannot convert 'std::bitset<1010>' to 'int' in return
return a;
^
In file included from /usr/include/c++/7/string:48:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from library.cpp:1:
/usr/include/c++/7/bits/stl_function.h: In instantiation of 'constexpr bool std::less<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = std::bitset<1010>]':
/usr/include/c++/7/bits/stl_map.h:491:32: required from 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::bitset<1010>; _Tp = int; _Compare = std::less<std::bitset<1010> >; _Alloc = std::allocator<std::pair<const std::bitset<1010>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::bitset<1010>]'
library.cpp:86:12: required from here
/usr/include/c++/7/bits/stl_function.h:386:20: error: no match for 'operator<' (operand types are 'const std::bitset<1010>' and 'const std::bitset<1010>')
{ return __x < __y; }
~~~~^~~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:64:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from library.cpp:1:
/usr/include/c++/7/bits/stl_pair.h:449:5: note: candidate: template<class _T1, class _T2> constexpr bool std::operator<(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
^~~~~~~~
/usr/include/c++/7/bits/stl_pair.h:449:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/7/string:48:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from library.cpp:1:
/usr/include/c++/7/bits/stl_function.h:386:20: note: 'const std::bitset<1010>' is not derived from 'const std::pair<_T1, _T2>'
{ return __x < __y; }
~~~~^~~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from library.cpp:1:
/usr/include/c++/7/bits/stl_iterator.h:305:5: note: candidate: template<class _Iterator> bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
operator<(const reverse_iterator<_Iterator>& __x,
^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:305:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/7/string:48:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from library.cpp:1:
/usr/include/c++/7/bits/stl_function.h:386:20: note: 'const std::bitset<1010>' is not derived from 'const std::reverse_iterator<_Iterator>'
{ return __x < __y; }
~~~~^~~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from library.cpp:1:
/usr/include/c++/7/bits/stl_iterator.h:343:5: note: candidate: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
operator<(const reverse_iterator<_IteratorL>& __x,
^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:343:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/7/string:48:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from library.cpp:1:
/usr/include/c++/7/bits/stl_function.h:386:20: note: 'const std::bitset<1010>' is not derived from 'const std::reverse_iterator<_Iterator>'
{ return __x < __y; }
~~~~^~~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from library.cpp:1:
/usr/include/c++/7/bits/stl_iterator.h:1142:5: note: candidate: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)
operator<(const move_iterator<_IteratorL>& __x,
^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:1142:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/7/string:48:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from library.cpp:1:
/usr/include/c++/7/bits/stl_function.h:386:20: note: 'const std::bitset<1010>' is not derived from 'const std::move_iterator<_IteratorL>'
{ return __x < __y; }
~~~~^~~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from library.cpp:1:
/usr/include/c++/7/bits/stl_iterator.h:1148:5: note: candidate: template<class _Iterator> bool std::operator<(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)
operator<(const move_iterator<_Iterator>& __x,
^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:1148:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/7/string:48:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from library.cpp:1:
/usr/include/c++/7/bits/stl_function.h:386:20: note: 'const std::bitset<1010>' is not derived from 'const std::move_iterator<_IteratorL>'
{ return __x < __y; }
~~~~^~~~~
In file included from /usr/include/c++/7/string:52:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from library.cpp:1:
/usr/include/c++/7/bits/basic_string.h:6082:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:6082:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/7/string:48:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from library.cpp:1:
/usr/include/c++/7/bits/stl_function.h:386:20: note: 'const std::bitset<1010>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
{ return __x < __y; }
~~~~^~~~~
In file included from /usr/include/c++/7/string:52:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from library.cpp:1:
/usr/include/c++/7/bits/basic_string.h:6095:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:6095:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/7/string:48:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from library.cpp:1:
/usr/include/c++/7/bits/stl_function.h:386:20: note: 'const std::bitset<1010>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
{ return __x < __y; }
~~~~^~~~~
In file included from /usr/include/c++/7/string:52:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from library.cpp:1:
/usr/include/c++/7/bits/basic_string.h:6107:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
operator<(const _CharT* __lhs,
^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:6107:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/7/string:48:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from library.cpp:1:
/usr/include/c++/7/bits/stl_function.h:386:20: note: mismatched types 'const _CharT*' and 'std::bitset<1010>'
{ return __x < __y; }
~~~~^~~~~
In file included from /usr/include/c++/7/bits/ios_base.h:46:0,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from library.cpp:1:
/usr/include/c++/7/system_error:208:3: note: candidate: bool std::operator<(const std::error_code&, const std::error_code&)
operator<(const error_code& __lhs, const error_code& __rhs) noexcept
^~~~~~~~
/usr/include/c++/7/system_error:208:3: note: no known conversion for argument 1 from 'const std::bitset<1010>' to 'const std::error_code&'
/usr/include/c++/7/system_error:282:3: note: candidate: bool std::operator<(const std::error_condition&, const std::error_condition&)
operator<(const error_condition& __lhs,
^~~~~~~~
/usr/include/c++/7/system_error:282:3: note: no known conversion for argument 1 from 'const std::bitset<1010>' to 'const std::error_condition&'
In file included from /usr/include/c++/7/vector:64:0,
from library.h:1,
from library.cpp:2:
/usr/include/c++/7/bits/stl_vector.h:1613:5: note: candidate: template<class _Tp, class _Alloc> bool std::operator<(const std::vector<_Tp, _Alloc>&, const std::vector<_Tp, _Alloc>&)
operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
^~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:1613:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/7/string:48:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from library.cpp:1:
/usr/include/c++/7/bits/stl_function.h:386:20: note: 'const std::bitset<1010>' is not derived from 'const std::vector<_Tp, _Alloc>'
{ return __x < __y; }
~~~~^~~~~
In file included from /usr/include/c++/7/deque:64:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:68,
from library.cpp:4:
/usr/include/c++/7/bits/stl_deque.h:293:5: note: candidate: template<class _Tp, class _Ref, class _Ptr> bool std::operator<(const std::_Deque_iterator<_Tp, _Ref, _Ptr>&, const std::_Deque_iterator<_Tp, _Ref, _Ptr>&)
operator<(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
^~~~~~~~
/usr/include/c++/7/bits/stl_deque.h:293:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/7/string:48:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from library.cpp:1:
/usr/include/c++/7/bits/stl_function.h:386:20: note: 'const std::bitset<1010>' is not derived from 'const std::_Deque_iterator<_Tp, _Ref, _Ptr>'
{ return __x < __y; }
~~~~^~~~~
In file included from /usr/include/c++/7/deque:64:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:68,
from library.cpp:4:
/usr/include/c++/7/bits/stl_deque.h:301:5: note: candidate: template<class _Tp, class _RefL, class _PtrL, class _RefR, class _PtrR> bool std::operator<(const std::_Deque_iterator<_Tp, _Ref, _Ptr>&, const std::_Deque_iterator<_Tp, _RefR, _PtrR>&)
operator<(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
^~~~~~~~
/usr/include/c++/7/bits/stl_deque.h:301:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/7/string:48:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from library.cpp:1:
/usr/include/c++/7/bits/stl_function.h:386:20: note: 'const std::bitset<1010>' is not derived from 'const std::_Deque_iterator<_Tp, _Ref, _Ptr>'
{ return __x < __y; }
~~~~^~~~~
In file included from /usr/include/c++/7/deque:64:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:68,
from library.cpp:4:
/usr/include/c++/7/bits/stl_deque.h:2276:5: note: candidate: template<class _Tp, class _Alloc> bool std::operator<(const std::deque<_Tp, _Alloc>&, const std::deque<_Tp, _Alloc>&)
operator<(const deque<_Tp, _Alloc>& __x,
^~~~~~~~
/usr/include/c++/7/bits/stl_deque.h:2276:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/7/string:48:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from library.cpp:1:
/usr/include/c++/7/bits/stl_function.h:386:20: note: 'const std::bitset<1010>' is not derived from 'const std::deque<_Tp, _Alloc>'
{ return __x < __y; }
~~~~^~~~~
In file included from /usr/include/c++/7/tuple:39:0,
from /usr/include/c++/7/functional:54,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:71,
from library.cpp:4:
/usr/include/c++/7/array:262:5: note: candidate: template<class _Tp, long unsigned int _Nm> bool std::operator<(const std::array<_Tp, _Nm>&, const std::array<_Tp, _Nm>&)
operator<(const array<_Tp, _Nm>& __a, const array<_Tp, _Nm>& __b)
^~~~~~~~
/usr/include/c++/7/array:262:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/7/string:48:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from library.cpp:1:
/usr/include/c++/7/bits/stl_function.h:386:20: note: 'const std::bitset<1010>' is not derived from 'const std::array<_Tp, _Nm>'
{ return __x < __y; }
~~~~^~~~~
In file included from /usr/include/c++/7/functional:54:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:71,
from library.cpp:4:
/usr/include/c++/7/tuple:1410:5: note: candidate: template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const std::tuple<_Tps ...>&, const std::tuple<_Elements ...>&)
operator<(const tuple<_TElements...>& __t,
^~~~~~~~
/usr/include/c++/7/tuple:1410:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/7/string:48:0,
from /usr/include/c++/7/bits/locale_cl