# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1127025 | neverspot | Race (IOI11_race) | C++20 | Compilation error | 0 ms | 0 KiB |
/* "If I can run I will run , If I can walk I will walk , If I can crawl I will crawl" */
/* " But I will NEVER_STOP " */
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <random>
using namespace std;
using namespace __gnu_pbds;
#define Code ios_base::sync_with_stdio(false);
#define By cin.tie(NULL);
#define NeverSpot cout.tie(NULL);
// #define int long long
#define double long double
#define f first
#define s second
#define ed <<endl;
#define co cout<<
#define ci cin>>
#define sped <<" ";
#define sp <<" "<<
#define love cout<<" Insha " ed
#define all(x) (x).begin(),(x).end()
#define fl(a,b) for (int i=a;i<(b);++i)
#define rfl(a,b) for (int i=a;i>=(b);--i)
#define sl(a,b) for (int j=a;j<(b);++j)
#define rsl(a,b) for (int j=a;j>=(b);--j)
#define tl(a,b) for (int k=a;k<(b);++k)
#define rtl(a,b) for (int k=a;k>=(b);--k)
#define test(t) int t;cin>>t;for(int O=1;O<=t;O++)
#define sortv(v) sort(all(v));
#define sumv(arr) accumulate(all(arr),0LL)
#define rev(v) reverse(all(v));
#define ai(o,size) vi o;fl(0,size){int p ; cin>>p ; (o).push_back(p);}
#define Mod 1000000007ll
#define Emod 998244353ll
#define inf 1000000000000000009ll
#define gcd __gcd
inline int Sqrt(int x){ int y=static_cast<long long>(sqrt(x))+5;while(y*y>x)y--;return y;}
#define log2(x) (64 - __builtin_clzll(x) - 1) // log2 in O(1) time
using mii = map<long long, long long>;
using vi = vector<long long>;
using vb = vector<bool>;
using vvb = vector<vector<bool>>;
using vvc = vector<vector<char>>;
using vc = vector<char>;
using vs = vector<string>;
using vvi = vector<vector<long long>>;
using vvp = vector<vector<pair<long long, long long>>>;
using pii = pair<long long, long long>;
using vp = vector<pair<long long, long long>>;
typedef tree<int, null_type, less<>, rb_tree_tag, tree_order_statistics_node_update> order_set; // find_by_order, order_of_key
typedef tree<pair<int,int>, null_type, less<>, rb_tree_tag, tree_order_statistics_node_update> order_multiset; // find_by_order, order_of_key
string al="abcdefghijklmnopqrstuvwxyz";
//.........For Taking Mod............//
inline int power(int a, int b, int mod=Mod) {int res = 1; while (b > 0) {if (b & 1)res = res * a % mod; a = a * a % mod; b = b >> 1;} return res;}
class mod
{
static int mminvprime(int a, int b) {return power(a, b - 2, b);}
public:
int m=Mod;
void set(int m) {this->m=m;}
int add(int a, int b) {a = a % m; b = b % m; return ((a + b) % m + m) % m;}
int mul(int a, int b) {a = a % m; b = b % m; return (a * b % m + m) % m;}
int sub(int a, int b) {a = a % m; b = b % m; return ((a - b) % m + m) % m;}
int div(int a, int b) {a = a % m; b = b % m; return (mul(a, mminvprime(b, m)) + m) % m;} //only for prime m
}mod;
//.........Bit_Manipulation...........//
#define msb(mask) (63-__builtin_clzll(mask)) /// 0 -> -1
#define lsb(mask) __builtin_ctzll(mask) /// 0 -> 64
#define cntsetbit(mask) __builtin_popcountll(mask)
#define checkbit(mask,bit) ((mask >> bit) & 1ll)
#define onbit(mask,bit) ((mask)|(1LL<<(bit)))
#define offbit(mask,bit) ((mask)&~(1LL<<(bit)))
#define changebit(mask,bit) ((mask)^(1LL<<bit))
// // random number generator #BESTEST_QUAILTY :)
// mt19937_64 gen(random_device{}());
// long long rng(int l=0,int r=INT64_MAX){uniform_int_distribution dist(l, r);return dist(gen);}
//
// // Custom hashing for unordered map or set
// const int RANDOM = rng();
// struct chash{int operator()(int x) const { return x ^ RANDOM; }};
//
// // Function
#define Ceil(a,b) ((a+b-1)/b)
#define print(arr) for(auto &o:(arr)){co o sped;} cout ed
#define mxe(v) *max_element(v.begin(),v.end()) // find max element in vector
#define mne(v) *min_element(v.begin(),v.end()) // find min element in vector
inline bool isPrime(int v) {if(v==1) return false; if(v <= 3)return true;if ( v % 2 == 0 || v % 3 == 0)return false;int i = 5;while (i * i <= v) {if (v % i == 0 || v % (i + 2) == 0)return false;i += 6;}return true;}
inline void printbin(int v,int upto=10) {cout<<v<<"-> ";for (int i = upto; i >= 0; --i) {cout<<checkbit(v,i) sped}cout ed}
bool isEqual(double a, double b, double epsilon = 1e-9) {return abs(a - b) <= epsilon * (1ll + max(abs(a), abs(b)));}
inline bool limit_check(long long a, long long b, int max_bits = 59) {if (a == 0 || b == 0) return true;return msb(a) + msb(b) >= 128 - max_bits;}
namespace std {
// fast swap
void swap(order_set &a, order_set &b) { a.swap(b); }
void swap(order_multiset &a, order_multiset &b) { a.swap(b); }
}
// Free to use :}
int best_path(int n, int k, int edges[][2], int weights[]) {// Global Variables
vvp e(n+1);
fl(0,n-1) {
auto [x,y]=edges[i];
e[x].push_back({y,weights[i]});
e[y].push_back({x,weights[i]});
}
vi dept(n+1,0);
vi cnt(n+1,0);
function<void(int, int)> dfs = [&](int v, int p) {
for (auto [child,w] : e[v]) {
if (child == p)continue;
dept[child]=dept[v]+w;
cnt[child]=cnt[v]+1;
dfs(child, v);
}
};
dfs(1,1);
vector<mii> data(n+1);
int ans=INT_MAX;
function<void(int, int)> cal = [&](int v, int p) {
int dl=dept[v];
int best=v;
data[v][dl]=cnt[v];
for (auto [child,w] : e[v]) {
if (child == p)continue;
cal(child, v);
if (data[child].size()>data[best].size())swap(child,best);
for (auto &[dis,cn]:data[child]) {
int want=k-dis+(2*dl);
if (data[best].contains(want)) {
int lc=data[best][want];
int rc=cn;
int sex=lc+rc-2*cnt[v];
ans=min(ans,sex);
}
}
for (auto &p:data[child]) {
if (data[best].contains(p.f)) {
data[best][p.f]=min(data[best][p.f],p.s);
}else {
data[best][p.f]=p.s;
}
}
}
swap(data[best],data[v]);
for (auto &p:data[best]) {
if (data[v].contains(p.f)) {
data[v][p.f]=min(data[v][p.f],p.s);
}else {
data[v][p.f]=p.s;
}
}
};
cal(1,1);
if (ans==INT_MAX)ans=-1;
return ans;
}
Compilation message (stderr)
race.cpp: In lambda function: race.cpp:147:55: error: no matching function for call to 'swap(std::tuple_element<0, std::pair<long long int, long long int> >::type&, int&)' 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/complex:45, from /usr/include/c++/11/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54, from race.cpp:3: /usr/include/c++/11/sstream:1185:5: note: candidate: 'template<class _CharT, class _Traits, class _Allocator> void std::__cxx11::swap(std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>&, std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>&)' 1185 | swap(basic_stringbuf<_CharT, _Traits, _Allocator>& __x, | ^~~~ /usr/include/c++/11/sstream:1185:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/complex:45, from /usr/include/c++/11/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54, from race.cpp:3: /usr/include/c++/11/sstream:1193:5: note: candidate: 'template<class _CharT, class _Traits, class _Allocator> void std::__cxx11::swap(std::__cxx11::basic_istringstream<_CharT, _Traits, _Allocator>&, std::__cxx11::basic_istringstream<_CharT, _Traits, _Allocator>&)' 1193 | swap(basic_istringstream<_CharT, _Traits, _Allocator>& __x, | ^~~~ /usr/include/c++/11/sstream:1193:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::__cxx11::basic_istringstream<_CharT, _Traits, _Allocator>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/complex:45, from /usr/include/c++/11/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54, from race.cpp:3: /usr/include/c++/11/sstream:1200:5: note: candidate: 'template<class _CharT, class _Traits, class _Allocator> void std::__cxx11::swap(std::__cxx11::basic_ostringstream<_CharT, _Traits, _Allocator>&, std::__cxx11::basic_ostringstream<_CharT, _Traits, _Allocator>&)' 1200 | swap(basic_ostringstream<_CharT, _Traits, _Allocator>& __x, | ^~~~ /usr/include/c++/11/sstream:1200:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::__cxx11::basic_ostringstream<_CharT, _Traits, _Allocator>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/complex:45, from /usr/include/c++/11/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54, from race.cpp:3: /usr/include/c++/11/sstream:1207:5: note: candidate: 'template<class _CharT, class _Traits, class _Allocator> void std::__cxx11::swap(std::__cxx11::basic_stringstream<_CharT, _Traits, _Allocator>&, std::__cxx11::basic_stringstream<_CharT, _Traits, _Allocator>&)' 1207 | swap(basic_stringstream<_CharT, _Traits, _Allocator>& __x, | ^~~~ /usr/include/c++/11/sstream:1207:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::__cxx11::basic_stringstream<_CharT, _Traits, _Allocator>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/regex:63, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:110, from race.cpp:3: /usr/include/c++/11/bits/regex.h:872:5: note: candidate: 'template<class _Ch_type, class _Rx_traits> void std::__cxx11::swap(std::__cxx11::basic_regex<_Ch_type, _Rx_traits>&, std::__cxx11::basic_regex<_Ch_type, _Rx_traits>&)' 872 | swap(basic_regex<_Ch_type, _Rx_traits>& __lhs, | ^~~~ /usr/include/c++/11/bits/regex.h:872:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::__cxx11::basic_regex<_Ch_type, _Rx_traits>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/regex:63, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:110, from race.cpp:3: /usr/include/c++/11/bits/regex.h:2165:5: note: candidate: 'template<class _Bi_iter, class _Alloc> void std::__cxx11::swap(std::__cxx11::match_results<_BiIter, _Alloc>&, std::__cxx11::match_results<_BiIter, _Alloc>&)' 2165 | swap(match_results<_Bi_iter, _Alloc>& __lhs, | ^~~~ /usr/include/c++/11/bits/regex.h:2165:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::__cxx11::match_results<_BiIter, _Alloc>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/bits/stl_pair.h:59, from /usr/include/c++/11/bits/stl_algobase.h:64, from /usr/include/c++/11/bits/specfun.h:45, from /usr/include/c++/11/cmath:1935, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41, from race.cpp:3: /usr/include/c++/11/bits/move.h:196:5: note: candidate: 'template<class _Tp> constexpr std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&)' 196 | swap(_Tp& __a, _Tp& __b) | ^~~~ /usr/include/c++/11/bits/move.h:196:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: deduced conflicting types for parameter '_Tp' ('long long int' and 'int') 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/bits/stl_pair.h:59, from /usr/include/c++/11/bits/stl_algobase.h:64, from /usr/include/c++/11/bits/specfun.h:45, from /usr/include/c++/11/cmath:1935, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41, from race.cpp:3: /usr/include/c++/11/bits/move.h:220:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr std::__enable_if_t<std::__is_swappable<_Tp>::value> std::swap(_Tp (&)[_Nm], _Tp (&)[_Nm])' 220 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) | ^~~~ /usr/include/c++/11/bits/move.h:220:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types '_Tp [_Nm]' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/bits/stl_algobase.h:64, from /usr/include/c++/11/bits/specfun.h:45, from /usr/include/c++/11/cmath:1935, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41, from race.cpp:3: /usr/include/c++/11/bits/stl_pair.h:533:5: note: candidate: 'template<class _T1, class _T2> constexpr typename std::enable_if<std::__and_<std::__is_swappable<_T1>, std::__is_swappable<_T2> >::value>::type std::swap(std::pair<_T1, _T2>&, std::pair<_T1, _T2>&)' 533 | swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y) | ^~~~ /usr/include/c++/11/bits/stl_pair.h:533:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::pair<_T1, _T2>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/bits/stl_algobase.h:64, from /usr/include/c++/11/bits/specfun.h:45, from /usr/include/c++/11/cmath:1935, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41, from race.cpp:3: /usr/include/c++/11/bits/stl_pair.h:541:5: note: candidate: 'template<class _T1, class _T2> typename std::enable_if<(! std::__and_<std::__is_swappable<_T1>, std::__is_swappable<_T2> >::value)>::type std::swap(std::pair<_T1, _T2>&, std::pair<_T1, _T2>&)' (deleted) 541 | swap(pair<_T1, _T2>&, pair<_T1, _T2>&) = delete; | ^~~~ /usr/include/c++/11/bits/stl_pair.h:541:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::pair<_T1, _T2>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/string:55, from /usr/include/c++/11/bits/locale_classes.h:40, from /usr/include/c++/11/bits/ios_base.h:41, from /usr/include/c++/11/ios:42, from /usr/include/c++/11/istream:38, from /usr/include/c++/11/sstream:38, from /usr/include/c++/11/complex:45, from /usr/include/c++/11/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54, from race.cpp:3: /usr/include/c++/11/bits/basic_string.h:6493:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> void std::swap(std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 6493 | swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~ /usr/include/c++/11/bits/basic_string.h:6493:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/tuple:39, from /usr/include/c++/11/functional:54, from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13, from /usr/include/c++/11/algorithm:74, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65, from race.cpp:3: /usr/include/c++/11/array:348:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr typename std::enable_if<typename std::__array_traits<_Tp, _Nm>::_Is_swappable::value>::type std::swap(std::array<_Tp, _Nm>&, std::array<_Tp, _Nm>&)' 348 | swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two) | ^~~~ /usr/include/c++/11/array:348:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::array<_Tp, _Nm>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/tuple:39, from /usr/include/c++/11/functional:54, from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13, from /usr/include/c++/11/algorithm:74, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65, from race.cpp:3: /usr/include/c++/11/array:356:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> typename std::enable_if<(! typename std::__array_traits<_Tp, _Nm>::_Is_swappable::value)>::type std::swap(std::array<_Tp, _Nm>&, std::array<_Tp, _Nm>&)' (deleted) 356 | swap(array<_Tp, _Nm>&, array<_Tp, _Nm>&) = delete; | ^~~~ /usr/include/c++/11/array:356:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::array<_Tp, _Nm>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/functional:54, from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13, from /usr/include/c++/11/algorithm:74, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65, from race.cpp:3: /usr/include/c++/11/tuple:1760:5: note: candidate: 'template<class ... _Elements> constexpr typename std::enable_if<std::__and_<std::__is_swappable<_Elements>...>::value>::type std::swap(std::tuple<_Tps ...>&, std::tuple<_Tps ...>&)' 1760 | swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y) | ^~~~ /usr/include/c++/11/tuple:1760:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::tuple<_Tps ...>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/functional:54, from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13, from /usr/include/c++/11/algorithm:74, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65, from race.cpp:3: /usr/include/c++/11/tuple:1768:5: note: candidate: 'template<class ... _Elements> constexpr typename std::enable_if<(! std::__and_<std::__is_swappable<_Elements>...>::value)>::type std::swap(std::tuple<_Tps ...>&, std::tuple<_Tps ...>&)' (deleted) 1768 | swap(tuple<_Elements...>&, tuple<_Elements...>&) = delete; | ^~~~ /usr/include/c++/11/tuple:1768:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::tuple<_Tps ...>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/functional:59, from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13, from /usr/include/c++/11/algorithm:74, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65, from race.cpp:3: /usr/include/c++/11/bits/std_function.h:758:5: note: candidate: 'template<class _Res, class ... _Args> void std::swap(std::function<_Res(_ArgTypes ...)>&, std::function<_Res(_ArgTypes ...)>&)' 758 | swap(function<_Res(_Args...)>& __x, function<_Res(_Args...)>& __y) noexcept | ^~~~ /usr/include/c++/11/bits/std_function.h:758:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::function<_Res(_ArgTypes ...)>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/unordered_map:47, from /usr/include/c++/11/functional:61, from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13, from /usr/include/c++/11/algorithm:74, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65, from race.cpp:3: /usr/include/c++/11/bits/unordered_map.h:2120:5: note: candidate: 'template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> void std::swap(std::unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&, std::unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&)' 2120 | swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, | ^~~~ /usr/include/c++/11/bits/unordered_map.h:2120:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/unordered_map:47, from /usr/include/c++/11/functional:61, from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13, from /usr/include/c++/11/algorithm:74, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65, from race.cpp:3: /usr/include/c++/11/bits/unordered_map.h:2127:5: note: candidate: 'template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> void std::swap(std::unordered_multimap<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&, std::unordered_multimap<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&)' 2127 | swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, | ^~~~ /usr/include/c++/11/bits/unordered_map.h:2127:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::unordered_multimap<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/vector:67, from /usr/include/c++/11/functional:62, from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13, from /usr/include/c++/11/algorithm:74, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65, from race.cpp:3: /usr/include/c++/11/bits/stl_vector.h:1962:5: note: candidate: 'template<class _Tp, class _Alloc> void std::swap(std::vector<_Tp, _Alloc>&, std::vector<_Tp, _Alloc>&)' 1962 | swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y) | ^~~~ /usr/include/c++/11/bits/stl_vector.h:1962:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::vector<_Tp, _Alloc>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/deque:67, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:68, from race.cpp:3: /usr/include/c++/11/bits/stl_deque.h:2317:5: note: candidate: 'template<class _Tp, class _Alloc> void std::swap(std::deque<_Tp, _Alloc>&, std::deque<_Tp, _Alloc>&)' 2317 | swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y) | ^~~~ /usr/include/c++/11/bits/stl_deque.h:2317:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::deque<_Tp, _Alloc>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:70, from race.cpp:3: /usr/include/c++/11/fstream:1269:5: note: candidate: 'template<class _CharT, class _Traits> void std::swap(std::basic_filebuf<_CharT, _Traits>&, std::basic_filebuf<_CharT, _Traits>&)' 1269 | swap(basic_filebuf<_CharT, _Traits>& __x, | ^~~~ /usr/include/c++/11/fstream:1269:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::basic_filebuf<_CharT, _Traits>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:70, from race.cpp:3: /usr/include/c++/11/fstream:1276:5: note: candidate: 'template<class _CharT, class _Traits> void std::swap(std::basic_ifstream<_CharT, _Traits>&, std::basic_ifstream<_CharT, _Traits>&)' 1276 | swap(basic_ifstream<_CharT, _Traits>& __x, | ^~~~ /usr/include/c++/11/fstream:1276:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::basic_ifstream<_CharT, _Traits>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:70, from race.cpp:3: /usr/include/c++/11/fstream:1283:5: note: candidate: 'template<class _CharT, class _Traits> void std::swap(std::basic_ofstream<_CharT, _Traits>&, std::basic_ofstream<_CharT, _Traits>&)' 1283 | swap(basic_ofstream<_CharT, _Traits>& __x, | ^~~~ /usr/include/c++/11/fstream:1283:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::basic_ofstream<_CharT, _Traits>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:70, from race.cpp:3: /usr/include/c++/11/fstream:1290:5: note: candidate: 'template<class _CharT, class _Traits> void std::swap(std::basic_fstream<_CharT, _Traits>&, std::basic_fstream<_CharT, _Traits>&)' 1290 | swap(basic_fstream<_CharT, _Traits>& __x, | ^~~~ /usr/include/c++/11/fstream:1290:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::basic_fstream<_CharT, _Traits>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/bits/locale_conv.h:41, from /usr/include/c++/11/locale:43, from /usr/include/c++/11/iomanip:43, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:72, from race.cpp:3: /usr/include/c++/11/bits/unique_ptr.h:738:5: note: candidate: 'template<class _Tp, class _Dp> typename std::enable_if<std::__is_swappable<_T2>::value>::type std::swap(std::unique_ptr<_Tp, _Dp>&, std::unique_ptr<_Tp, _Dp>&)' 738 | swap(unique_ptr<_Tp, _Dp>& __x, | ^~~~ /usr/include/c++/11/bits/unique_ptr.h:738:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::unique_ptr<_Tp, _Dp>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/bits/locale_conv.h:41, from /usr/include/c++/11/locale:43, from /usr/include/c++/11/iomanip:43, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:72, from race.cpp:3: /usr/include/c++/11/bits/unique_ptr.h:745:5: note: candidate: 'template<class _Tp, class _Dp> typename std::enable_if<(! std::__is_swappable<_T2>::value)>::type std::swap(std::unique_ptr<_Tp, _Dp>&, std::unique_ptr<_Tp, _Dp>&)' (deleted) 745 | swap(unique_ptr<_Tp, _Dp>&, | ^~~~ /usr/include/c++/11/bits/unique_ptr.h:745:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::unique_ptr<_Tp, _Dp>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/list:63, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:79, from race.cpp:3: /usr/include/c++/11/bits/stl_list.h:2117:5: note: candidate: 'template<class _Tp, class _Alloc> void std::swap(std::__cxx11::list<_Tp, _Alloc>&, std::__cxx11::list<_Tp, _Alloc>&)' 2117 | swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y) | ^~~~ /usr/include/c++/11/bits/stl_list.h:2117:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::__cxx11::list<_Tp, _Alloc>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/map:60, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:81, from race.cpp:3: /usr/include/c++/11/bits/stl_tree.h:1632:5: note: candidate: 'template<class _Key, class _Val, class _KeyOfValue, class _Compare, class _Alloc> void std::swap(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&, std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&)' 1632 | swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, | ^~~~ /usr/include/c++/11/bits/stl_tree.h:1632:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/map:61, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:81, from race.cpp:3: /usr/include/c++/11/bits/stl_map.h:1537:5: note: candidate: 'template<class _Key, class _Tp, class _Compare, class _Alloc> void std::swap(std::map<_Key, _Tp, _Compare, _Allocator>&, std::map<_Key, _Tp, _Compare, _Allocator>&)' 1537 | swap(map<_Key, _Tp, _Compare, _Alloc>& __x, | ^~~~ /usr/include/c++/11/bits/stl_map.h:1537:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::map<_Key, _Tp, _Compare, _Allocator>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/map:62, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:81, from race.cpp:3: /usr/include/c++/11/bits/stl_multimap.h:1202:5: note: candidate: 'template<class _Key, class _Tp, class _Compare, class _Alloc> void std::swap(std::multimap<_Key, _Tp, _Compare, _Allocator>&, std::multimap<_Key, _Tp, _Compare, _Allocator>&)' 1202 | swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x, | ^~~~ /usr/include/c++/11/bits/stl_multimap.h:1202:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::multimap<_Key, _Tp, _Compare, _Allocator>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/bits/shared_ptr.h:53, from /usr/include/c++/11/memory:77, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:82, from race.cpp:3: /usr/include/c++/11/bits/shared_ptr_base.h:1534:5: note: candidate: 'template<class _Tp, __gnu_cxx::_Lock_policy _Lp> void std::swap(std::__shared_ptr<_Tp, _Lp>&, std::__shared_ptr<_Tp, _Lp>&)' 1534 | swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b) noexcept | ^~~~ /usr/include/c++/11/bits/shared_ptr_base.h:1534:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::__shared_ptr<_Tp, _Lp>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/bits/shared_ptr.h:53, from /usr/include/c++/11/memory:77, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:82, from race.cpp:3: /usr/include/c++/11/bits/shared_ptr_base.h:1740:5: note: candidate: 'template<class _Tp, __gnu_cxx::_Lock_policy _Lp> void std::swap(std::__weak_ptr<_Tp, _Lp>&, std::__weak_ptr<_Tp, _Lp>&)' 1740 | swap(__weak_ptr<_Tp, _Lp>& __a, __weak_ptr<_Tp, _Lp>& __b) noexcept | ^~~~ /usr/include/c++/11/bits/shared_ptr_base.h:1740:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::__weak_ptr<_Tp, _Lp>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/memory:77, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:82, from race.cpp:3: /usr/include/c++/11/bits/shared_ptr.h:574:5: note: candidate: 'template<class _Tp> void std::swap(std::shared_ptr<_Tp>&, std::shared_ptr<_Tp>&)' 574 | swap(shared_ptr<_Tp>& __a, shared_ptr<_Tp>& __b) noexcept | ^~~~ /usr/include/c++/11/bits/shared_ptr.h:574:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::shared_ptr<_Tp>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/memory:77, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:82, from race.cpp:3: /usr/include/c++/11/bits/shared_ptr.h:763:5: note: candidate: 'template<class _Tp> void std::swap(std::weak_ptr<_Tp>&, std::weak_ptr<_Tp>&)' 763 | swap(weak_ptr<_Tp>& __a, weak_ptr<_Tp>& __b) noexcept | ^~~~ /usr/include/c++/11/bits/shared_ptr.h:763:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::weak_ptr<_Tp>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/queue:64, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:86, from race.cpp:3: /usr/include/c++/11/bits/stl_queue.h:405:5: note: candidate: 'template<class _Tp, class _Seq> typename std::enable_if<std::__is_swappable<_T2>::value>::type std::swap(std::queue<_Tp, _Seq>&, std::queue<_Tp, _Seq>&)' 405 | swap(queue<_Tp, _Seq>& __x, queue<_Tp, _Seq>& __y) | ^~~~ /usr/include/c++/11/bits/stl_queue.h:405:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::queue<_Tp, _Seq>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/queue:64, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:86, from race.cpp:3: /usr/include/c++/11/bits/stl_queue.h:739:5: note: candidate: 'template<class _Tp, class _Sequence, class _Compare> typename std::enable_if<std::__and_<std::__is_swappable<_T2>, std::__is_swappable<_Compare> >::value>::type std::swap(std::priority_queue<_Tp, _Sequence, _Compare>&, std::priority_queue<_Tp, _Sequence, _Compare>&)' 739 | swap(priority_queue<_Tp, _Sequence, _Compare>& __x, | ^~~~ /usr/include/c++/11/bits/stl_queue.h:739:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::priority_queue<_Tp, _Sequence, _Compare>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/set:61, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:87, from race.cpp:3: /usr/include/c++/11/bits/stl_set.h:1059:5: note: candidate: 'template<class _Key, class _Compare, class _Alloc> void std::swap(std::set<_Key, _Compare, _Allocator>&, std::set<_Key, _Compare, _Allocator>&)' 1059 | swap(set<_Key, _Compare, _Alloc>& __x, set<_Key, _Compare, _Alloc>& __y) | ^~~~ /usr/include/c++/11/bits/stl_set.h:1059:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::set<_Key, _Compare, _Allocator>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/set:62, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:87, from race.cpp:3: /usr/include/c++/11/bits/stl_multiset.h:1045:5: note: candidate: 'template<class _Key, class _Compare, class _Alloc> void std::swap(std::multiset<_Key, _Compare, _Allocator>&, std::multiset<_Key, _Compare, _Allocator>&)' 1045 | swap(multiset<_Key, _Compare, _Alloc>& __x, | ^~~~ /usr/include/c++/11/bits/stl_multiset.h:1045:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::multiset<_Key, _Compare, _Allocator>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/stack:61, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:89, from race.cpp:3: /usr/include/c++/11/bits/stl_stack.h:380:5: note: candidate: 'template<class _Tp, class _Seq> typename std::enable_if<std::__is_swappable<_T2>::value>::type std::swap(std::stack<_Tp, _Seq>&, std::stack<_Tp, _Seq>&)' 380 | swap(stack<_Tp, _Seq>& __x, stack<_Tp, _Seq>& __y) | ^~~~ /usr/include/c++/11/bits/stl_stack.h:380:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::stack<_Tp, _Seq>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/condition_variable:41, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:103, from race.cpp:3: /usr/include/c++/11/bits/unique_lock.h:236:5: note: candidate: 'template<class _Mutex> void std::swap(std::unique_lock<_Mutex>&, std::unique_lock<_Mutex>&)' 236 | swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) noexcept | ^~~~ /usr/include/c++/11/bits/unique_lock.h:236:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::unique_lock<_Mutex>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/forward_list:38, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:104, from race.cpp:3: /usr/include/c++/11/bits/forward_list.h:1505:5: note: candidate: 'template<class _Tp, class _Alloc> void std::swap(std::forward_list<_Tp, _Alloc>&, std::forward_list<_Tp, _Alloc>&)' 1505 | swap(forward_list<_Tp, _Alloc>& __lx, | ^~~~ /usr/include/c++/11/bits/forward_list.h:1505:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::forward_list<_Tp, _Alloc>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:105, from race.cpp:3: /usr/include/c++/11/future:1175:5: note: candidate: 'template<class _Res> void std::swap(std::promise<_Res>&, std::promise<_Res>&)' 1175 | swap(promise<_Res>& __x, promise<_Res>& __y) noexcept | ^~~~ /usr/include/c++/11/future:1175:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::promise<_Res>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:105, from race.cpp:3: /usr/include/c++/11/future:1638:5: note: candidate: 'template<class _Res, class ... _ArgTypes> void std::swap(std::packaged_task<_Res(_ArgTypes ...)>&, std::packaged_task<_Res(_ArgTypes ...)>&)' 1638 | swap(packaged_task<_Res(_ArgTypes...)>& __x, | ^~~~ /usr/include/c++/11/future:1638:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::packaged_task<_Res(_ArgTypes ...)>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/unordered_set:47, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:118, from race.cpp:3: /usr/include/c++/11/bits/unordered_set.h:1790:5: note: candidate: 'template<class _Value, class _Hash, class _Pred, class _Alloc> void std::swap(std::unordered_set<_Value1, _Hash1, _Pred1, _Alloc1>&, std::unordered_set<_Value1, _Hash1, _Pred1, _Alloc1>&)' 1790 | swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, | ^~~~ /usr/include/c++/11/bits/unordered_set.h:1790:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::unordered_set<_Value1, _Hash1, _Pred1, _Alloc1>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/unordered_set:47, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:118, from race.cpp:3: /usr/include/c++/11/bits/unordered_set.h:1797:5: note: candidate: 'template<class _Value, class _Hash, class _Pred, class _Alloc> void std::swap(std::unordered_multiset<_Value1, _Hash1, _Pred1, _Alloc1>&, std::unordered_multiset<_Value1, _Hash1, _Pred1, _Alloc1>&)' 1797 | swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, | ^~~~ /usr/include/c++/11/bits/unordered_set.h:1797:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::unordered_multiset<_Value1, _Hash1, _Pred1, _Alloc1>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:122, from race.cpp:3: /usr/include/c++/11/shared_mutex:851:5: note: candidate: 'template<class _Mutex> void std::swap(std::shared_lock<_Mutex>&, std::shared_lock<_Mutex>&)' 851 | swap(shared_lock<_Mutex>& __x, shared_lock<_Mutex>& __y) noexcept | ^~~~ /usr/include/c++/11/shared_mutex:851:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::shared_lock<_Mutex>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:130, from race.cpp:3: /usr/include/c++/11/optional:1264:5: note: candidate: 'template<class _Tp> constexpr std::enable_if_t<(is_move_constructible_v<_Tp> && is_swappable_v<_Tp>)> std::swap(std::optional<_Tp>&, std::optional<_Tp>&)' 1264 | swap(optional<_Tp>& __lhs, optional<_Tp>& __rhs) | ^~~~ /usr/include/c++/11/optional:1264:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::optional<_Tp>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:130, from race.cpp:3: /usr/include/c++/11/optional:1270:5: note: candidate: 'template<class _Tp> std::enable_if_t<(!(is_move_constructible_v<_Tp> && is_swappable_v<_Tp>))> std::swap(std::optional<_Tp>&, std::optional<_Tp>&)' (deleted) 1270 | swap(optional<_Tp>&, optional<_Tp>&) = delete; | ^~~~ /usr/include/c++/11/optional:1270:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::optional<_Tp>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:133, from race.cpp:3: /usr/include/c++/11/variant:1285:5: note: candidate: 'template<class ... _Types> std::enable_if_t<((is_move_constructible_v<_Types> && ...) && (is_swappable_v<_Types> && ...))> std::swap(std::variant<_Types ...>&, std::variant<_Types ...>&)' 1285 | swap(variant<_Types...>& __lhs, variant<_Types...>& __rhs) | ^~~~ /usr/include/c++/11/variant:1285:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::variant<_Types ...>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:133, from race.cpp:3: /usr/include/c++/11/variant:1292:5: note: candidate: 'template<class ... _Types> std::enable_if_t<(!((is_move_constructible_v<_Types> && ...) && (is_swappable_v<_Types> && ...)))> std::swap(std::variant<_Types ...>&, std::variant<_Types ...>&)' (deleted) 1292 | swap(variant<_Types...>&, variant<_Types...>&) = delete; | ^~~~ /usr/include/c++/11/variant:1292:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::variant<_Types ...>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:151, from race.cpp:3: /usr/include/c++/11/syncstream:304:5: note: candidate: 'template<class _CharT, class _Traits, class _Allocator> void std::swap(std::basic_syncbuf<_CharT, _Traits, _Alloc>&, std::basic_syncbuf<_CharT, _Traits, _Alloc>&)' 304 | swap(basic_syncbuf<_CharT, _Traits, _Allocator>& __x, | ^~~~ /usr/include/c++/11/syncstream:304:5: note: template argument deduction/substitution failed: race.cpp:147:55: note: mismatched types 'std::basic_syncbuf<_CharT, _Traits, _Alloc>' and 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} 147 | if (data[child].size()>data[best].size())swap(child,best); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/11/vector:68, from /usr/include/c++/11/functional:62, from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13, from /usr/include/c++/11/algorithm:74, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65, from race.cpp:3: /usr/include/c++/11/bits/stl_bvector.h:118:3: note: candidate: 'void std::swap(std::_Bit_reference, std::_Bit_reference)' 118 | swap(_Bit_reference __x, _Bit_reference __y) noexcept | ^~~~ /usr/include/c++/11/bits/stl_bvector.h:118:23: note: no known conversion for argument 1 from 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} to 'std::_Bit_reference' 118 | swap(_Bit_reference __x, _Bit_reference __y) noexcept | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/11/bits/stl_bvector.h:126:3: note: candidate: 'void std::swap(std::_Bit_reference, bool&)' 126 | swap(_Bit_reference __x, bool& __y) noexcept | ^~~~ /usr/include/c++/11/bits/stl_bvector.h:126:23: note: no known conversion for argument 1 from 'std::tuple_element<0, std::pair<long long int, long long int> >::type' {aka 'long long int'} to 'std::_Bit_reference' 126 | swap(_Bit_reference __x, bool& __y) noexcept | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/11/bits/stl_bvector.h:134:3: note: candidate: 'void std::swap(bool&, std::_Bit_reference)' 134 | swap(bool& __x, _Bit_reference __y) noexcept | ^~~~ /usr/include/c++/11/bits/stl_bvector.h:134:34: note: no known conversion for argument 2 from 'int' to 'std::_Bit_reference' 134 | swap(bool& __x, _Bit_reference __y) noexcept | ~~~~~~~~~~~~~~~^~~ In file included from /usr/include/c++/11/stop_token:35, from /usr/include/c++/11/condition_variable:47, from /usr/