제출 #291159

#제출 시각아이디문제언어결과실행 시간메모리
291159thebesRectangles (IOI19_rect)C++14
컴파일 에러
0 ms0 KiB
#include "rect.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int,int> pii; #define F first #define S second const int MN = 2505, MM = 13e6; int N, M, C, i, j, x, y, h[MM], hp[MM], cnt, pre[MN], ds[MN], nxt[MN]; ll ans; pii bnd[MM]; vi vec[MN], adj[MM], hid[MN]; map<pii,int> id; queue<pii> q[MN]; vector<pii> evt[MN]; unordered_map<pii,int> hist, tmp; inline void add(int l,int r,int pid,int x,bool col){ if(l!=-1&&r!=-1&&!id.count({l,r})){ if(col){ id[{l,r}]=1; evt[r-1].push_back({x,l+1}); } else{ id[{l,r}]=++cnt; bnd[cnt] = {l+1,r-1}; h[cnt] = x; if(pid!=-1){ adj[cnt].push_back(pid); hp[pid] = 1; } } q[r-l].push({l,r}); } else if(l!=-1&&r!=-1&&!col){ if(pid!=-1){ adj[id[{l,r}]].push_back(pid); hp[pid] = 1; } } } inline void process(vi vec,int x,bool col){ C = (int)vec.size(); map<int,int> mp; for(int i=C-1;i>=0;i--){ auto it=mp.upper_bound(vec[i]); if(it==mp.end()) nxt[i]=-1; else nxt[i]=it->S; while(mp.size()&&mp.begin()->F<=vec[i]) mp.erase(mp.begin()); mp[vec[i]]=i; } mp.clear(); for(int i=0;i<C;i++){ auto it=mp.upper_bound(vec[i]); if(it==mp.end()) pre[i]=-1; else pre[i]=it->S; while(mp.size()&&mp.begin()->F<=vec[i]) mp.erase(mp.begin()); mp[vec[i]]=i; } id.clear(); queue<pii> hm; vector<pii> tmp; for(int i=1;i<C-1;i++){ int l = pre[i], r = nxt[i]; if(l!=-1&&r!=-1) tmp.push_back({l,r}); } sort(tmp.begin(),tmp.end(),[](pii i,pii j){return i.S-i.F<j.S-j.F;}); for(auto v : tmp) hm.push(v); tmp.clear(); for(int i=0;i<=C;i++){ while(hm.size()&&hm.front().S-hm.front().F==i){ add(hm.front().F,hm.front().S,-1,x,col); hm.pop(); } while(q[i].size()){ pii cur = q[i].front(); q[i].pop(); int l, r; if(vec[cur.F]==vec[cur.S]) l = pre[cur.F], r = nxt[cur.S]; else if(vec[cur.F]<vec[cur.S]) l = pre[cur.F], r = cur.S; else l = cur.F, r = nxt[cur.S]; add(l,r,id[cur],x,col); } } } inline void mrg(int x,int y){ if(x^y){ vi res; for(int i=0,j=0;i<(int)vec[x].size();i++){ while(j+1<(int)vec[y].size()&&vec[y][j]<vec[x][i]) j++; if(j<vec[y].size()&&vec[x][i]==vec[y][j]) res.push_back(vec[x][i]); } vec[x].clear(); vec[y]=res; } } int fnd(int x){return ds[x]=ds[x]==x?x:fnd(ds[x]);} void dfs(int n){ for(auto v : adj[n]) dfs(v); for(auto v : adj[n]) mrg(bnd[v].S, bnd[n].S); int it = fnd(bnd[n].F); while(it<M&&it<=bnd[n].S){ mrg(it,bnd[n].S); ds[fnd(it)]=fnd(it+1); it = fnd(it); } int p = upper_bound(vec[bnd[n].S].begin(),vec[bnd[n].S].end(),h[n])-vec[bnd[n].S].begin(); ans += vec[bnd[n].S].size()-p; } long long count_rectangles(vector<vector<int>> a){ vi col; N = a.size(), M = a[0].size(); for(i=0;i<M;i++){ col.clear(); for(j=0;j<N;j++) col.push_back(a[j][i]); process(col,i,1); } for(i=0;i<N;i++) process(a[i],i,0); for(i=1;i<=cnt;i++){ hid[h[i]].push_back(i); } for(i=0;i<N;i++){ for(j=0;j<M;j++) vec[j].clear(), ds[j]=j; for(auto v : evt[i]) vec[v.F].push_back(v.S); for(j=0;j<M;j++) sort(vec[j].begin(),vec[j].end()); tmp.clear(); for(auto v : hid[i]){ h[v] = hist[bnd[v]]+1; tmp[bnd[v]] = h[v]; h[v] = i-h[v]; } for(auto v : hid[i]){ if(hp[v]) continue; dfs(v); } hist.clear(); swap(hist, tmp); } return ans; }

컴파일 시 표준 에러 (stderr) 메시지

rect.cpp:15:45: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<int, int>; _Tp = int; _Hash = std::hash<std::pair<int, int> >; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >]'
   15 | vector<pii> evt[MN]; unordered_map<pii,int> hist, tmp;
      |                                             ^~~~
In file included from /usr/include/c++/9/unordered_map:47,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:117,
                 from rect.cpp:2:
/usr/include/c++/9/bits/unordered_map.h:141:7: note: 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<int, int>; _Tp = int; _Hash = std::hash<std::pair<int, int> >; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >]' is implicitly deleted because the default definition would be ill-formed:
  141 |       unordered_map() = default;
      |       ^~~~~~~~~~~~~
/usr/include/c++/9/bits/unordered_map.h:141:7: error: use of deleted function 'std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::_Hashtable() [with _Key = std::pair<int, int>; _Value = std::pair<const std::pair<int, int>, int>; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<std::pair<int, int> >; _H1 = std::hash<std::pair<int, int> >; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; _Traits = std::__detail::_Hashtable_traits<true, false, true>]'
In file included from /usr/include/c++/9/unordered_map:46,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:117,
                 from rect.cpp:2:
/usr/include/c++/9/bits/hashtable.h:414:7: note: 'std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::_Hashtable() [with _Key = std::pair<int, int>; _Value = std::pair<const std::pair<int, int>, int>; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<std::pair<int, int> >; _H1 = std::hash<std::pair<int, int> >; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; _Traits = std::__detail::_Hashtable_traits<true, false, true>]' is implicitly deleted because the default definition would be ill-formed:
  414 |       _Hashtable() = default;
      |       ^~~~~~~~~~
/usr/include/c++/9/bits/hashtable.h:414:7: error: use of deleted function 'std::__detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, _H1, _H2, _Hash, _Traits>::_Hashtable_base() [with _Key = std::pair<int, int>; _Value = std::pair<const std::pair<int, int>, int>; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<std::pair<int, int> >; _H1 = std::hash<std::pair<int, int> >; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _Traits = std::__detail::_Hashtable_traits<true, false, true>]'
In file included from /usr/include/c++/9/bits/hashtable.h:35,
                 from /usr/include/c++/9/unordered_map:46,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:117,
                 from rect.cpp:2:
/usr/include/c++/9/bits/hashtable_policy.h:1822:5: note: 'std::__detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, _H1, _H2, _Hash, _Traits>::_Hashtable_base() [with _Key = std::pair<int, int>; _Value = std::pair<const std::pair<int, int>, int>; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<std::pair<int, int> >; _H1 = std::hash<std::pair<int, int> >; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _Traits = std::__detail::_Hashtable_traits<true, false, true>]' is implicitly deleted because the default definition would be ill-formed:
 1822 |     _Hashtable_base() = default;
      |     ^~~~~~~~~~~~~~~
/usr/include/c++/9/bits/hashtable_policy.h:1822:5: error: use of deleted function 'std::__detail::_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, std::__detail::_Default_ranged_hash, true>::_Hash_code_base() [with _Key = std::pair<int, int>; _Value = std::pair<const std::pair<int, int>, int>; _ExtractKey = std::__detail::_Select1st; _H1 = std::hash<std::pair<int, int> >; _H2 = std::__detail::_Mod_range_hashing]'
/usr/include/c++/9/bits/hashtable_policy.h:1373:7: note: 'std::__detail::_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, std::__detail::_Default_ranged_hash, true>::_Hash_code_base() [with _Key = std::pair<int, int>; _Value = std::pair<const std::pair<int, int>, int>; _ExtractKey = std::__detail::_Select1st; _H1 = std::hash<std::pair<int, int> >; _H2 = std::__detail::_Mod_range_hashing]' is implicitly deleted because the default definition would be ill-formed:
 1373 |       _Hash_code_base() = default;
      |       ^~~~~~~~~~~~~~~
/usr/include/c++/9/bits/hashtable_policy.h:1373:7: error: use of deleted function 'std::__detail::_Hashtable_ebo_helper<_Nm, _Tp, true>::_Hashtable_ebo_helper() [with int _Nm = 1; _Tp = std::hash<std::pair<int, int> >]'
/usr/include/c++/9/bits/hashtable_policy.h:1096:7: note: 'std::__detail::_Hashtable_ebo_helper<_Nm, _Tp, true>::_Hashtable_ebo_helper() [with int _Nm = 1; _Tp = std::hash<std::pair<int, int> >]' is implicitly deleted because the default definition would be ill-formed:
 1096 |       _Hashtable_ebo_helper() = default;
      |       ^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/hashtable_policy.h:1096:7: error: use of deleted function 'std::hash<std::pair<int, int> >::hash()'
In file included from /usr/include/c++/9/bits/stl_bvector.h:61,
                 from /usr/include/c++/9/vector:68,
                 from rect.h:5,
                 from rect.cpp:1:
/usr/include/c++/9/bits/functional_hash.h:101:12: note: 'std::hash<std::pair<int, int> >::hash()' is implicitly deleted because the default definition would be ill-formed:
  101 |     struct hash : __hash_enum<_Tp>
      |            ^~~~
/usr/include/c++/9/bits/functional_hash.h:101:12: error: no matching function for call to 'std::__hash_enum<std::pair<int, int>, false>::__hash_enum()'
/usr/include/c++/9/bits/functional_hash.h:82:7: note: candidate: 'std::__hash_enum<_Tp, <anonymous> >::__hash_enum(std::__hash_enum<_Tp, <anonymous> >&&) [with _Tp = std::pair<int, int>; bool <anonymous> = false]'
   82 |       __hash_enum(__hash_enum&&);
      |       ^~~~~~~~~~~
/usr/include/c++/9/bits/functional_hash.h:82:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/9/bits/functional_hash.h:101:12: error: 'std::__hash_enum<_Tp, <anonymous> >::~__hash_enum() [with _Tp = std::pair<int, int>; bool <anonymous> = false]' is private within this context
  101 |     struct hash : __hash_enum<_Tp>
      |            ^~~~
/usr/include/c++/9/bits/functional_hash.h:83:7: note: declared private here
   83 |       ~__hash_enum();
      |       ^
In file included from /usr/include/c++/9/bits/hashtable.h:35,
                 from /usr/include/c++/9/unordered_map:46,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:117,
                 from rect.cpp:2:
/usr/include/c++/9/bits/hashtable_policy.h:1096:7: error: use of deleted function 'std::hash<std::pair<int, int> >::~hash()'
 1096 |       _Hashtable_ebo_helper() = default;
      |       ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/9/bits/stl_bvector.h:61,
                 from /usr/include/c++/9/vector:68,
                 from rect.h:5,
                 from rect.cpp:1:
/usr/include/c++/9/bits/functional_hash.h:101:12: note: 'std::hash<std::pair<int, int> >::~hash()' is implicitly deleted because the default definition would be ill-formed:
  101 |     struct hash : __hash_enum<_Tp>
      |            ^~~~
/usr/include/c++/9/bits/functional_hash.h:101:12: error: 'std::__hash_enum<_Tp, <anonymous> >::~__hash_enum() [with _Tp = std::pair<int, int>; bool <anonymous> = false]' is private within this context
/usr/include/c++/9/bits/functional_hash.h:83:7: note: declared private here
   83 |       ~__hash_enum();
      |       ^
In file included from /usr/include/c++/9/bits/hashtable.h:35,
                 from /usr/include/c++/9/unordered_map:46,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:117,
                 from rect.cpp:2:
/usr/include/c++/9/bits/hashtable_policy.h:1373:7: error: use of deleted function 'std::__detail::_Hashtable_ebo_helper<1, std::hash<std::pair<int, int> >, true>::~_Hashtable_ebo_helper()'
 1373 |       _Hash_code_base() = default;
      |       ^~~~~~~~~~~~~~~
/usr/include/c++/9/bits/hashtable_policy.h:1093:12: note: 'std::__detail::_Hashtable_ebo_helper<1, std::hash<std::pair<int, int> >, true>::~_Hashtable_ebo_helper()' is implicitly deleted because the default definition would be ill-formed:
 1093 |     struct _Hashtable_ebo_helper<_Nm, _Tp, true>
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/hashtable_policy.h:1093:12: error: use of deleted function 'std::hash<std::pair<int, int> >::~hash()'
/usr/include/c++/9/bits/hashtable_policy.h:1822:5: error: use of deleted function 'std::__detail::_Hash_code_base<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::__detail::_Select1st, std::hash<std::pair<int, int> >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, true>::~_Hash_code_base()'
 1822 |     _Hashtable_base() = default;
      |     ^~~~~~~~~~~~~~~
/usr/include/c++/9/bits/hashtable_policy.h:1346:12: note: 'std::__detail::_Hash_code_base<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::__detail::_Select1st, std::hash<std::pair<int, int> >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, true>::~_Hash_code_base()' is implicitly deleted because the default definition would be ill-formed:
 1346 |     struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2,
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1347 |       _Default_ranged_hash, true>
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/hashtable_policy.h:1346:12: error: use of deleted function 'std::__detail::_Hashtable_ebo_helper<1, std::hash<std::pair<int, int> >, true>::~_Hashtable_ebo_helper()'
In file included from /usr/include/c++/9/unordered_map:46,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:117,
                 from rect.cpp:2:
/usr/include/c++/9/bits/hashtable.h:414:7: error: use of deleted function 'std::__detail::_Hashtable_base<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::__detail::_Select1st, std::equal_to<std::pair<int, int> >, std::hash<std::pair<int, int> >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Hashtable_traits<true, false, true> >::~_Hashtable_base()'
  414 |       _Hashtable() = default;
      |       ^~~~~~~~~~
In file included from /usr/include/c++/9/bits/hashtable.h:35,
                 from /usr/include/c++/9/unordered_map:46,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:117,
                 from rect.cpp:2:
/usr/include/c++/9/bits/hashtable_policy.h:1770:10: note: 'std::__detail::_Hashtable_base<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::__detail::_Select1st, std::equal_to<std::pair<int, int> >, std::hash<std::pair<int, int> >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Hashtable_traits<true, false, true> >::~_Hashtable_base()' is implicitly deleted because the default definition would be ill-formed:
 1770 |   struct _Hashtable_base
      |          ^~~~~~~~~~~~~~~
/usr/include/c++/9/bits/hashtable_policy.h:1770:10: error: use of deleted function 'std::__detail::_Hash_code_base<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::__detail::_Select1st, std::hash<std::pair<int, int> >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, true>::~_Hash_code_base()'
rect.cpp:15:51: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<int, int>; _Tp = int; _Hash = std::hash<std::pair<int, int> >; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >]'
   15 | vector<pii> evt[MN]; unordered_map<pii,int> hist, tmp;
      |                                                   ^~~
rect.cpp: In function 'void mrg(int, int)':
rect.cpp:90:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   90 |             if(j<vec[y].size()&&vec[x][i]==vec[y][j]) res.push_back(vec[x][i]);
      |                ~^~~~~~~~~~~~~~
In file included from /usr/include/c++/9/bits/hashtable.h:35,
                 from /usr/include/c++/9/unordered_map:46,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:117,
                 from rect.cpp:2:
/usr/include/c++/9/bits/hashtable_policy.h: In instantiation of 'std::__detail::_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, std::__detail::_Default_ranged_hash, true>::__hash_code std::__detail::_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, std::__detail::_Default_ranged_hash, true>::_M_hash_code(const _Key&) const [with _Key = std::pair<int, int>; _Value = std::pair<const std::pair<int, int>, int>; _ExtractKey = std::__detail::_Select1st; _H1 = std::hash<std::pair<int, int> >; _H2 = std::__detail::_Mod_range_hashing; std::__detail::_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, std::__detail::_Default_ranged_hash, true>::__hash_code = long unsigned int]':
/usr/include/c++/9/bits/hashtable_policy.h:695:19:   required from 'std::__detail::_Map_base<_Key, _Pair, _Alloc, std::__detail::_Select1st, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, true>::mapped_type& std::__detail::_Map_base<_Key, _Pair, _Alloc, std::__detail::_Select1st, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, true>::operator[](const key_type&) [with _Key = std::pair<int, int>; _Pair = std::pair<const std::pair<int, int>, int>; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; _Equal = std::equal_to<std::pair<int, int> >; _H1 = std::hash<std::pair<int, int> >; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; _Traits = std::__detail::_Hashtable_traits<true, false, true>; std::__detail::_Map_base<_Key, _Pair, _Alloc, std::__detail::_Select1st, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, true>::mapped_type = int; std::__detail::_Map_base<_Key, _Pair, _Alloc, std::__detail::_Select1st, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, true>::key_type = std::pair<int, int>]'
/usr/include/c++/9/bits/unordered_map.h:985:20:   required from 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type&) [with _Key = std::pair<int, int>; _Tp = int; _Hash = std::hash<std::pair<int, int> >; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type = int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type = std::pair<int, int>]'
rect.cpp:131:31:   required from here
/usr/include/c++/9/bits/hashtable_policy.h:1382:16: error: static assertion failed: hash function must be invocable with an argument of key type
 1382 |  static_assert(__is_invocable<const _H1&, const _Key&>{},
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/hashtable_policy.h:1384:16: error: no match for call to '(const std::hash<std::pair<int, int> >) (const std::pair<int, int>&)'
 1384 |  return _M_h1()(__k);
      |         ~~~~~~~^~~~~
/usr/include/c++/9/bits/hashtable_policy.h: In instantiation of 'void std::__detail::_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, std::__detail::_Default_ranged_hash, true>::_M_swap(std::__detail::_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, std::__detail::_Default_ranged_hash, true>&) [with _Key = std::pair<int, int>; _Value = std::pair<const std::pair<int, int>, int>; _ExtractKey = std::__detail::_Select1st; _H1 = std::hash<std::pair<int, int> >; _H2 = std::__detail::_Mod_range_hashing]':
/usr/include/c++/9/bits/hashtable_policy.h:1841:32:   required from 'void std::__detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, _H1, _H2, _Hash, _Traits>::_M_swap(std::__detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, _H1, _H2, _Hash, _Traits>&) [with _Key = std::pair<int, int>; _Value = std::pair<const std::pair<int, int>, int>; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<std::pair<int, int> >; _H1 = std::hash<std::pair<int, int> >; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _Traits = std::__detail::_Hashtable_traits<true, false, true>]'
/usr/include/c++/9/bits/hashtable.h:1370:7:   required from 'void std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::swap(std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>&) [with _Key = std::pair<int, int>; _Value = std::pair<const std::pair<int, int>, int>; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<std::pair<int, int> >; _H1 = std::hash<std::pair<int, int> >; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; _Traits = std::__detail::_Hashtable_traits<true, false, true>]'
/usr/include/c++/9/bits/unordered_map.h:858:9:   required from 'void std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::swap(std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&) [with _Key = std::pair<int, int>; _Tp = int; _Hash = std::hash<std::pair<int, int> >; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >]'
/usr/include/c++/9/bits/unordered_map.h:2080:7:   required from 'void std::swap(std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&, std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&) [with _Key = std::pair<int, int>; _Tp = int; _Hash = std::hash<std::pair<int, int> >; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >]'
rect.cpp:140:23:   required from here
/usr/include/c++/9/bits/hashtable_policy.h:1410:11: error: no matching function for call to 'swap(std::hash<std::pair<int, int> >&, std::hash<std::pair<int, int> >&)'
 1410 |  std::swap(_M_h1(), __x._M_h1());
      |  ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/9/bits/stl_pair.h:59,
                 from /usr/include/c++/9/bits/stl_algobase.h:64,
                 from /usr/include/c++/9/vector:60,
                 from rect.h:5,
                 from /var/local/lib/isolate/0/box/