답안 #347172

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
347172 2021-01-12T07:33:31 Z dolphingarlic 공장들 (JOI14_factories) C++14
컴파일 오류
0 ms 0 KB
#include "factories.h"

#include <bits/stdc++.h>
typedef long long ll;
using namespace std;

unordered_set<pair<int, ll>> graph[500000];
int tin[500000], tout[500000], timer = 0, anc[500000][20];
ll to_anc[500000][20];
int subtree[500000], c_par[500000];
ll c_dist[500000];

void dfs(int node = 0, int parent = -1) {
    tin[node] = timer++;
    for (int i = 1; i < 20; i++) {
        anc[node][i] = anc[anc[node][i - 1]][i - 1];
        to_anc[node][i] = to_anc[node][i - 1] + to_anc[anc[node][i - 1]][i - 1];
    }
    for (pair<int, ll> i : graph[node]) if (i.first != parent) {
        anc[i.first][0] = node;
        to_anc[i.first][0] = i.second;
        dfs(i.first, node);
    }
    tout[node] = timer++;
}

bool is_ancestor(int u, int v) { return (tin[u] <= tin[v] && tout[u] >= tout[v]); }

ll dist(int u, int v) {
    ll ans = 0;
    for (int i = 19; ~i; i--) if (!is_ancestor(anc[u][i], v)) {
        ans += to_anc[u][i];
        u = anc[u][i];
    }
    if (!is_ancestor(u, v)) ans += to_anc[u][0];
    for (int i = 19; ~i; i--) if (!is_ancestor(anc[v][i], u)) {
        ans += to_anc[v][i];
        v = anc[v][i];
    }
    if (!is_ancestor(v, u)) ans += to_anc[v][0];
    return ans; 
}

void get_subtree_sizes(int node, int parent = -1) {
    subtree[node] = 1;
    for (pair<int, ll> i : graph[node]) if (i.first != parent) {
        get_subtree_sizes(i.first, node);
        subtree[node] += subtree[i.first];
    }
}

int get_centroid(int node, int parent, int tree_size) {
    for (pair<int, ll> i : graph[node])
        if (i.first != parent && subtree[i.first] > tree_size)
            return get_centroid(i.first, node, tree_size);
    return node;
}

void centroid_decomp(int node = 0, int prv_centroid = -1) {
    get_subtree_sizes(node);
    int centroid = get_centroid(node, -1, subtree[node] / 2);
    c_par[centroid] = prv_centroid;
    for (pair<int, ll> i : graph[centroid]) {
        graph[i.first].erase({centroid, i.second});
        centroid_decomp(i.first, centroid);
    }
}

void Init(int N, int A[], int B[], int D[]) {
    for (int i = 0; i < N - 1; i++) {
        graph[A[i]].insert({B[i], D[i]});
        graph[B[i]].insert({A[i], D[i]});
    }
    dfs();
    centroid_decomp();
    for (int i = 0; i < N; i++) c_dist[i] = LLONG_MAX / 2;
}

ll Query(int S, int X[], int T, int Y[]) {
    for (int i = 0; i < S; i++) {
        int curr = X[i];
        while (curr != -1) {
            c_dist[curr] = min(c_dist[curr], dist(X[i], curr));
            curr = c_par[curr];
        }
    }
    ll ans = LLONG_MAX;
    for (int i = 0; i < T; i++) {
        int curr = Y[i];
        while (curr != -1) {
            ans = min(ans, c_dist[curr] + dist(Y[i], curr));
            curr = c_par[curr];
        }
    }
    for (int i = 0; i < S; i++) {
        int curr = X[i];
        while (curr != -1) {
            c_dist[curr] = LLONG_MAX / 2;
            curr = c_par[curr];
        }
    }
    return ans;
}

Compilation message

factories.cpp:7:42: error: use of deleted function 'std::unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set() [with _Value = std::pair<int, long long int>; _Hash = std::hash<std::pair<int, long long int> >; _Pred = std::equal_to<std::pair<int, long long int> >; _Alloc = std::allocator<std::pair<int, long long int> >]'
    7 | unordered_set<pair<int, ll>> graph[500000];
      |                                          ^
In file included from /usr/include/c++/9/unordered_set:47,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:118,
                 from factories.cpp:3:
/usr/include/c++/9/bits/unordered_set.h:135:7: note: 'std::unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set() [with _Value = std::pair<int, long long int>; _Hash = std::hash<std::pair<int, long long int> >; _Pred = std::equal_to<std::pair<int, long long int> >; _Alloc = std::allocator<std::pair<int, long long int> >]' is implicitly deleted because the default definition would be ill-formed:
  135 |       unordered_set() = default;
      |       ^~~~~~~~~~~~~
/usr/include/c++/9/bits/unordered_set.h:135:7: error: use of deleted function 'std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::_Hashtable() [with _Key = std::pair<int, long long int>; _Value = std::pair<int, long long int>; _Alloc = std::allocator<std::pair<int, long long int> >; _ExtractKey = std::__detail::_Identity; _Equal = std::equal_to<std::pair<int, long long int> >; _H1 = std::hash<std::pair<int, long long 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, true, 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 factories.cpp:3:
/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, long long int>; _Value = std::pair<int, long long int>; _Alloc = std::allocator<std::pair<int, long long int> >; _ExtractKey = std::__detail::_Identity; _Equal = std::equal_to<std::pair<int, long long int> >; _H1 = std::hash<std::pair<int, long long 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, true, 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, long long int>; _Value = std::pair<int, long long int>; _ExtractKey = std::__detail::_Identity; _Equal = std::equal_to<std::pair<int, long long int> >; _H1 = std::hash<std::pair<int, long long int> >; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _Traits = std::__detail::_Hashtable_traits<true, true, 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 factories.cpp:3:
/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, long long int>; _Value = std::pair<int, long long int>; _ExtractKey = std::__detail::_Identity; _Equal = std::equal_to<std::pair<int, long long int> >; _H1 = std::hash<std::pair<int, long long int> >; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _Traits = std::__detail::_Hashtable_traits<true, true, 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, long long int>; _Value = std::pair<int, long long int>; _ExtractKey = std::__detail::_Identity; _H1 = std::hash<std::pair<int, long long 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, long long int>; _Value = std::pair<int, long long int>; _ExtractKey = std::__detail::_Identity; _H1 = std::hash<std::pair<int, long long 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, long long 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, long long 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, long long int> >::hash()'
In file included from /usr/include/c++/9/bits/basic_string.h:6719,
                 from /usr/include/c++/9/string:55,
                 from /usr/include/c++/9/bits/locale_classes.h:40,
                 from /usr/include/c++/9/bits/ios_base.h:41,
                 from /usr/include/c++/9/ios:42,
                 from /usr/include/c++/9/istream:38,
                 from /usr/include/c++/9/sstream:38,
                 from /usr/include/c++/9/complex:45,
                 from /usr/include/c++/9/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
                 from factories.cpp:3:
/usr/include/c++/9/bits/functional_hash.h:101:12: note: 'std::hash<std::pair<int, long long 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, long long 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, long long 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, long long 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 factories.cpp:3:
/usr/include/c++/9/bits/hashtable_policy.h:1096:7: error: use of deleted function 'std::hash<std::pair<int, long long int> >::~hash()'
 1096 |       _Hashtable_ebo_helper() = default;
      |       ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/9/bits/basic_string.h:6719,
                 from /usr/include/c++/9/string:55,
                 from /usr/include/c++/9/bits/locale_classes.h:40,
                 from /usr/include/c++/9/bits/ios_base.h:41,
                 from /usr/include/c++/9/ios:42,
                 from /usr/include/c++/9/istream:38,
                 from /usr/include/c++/9/sstream:38,
                 from /usr/include/c++/9/complex:45,
                 from /usr/include/c++/9/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
                 from factories.cpp:3:
/usr/include/c++/9/bits/functional_hash.h:101:12: note: 'std::hash<std::pair<int, long long 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, long long 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 factories.cpp:3:
/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, long long 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, long long 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, long long 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, long long int>, std::pair<int, long long int>, std::__detail::_Identity, std::hash<std::pair<int, long long 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, long long int>, std::pair<int, long long int>, std::__detail::_Identity, std::hash<std::pair<int, long long 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, long long 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 factories.cpp:3:
/usr/include/c++/9/bits/hashtable.h:414:7: error: use of deleted function 'std::__detail::_Hashtable_base<std::pair<int, long long int>, std::pair<int, long long int>, std::__detail::_Identity, std::equal_to<std::pair<int, long long int> >, std::hash<std::pair<int, long long int> >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Hashtable_traits<true, true, 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 factories.cpp:3:
/usr/include/c++/9/bits/hashtable_policy.h:1770:10: note: 'std::__detail::_Hashtable_base<std::pair<int, long long int>, std::pair<int, long long int>, std::__detail::_Identity, std::equal_to<std::pair<int, long long int> >, std::hash<std::pair<int, long long int> >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Hashtable_traits<true, true, 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, long long int>, std::pair<int, long long int>, std::__detail::_Identity, std::hash<std::pair<int, long long int> >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, true>::~_Hash_code_base()'
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 factories.cpp:3:
/usr/include/c++/9/bits/hashtable.h: In instantiation of 'std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::~_Hashtable() [with _Key = std::pair<int, long long int>; _Value = std::pair<int, long long int>; _Alloc = std::allocator<std::pair<int, long long int> >; _ExtractKey = std::__detail::_Identity; _Equal = std::equal_to<std::pair<int, long long int> >; _H1 = std::hash<std::pair<int, long long 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, true, true>]':
/usr/include/c++/9/bits/unordered_set.h:97:11:   required from here
/usr/include/c++/9/bits/hashtable.h:1354:5: error: use of deleted function 'std::__detail::_Hashtable_base<std::pair<int, long long int>, std::pair<int, long long int>, std::__detail::_Identity, std::equal_to<std::pair<int, long long int> >, std::hash<std::pair<int, long long int> >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Hashtable_traits<true, true, true> >::~_Hashtable_base()'
 1354 |     }
      |     ^
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 factories.cpp:3:
/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, long long int>; _Value = std::pair<int, long long int>; _ExtractKey = std::__detail::_Identity; _H1 = std::hash<std::pair<int, long long 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.h:1902:19:   required from 'std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::size_type std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::_M_erase(std::true_type, const key_type&) [with _Key = std::pair<int, long long int>; _Value = std::pair<int, long long int>; _Alloc = std::allocator<std::pair<int, long long int> >; _ExtractKey = std::__detail::_Identity; _Equal = std::equal_to<std::pair<int, long long int> >; _H1 = std::hash<std::pair<int, long long 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, true, true>; std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::size_type = long unsigned int; std::true_type = std::integral_constant<bool, true>; std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::key_type = std::pair<int, long long int>]'
/usr/include/c++/9/bits/hashtable.h:772:45:   required from 'std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::size_type std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::erase(const key_type&) [with _Key = std::pair<int, long long int>; _Value = std::pair<int, long long int>; _Alloc = std::allocator<std::pair<int, long long int> >; _ExtractKey = std::__detail::_Identity; _Equal = std::equal_to<std::pair<int, long long int> >; _H1 = std::hash<std::pair<int, long long 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, true, true>; std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::size_type = long unsigned int; std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::key_type = std::pair<int, long long int>]'
/usr/include/c++/9/bits/unordered_set.h:545:30:   required from 'std::unordered_set<_Value, _Hash, _Pred, _Alloc>::size_type std::unordered_set<_Value, _Hash, _Pred, _Alloc>::erase(const key_type&) [with _Value = std::pair<int, long long int>; _Hash = std::hash<std::pair<int, long long int> >; _Pred = std::equal_to<std::pair<int, long long int> >; _Alloc = std::allocator<std::pair<int, long long int> >; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::size_type = long unsigned int; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::key_type = std::pair<int, long long int>]'
factories.cpp:64:50:   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, long long int> >) (const std::pair<int, long long int>&)'
 1384 |  return _M_h1()(__k);
      |         ~~~~~~~^~~~~