Submission #213290

#TimeUsernameProblemLanguageResultExecution timeMemory
213290brcodeLibrary (JOI18_library)C++14
Compilation error
0 ms0 KiB
#include <iostream> #include "library.h" #include <bits/stdc++.h> using namespace std; const int MAXN = 1010; deque<int> l; vector<int> g[MAXN]; deque<int> r; vector<int> ord; int cnt; vector<int> rem; vector<int> templ; vector<int> tempr; deque<int> curr; vector<int> tempq; int deg[MAXN]; map<bitset<1010>,int> m1; /*int willQuery(vector<int> x){ for(int y:x){ cout<<y<<" "; } cnt++; cout<<endl; if(cnt == 1){ cout<<2<<endl; return 2; } if(cnt == 2){ cout<<1<<endl; return 1; } if(cnt==3){ cout<<2<<endl; return 2; } if(cnt==4){ cout<<3<<endl; return 3; } if(cnt==5){ cout<<2<<endl; return 2; } if(cnt == 6){ cout<<2<<endl; return 0; } if(cnt==7){ cout<<1<<endl; return 0; } if(cnt ==8){ cout<<1<<endl; return 0; } if(cnt==9){ cout<<1<<endl; return 1; } if(cnt==10){ cout<<2<<endl; return 2; } if(cnt == 11){ cout<<1<<endl; return 0; } return 1; } void Answer(vector<int> x){ for(int y:x){ cout<<y<<" "; } cout<<endl; }*/ int willQuery(vector<int> x){ bitset<1010> a; for(int i=0;i<x.size();i++){ if(x[i]){ a.set(x[i]); } } if(m1[a]){ return a; }else{ return m1[a] = Query(x); } } void towillQuery(int x,deque<int> v1,int sz){ int n = v1.size(); for(int i=0;i<sz;i++){ tempq[i] = 0; //cout<<sz<<endl; } if(n==1){ g[x].push_back(v1[0]); g[v1[0]].push_back(x); deg[x]++; deg[v1[0]]++; if(deg[v1[0]] == 2){ //cout<<x<<" "<<v1[0]<<endl; rem.push_back(v1[0]); } return; } bool check = false; deque<int> d1; for(int i=0;i<(n/2);i++){ tempq[v1[i]-1] = 1; tempq[x-1] = 0; d1.push_back(v1[i]); } int A; if(d1.size()>1){ A= willQuery(tempq); }else{ A=1; } tempq[x-1] = 1; int nxt = willQuery(tempq); if(nxt<=A){ towillQuery(x,d1,sz); }else{ check = true; } d1.clear(); for(int i=0;i<(n/2);i++){ tempq[v1[i]-1] = 0; } for(int i=(n/2);i<(n);i++){ tempq[v1[i]-1] = 1; // cout<<v1[i-1]<<" "; tempq[x-1] = 0; d1.push_back(v1[i]); } int B; if(d1.size() == 0){ return; } if(d1.size() == 1){ tempq[x-1] = 1; if(willQuery(tempq)==1){ towillQuery(x,d1,sz); } return; } if(check && deg[x]==0){ towillQuery(x,d1,sz); return; } B= willQuery(tempq); tempq[x-1] = 1; nxt = willQuery(tempq); if(nxt<=B){ towillQuery(x,d1,sz); } } void dfs(int curr,int par){ ord.push_back(curr); for(int x:g[curr]){ if(x!=par){ dfs(x,curr); } } } void clearQ(int n){ for(int i=0;i<n;i++){ tempq[i] = 0; } } void Solve(int N){ int n = N; if(n==1){ vector<int> res; res.push_back(1); Answer(res); return; } for(int i=1;i<=n;i++){ //tempq = vector we use for Querying tempq.push_back(0); } for(int i=1;i<=(N/2);i++){ l.push_back(i); //l subarray } for(int i=(N/2)+1;i<=N;i++){ r.push_back(i); //r subarray } for(int i=1;i<=n;i++){ if(i<=(n/2)){ if(l.size() && l.front() == i){ l.pop_front(); } }else{ if(r.size() && r.front() == i){ r.pop_front(); } } clearQ(n); if(l.size()){ if(l.size()==1){ tempq[l[0]-1] = 1; tempq[i-1] = 1; if(willQuery(tempq) == 1){ towillQuery(i,l,n); } }else{ for(int x:l){ tempq[x-1] = 1; } int A = willQuery(tempq); tempq[i-1] = 1; int nxt = willQuery(tempq); if(nxt<=A){ towillQuery(i,l,n); } } } clearQ(n); for(int x:rem){ //cout<<123<<endl; if(x<=(N/2)){ for(int y:l){ if(y==x){ continue; }else{ templ.push_back(y); } } l.clear(); for(int y:templ){ l.push_back(y); } templ.clear(); }else{ for(int y:r){ if(y==x){ continue; }else{ tempr.push_back(y); } } r.clear(); for(int y:tempr){ r.push_back(y); } tempr.clear(); } } rem.clear(); clearQ(n); if(r.size()){ if(r.size() == 1){ tempq[r[0]-1] = 1; tempq[i-1] = 1; if(willQuery(tempq) == 1){ towillQuery(i,r,n); } }else{ for(int x:r){ tempq[x-1] = 1; } int A = willQuery(tempq); tempq[i-1] = 1; int nxt = willQuery(tempq); if(nxt<=A){ towillQuery(i,r,n); } } } clearQ(n); for(int x:rem){ if(x<=(N/2)){ for(int y:l){ if(y==x){ continue; }else{ templ.push_back(y); } } l.clear(); for(int y:templ){ l.push_back(y); } templ.clear(); }else{ for(int y:r){ if(y==x){ continue; }else{ tempr.push_back(y); } } r.clear(); for(int y:tempr){ r.push_back(y); } tempr.clear(); } } rem.clear(); } for(int i=1;i<=n;i++){ if(deg[i] == 1){ dfs(i,i); break; } } Answer(ord); } /*int main(){ Solve(5); }*/

Compilation message (stderr)

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