제출 #592941

#제출 시각아이디문제언어결과실행 시간메모리
592941BobaaMeetings (IOI18_meetings)C++17
컴파일 에러
0 ms0 KiB
#include "meetings.h"
#include <bits/stdc++.h>
using namespace std; 

pair<long long, long long> sc[1 << 20]; 
vector<int> ls, le, nxt, cnt; 
vector<int> H, L, R; 
vector<long long> ans, pl; 
vector<vector<int>> qu; 
vector<array<int, 2>> ct; 
set<int> sv; 
pair<int, int> st[1 << 21]; 
int vis[1 << 20]; 

long long getv(int i, int x) {
	return sc[i].first * x  + sc[i].second; 
}

void cal(int u, int l) {
	for (int i : qu[u]) {
		auto it = --sv.upper_bound(R[i]); 
		ans[i] = min(ans[i], getv(max(ls[u], min(le[u], *it)), R[i]) + pl[u] - 1ll * H[u] * (L[i] - l)); 
	}
}

void dfs(int u) {
	if (u == -1) return; 
	vis[u] = 1; 
	auto [l, r] = ct[u]; 
	dfs(l); 
	dfs(r); 
	if (l != -1) {
		ls[u] = ls[l]; 
		pl[u] = pl[l]; 
		cnt[u] += cnt[l]; 
	}
	sc[u] = {H[u], (l != -1 ? getv(le[l], u - 1) + pl[u] : 0) + H[u] - 1ll * u * H[u] - pl[u]}; 
	if (r == -1) {
		for (int i : qu[u]) ans[i] = min(ans[i], 1ll * (R[i] - L[i] + 1) * H[u]); 
		return; 
	}
	pl[r] += 1ll * (u - ls[u] + 1) * H[u]; 
	swap(ls[r], ls[u]); 
	swap(le[r], pl[u]); 
	swap(pl[r], pl[r]); 
	cal(u, ls[r]); 
	swap(ls[r], ls[u]); 
	swap(le[r], le[u]);
	swap(pl[r], pl[u]);
	while (nxt[u] <= le[r]) {
		if (getv(nxt[u], nxt[nxt[u]] - 1) + pl[r] >= getv(u, nxt[nxt[u]] - 1) + pl[u]) {
			sv.erase(nxt[u]); 
			nxt[u] = nxt[nxt[u]]
			cnt[r]--;
		}
		else if (getv(nxt[u], nxt[u]) + pl[r] < getv(u, nxt[u]) + pl[u]) break; 
		else {
			sv.erase(nxt[u]); 
			int s = nxt[u], e = nxt[nxt[u]] - 1; 
			while (s < e) {
				int m = (s + e + 1) / 2; 
				if (getv(nxt[u], m) + pl[r] >= getv(u, m) + pl[u]) s = m; 
				else e = m - 1; 
			}
			sc[s + 1] = sc[nxt[u]]; 
			nxt[s + 1] = nxt[nxt[u]]; 
			if (nxt[u] == le[r]) le[r] = s + 1; 
			sv.emplace(s + 1); 
			nxt[u] = s + 1; 
			break;
		}
	}
	if (cnt[u] < cnt[r]) {
		for (int i = ls[u]; i <= u; i = nxt[i]) sc[i].second += pl[u] - pl[r]; 
		pl[u] = pl[r]; 
	}
	else for (int i = nxt[u]; i <= le[r]; i = nxt[i]) sc[i].second += pl[r] - pl[u]; 
	if (nxt[u] <= le[r]) le[u] = le[r]; 
	cnt[u] += cnt[r]; 
}

vector<long long> minimum_costs(vector<int> hh, vector<int> ll, vector<int> rr) {
	int n = hh.size(); 
	H = hh; 
	L = ll; 
	R = rr; 
	ans.resize(L.size(), 1e18); 
	ct.resize(n, {-1, 1}); 
	qu.resize(n); 
	pl.resize(n); 
	ls.resize(n); 
	le = nxt = cnt = ls; 
	for (int &i : nxt) i++; 
	vector<int> pr(n), lc(n, -1), rc(n, -1); 
	int rt = 0; 
	for (int i = 1, lst; i < n; i++) {
		lst = i - 1; 
		while (H[lst] < H[i] && lst != rt) lst = pr[lst]; 
		if (H[lst] < H[i]) {
			pr[rt] = i; 
			lc[i] = rt; 
			rt = i; 
		}
		else if (rc[lst] == -1) {
			rc[lst] = i; 
			pr[i] = lst; 
		}
		else {
			pr[rc[lst]] = i; 
			ic[i] = rc[lst]; 
			rc[lst] = i; 
			pr[i] = lst; 
		}
	}
	for (int i = 0; i < n; i++) ct[i] = {lc[i], rc[i]}; 
	for (int tr = 0; tr < 2; tr++) {
		sv.clear(); 
		for (int i = 0; i < n; i++) {
			sv.emplace(i); 
			qu[i].clear(); 
			pl[i] = 0; 
			ls[i] = i; 
			cnt[i] = 1; 
		}
		le = nxt = ls; 
		for (int &i : nxt) i++; 
		memset(st, 0, sizeof(st)); 
		for (int i = 0; i < n; i++) st[i + (1 << 20)] = {H[i], i * (tr ? 1 : -1)}; 
		for (int i = (1 << 20) - 1; i; i--) st[i] = max(st[i * 2], st[i * 2 + 1]); 
		auto getmx = [&](int l, int r) {
			l += (1 << 20); 
			r += (1 << 20); 
			pair<int, int> rt(0, 0); 
			while (l <= r) {
				if (l % 2) {
					rt = max(rt, st[l]); 
					l++; 
				}
				if (r % 2 == 0) {
					rt = max(rt, st[r]); 
					r--; 
				}
				l /= 2; 
				r /= 2; 
			}
			return rt.second * (tr ? 1 : -1); 
		};
		for (int i = 1; i < L.size(); i++) qu[getmx(L[i], R[i])].emplace_back(i); 
		dfs(rt); 
		reverse(H.begin, H.end()); 
		for (int i = 0; i < L.size(); i++) tie(L[i], R[i]) = make_pair(n - 1 - R[i], n - 1 - L[i]); 
		rt = n - 1 - rt; 
		for (auto &[l, r] : ct) tie(l, r) = make_pair(r == -1 ? -1 : n - 1 - r, l == -1 ? -1 : n - 1 - l); 
		reverse(ct.begin(), ct.end()); 
	}
	return ans; 
}

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

meetings.cpp: In function 'void dfs(int)':
meetings.cpp:44:19: error: no matching function for call to 'swap(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&)'
   44 |  swap(le[r], pl[u]);
      |                   ^
In file included from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from meetings.cpp:2:
/usr/include/c++/10/sstream:849: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>&)'
  849 |     swap(basic_stringbuf<_CharT, _Traits, _Allocator>& __x,
      |     ^~~~
/usr/include/c++/10/sstream:849:5: note:   template argument deduction/substitution failed:
meetings.cpp:44:19: note:   mismatched types 'std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   44 |  swap(le[r], pl[u]);
      |                   ^
In file included from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from meetings.cpp:2:
/usr/include/c++/10/sstream:856: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>&)'
  856 |     swap(basic_istringstream<_CharT, _Traits, _Allocator>& __x,
      |     ^~~~
/usr/include/c++/10/sstream:856:5: note:   template argument deduction/substitution failed:
meetings.cpp:44:19: note:   mismatched types 'std::__cxx11::basic_istringstream<_CharT, _Traits, _Allocator>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   44 |  swap(le[r], pl[u]);
      |                   ^
In file included from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from meetings.cpp:2:
/usr/include/c++/10/sstream:863: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>&)'
  863 |     swap(basic_ostringstream<_CharT, _Traits, _Allocator>& __x,
      |     ^~~~
/usr/include/c++/10/sstream:863:5: note:   template argument deduction/substitution failed:
meetings.cpp:44:19: note:   mismatched types 'std::__cxx11::basic_ostringstream<_CharT, _Traits, _Allocator>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   44 |  swap(le[r], pl[u]);
      |                   ^
In file included from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from meetings.cpp:2:
/usr/include/c++/10/sstream:870: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>&)'
  870 |     swap(basic_stringstream<_CharT, _Traits, _Allocator>& __x,
      |     ^~~~
/usr/include/c++/10/sstream:870:5: note:   template argument deduction/substitution failed:
meetings.cpp:44:19: note:   mismatched types 'std::__cxx11::basic_stringstream<_CharT, _Traits, _Allocator>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   44 |  swap(le[r], pl[u]);
      |                   ^
In file included from /usr/include/c++/10/regex:62,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110,
                 from meetings.cpp:2:
/usr/include/c++/10/bits/regex.h:849: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>&)'
  849 |     swap(basic_regex<_Ch_type, _Rx_traits>& __lhs,
      |     ^~~~
/usr/include/c++/10/bits/regex.h:849:5: note:   template argument deduction/substitution failed:
meetings.cpp:44:19: note:   mismatched types 'std::__cxx11::basic_regex<_Ch_type, _Rx_traits>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   44 |  swap(le[r], pl[u]);
      |                   ^
In file included from /usr/include/c++/10/regex:62,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110,
                 from meetings.cpp:2:
/usr/include/c++/10/bits/regex.h:2141: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>&)'
 2141 |     swap(match_results<_Bi_iter, _Alloc>& __lhs,
      |     ^~~~
/usr/include/c++/10/bits/regex.h:2141:5: note:   template argument deduction/substitution failed:
meetings.cpp:44:19: note:   mismatched types 'std::__cxx11::match_results<_BiIter, _Alloc>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   44 |  swap(le[r], pl[u]);
      |                   ^
In file included from /usr/include/c++/10/bits/stl_pair.h:59,
                 from /usr/include/c++/10/bits/stl_algobase.h:64,
                 from /usr/include/c++/10/vector:60,
                 from meetings.h:3,
                 from meetings.cpp:1:
/usr/include/c++/10/bits/move.h:189:5: note: candidate: 'template<class _Tp> std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&)'
  189 |     swap(_Tp& __a, _Tp& __b)
      |     ^~~~
/usr/include/c++/10/bits/move.h:189:5: note:   template argument deduction/substitution failed:
meetings.cpp:44:19: note:   deduced conflicting types for parameter '_Tp' ('int' and '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'})
   44 |  swap(le[r], pl[u]);
      |                   ^
In file included from /usr/include/c++/10/bits/stl_pair.h:59,
                 from /usr/include/c++/10/bits/stl_algobase.h:64,
                 from /usr/include/c++/10/vector:60,
                 from meetings.h:3,
                 from meetings.cpp:1:
/usr/include/c++/10/bits/move.h:213:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> std::__enable_if_t<std::__is_swappable<_Tp>::value> std::swap(_Tp (&)[_Nm], _Tp (&)[_Nm])'
  213 |     swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
      |     ^~~~
/usr/include/c++/10/bits/move.h:213:5: note:   template argument deduction/substitution failed:
meetings.cpp:44:19: note:   mismatched types '_Tp [_Nm]' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   44 |  swap(le[r], pl[u]);
      |                   ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
                 from /usr/include/c++/10/vector:60,
                 from meetings.h:3,
                 from meetings.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:533: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>&)'
  533 |     swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
      |     ^~~~
/usr/include/c++/10/bits/stl_pair.h:533:5: note:   template argument deduction/substitution failed:
meetings.cpp:44:19: note:   mismatched types 'std::pair<_T1, _T2>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   44 |  swap(le[r], pl[u]);
      |                   ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
                 from /usr/include/c++/10/vector:60,
                 from meetings.h:3,
                 from meetings.cpp:1:
/usr/include/c++/10/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++/10/bits/stl_pair.h:541:5: note:   template argument deduction/substitution failed:
meetings.cpp:44:19: note:   mismatched types 'std::pair<_T1, _T2>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   44 |  swap(le[r], pl[u]);
      |                   ^
In file included from /usr/include/c++/10/vector:67,
                 from meetings.h:3,
                 from meetings.cpp:1:
/usr/include/c++/10/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++/10/bits/stl_vector.h:1962:5: note:   template argument deduction/substitution failed:
meetings.cpp:44:19: note:   mismatched types 'std::vector<_Tp, _Alloc>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   44 |  swap(le[r], pl[u]);
      |                   ^
In file included from /usr/include/c++/10/vector:68,
                 from meetings.h:3,
                 from meetings.cpp:1:
/usr/include/c++/10/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++/10/bits/stl_bvector.h:118:23: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} to 'std::_Bit_reference'
  118 |   swap(_Bit_reference __x, _Bit_reference __y) noexcept
      |        ~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/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++/10/bits/stl_bvector.h:126:23: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} to 'std::_Bit_reference'
  126 |   swap(_Bit_reference __x, bool& __y) noexcept
      |        ~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/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++/10/bits/stl_bvector.h:134:34: note:   no known conversion for argument 2 from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'std::_Bit_reference'
  134 |   swap(bool& __x, _Bit_reference __y) noexcept
      |                   ~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/10/string:55,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from meetings.cpp:2:
/usr/include/c++/10/bits/basic_string.h:6420: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>&)'
 6420 |     swap(basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~
/usr/include/c++/10/bits/basic_string.h:6420:5: note:   template argument deduction/substitution failed:
meetings.cpp:44:19: note:   mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   44 |  swap(le[r], pl[u]);
      |                   ^
In file included from /usr/include/c++/10/tuple:39,
                 from /usr/include/c++/10/functional:54,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from meetings.cpp:2:
/usr/include/c++/10/array:321: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>&)'
  321 |     swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two)
      |     ^~~~
/usr/include/c++/10/array:321:5: note:   template argument deduction/substitution failed:
meetings.cpp:44:19: note:   mismatched types 'std::array<_Tp, _Nm>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   44 |  swap(le[r], pl[u]);
      |                   ^
In file included from /usr/include/c++/10/tuple:39,
                 from /usr/include/c++/10/functional:54,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from meetings.cpp:2:
/usr/include/c++/10/array:329: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)
  329 |     swap(array<_Tp, _Nm>&, array<_Tp, _Nm>&) = delete;
      |     ^~~~
/usr/include/c++/10/array:329:5: note:   template argument deduction/substitution failed:
meetings.cpp:44:19: note:   mismatched types 'std::array<_Tp, _Nm>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   44 |  swap(le[r], pl[u]);
      |                   ^
In file included from /usr/include/c++/10/functional:54,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from meetings.cpp:2:
/usr/include/c++/10/tuple:1629:5: note: candidate: 'template<class ... _Elements> typename std::enable_if<std::__and_<std::__is_swappable<_Elements>...>::value>::type std::swap(std::tuple<_Tps ...>&, std::tuple<_Tps ...>&)'
 1629 |     swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y)
      |     ^~~~
/usr/include/c++/10/tuple:1629:5: note:   template argument deduction/substitution failed:
meetings.cpp:44:19: note:   mismatched types 'std::tuple<_Tps ...>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   44 |  swap(le[r], pl[u]);
      |                   ^
In file included from /usr/include/c++/10/functional:54,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from meetings.cpp:2:
/usr/include/c++/10/tuple:1637:5: note: candidate: 'template<class ... _Elements> typename std::enable_if<(! std::__and_<std::__is_swappable<_Elements>...>::value)>::type std::swap(std::tuple<_Tps ...>&, std::tuple<_Tps ...>&)' (deleted)
 1637 |     swap(tuple<_Elements...>&, tuple<_Elements...>&) = delete;
      |     ^~~~
/usr/include/c++/10/tuple:1637:5: note:   template argument deduction/substitution failed:
meetings.cpp:44:19: note:   mismatched types 'std::tuple<_Tps ...>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   44 |  swap(le[r], pl[u]);
      |                   ^
In file included from /usr/include/c++/10/functional:59,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from meetings.cpp:2:
/usr/include/c++/10/bits/std_function.h:720:5: note: candidate: 'template<class _Res, class ... _Args> void std::swap(std::function<_Res(_ArgTypes ...)>&, std::function<_Res(_ArgTypes ...)>&)'
  720 |     swap(function<_Res(_Args...)>& __x, function<_Res(_Args...)>& __y) noexcept
      |     ^~~~
/usr/include/c++/10/bits/std_function.h:720:5: note:   template argument deduction/substitution failed:
meetings.cpp:44:19: note:   mismatched types 'std::function<_Res(_ArgTypes ...)>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   44 |  swap(le[r], pl[u]);
      |                   ^
In file included from /usr/include/c++/10/bits/node_handle.h:39,
                 from /usr/include/c++/10/bits/hashtable.h:37,
                 from /usr/include/c++/10/unordered_map:46,
                 from /usr/include/c++/10/functional:61,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from meetings.cpp:2:
/usr/include/c++/10/optional:1196: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>&)'
 1196 |     swap(optional<_Tp>& __lhs, optional<_Tp>& __rhs)
      |     ^~~~
/usr/include/c++/10/optional:1196:5: note:   template argument deduction/substitution failed:
meetings.cpp:44:19: note:   mismatched types 'std::optional<_Tp>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   44 |  swap(le[r], pl[u]);
      |                   ^
In file included from /usr/include/c++/10/bits/node_handle.h:39,
                 from /usr/include/c++/10/bits/hashtable.h:37,
                 from /usr/include/c++/10/unordered_map:46,
                 from /usr/include/c++/10/functional:61,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from meetings.cpp:2:
/usr/include/c++/10/option