| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1186262 | Unforgettablepl | The Potion of Great Power (CEOI20_potion) | C++20 | Compilation error | 0 ms | 0 KiB |
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
namespace {
const int threshold = 6; // Can change
vector<vector<pair<int,int>>> updates;
vector<vector<pair<int,set<int>>>> blocks;
vector<int> h;
int N;
}
void init(int N, int D, int H[]) {
updates.resize(N);
::N = N;
blocks.resize(N);
h.resize(N);
for(int i=0;i<N;i++){
h[i]=H[i];
blocks[i].emplace_back(0,vector<int>());
}
}
void curseChanges(int U, int A[], int B[]) {
vector<set<int>> curr(N);
vector<int> currUpdates(N);
for(int i=0;i<U;i++){
// Process A->B
int upd = B[i];
if(curr[A[i]].count(B[i])){
upd=-upd-1;curr[A[i]].erase(B[i]);
} else {
curr[A[i]].insert(B[i]);
}
updates[A[i]].emplace_back(i+1,upd);
if(++currUpdates[A[i]] == threshold){
currUpdates[A[i]]=0;
blocks[A[i]].emplace_back(i+1,curr[A[i]]);
}
// Process B->A
upd = A[i];
if(curr[B[i]].count(A[i])){
upd=-upd-1;curr[B[i]].erase(A[i]);
} else {
curr[B[i]].insert(A[i]);
}
updates[B[i]].emplace_back(i+1,upd);
if(++currUpdates[B[i]] == threshold){
currUpdates[B[i]]=0;
blocks[B[i]].emplace_back(i+1,curr[B[i]]);
}
}
}
int question(int x, int y, int v) {
auto recover = [&](int curr){
auto base = --upper_bound(blocks[curr].begin(),blocks[curr].end(),v,[](const int& a,const pair<int,vector<int>>& b){return a<b.first;});
int st = base->first;
set<int> ans = base->second;
auto iter = upper_bound(updates[curr].begin(),updates[curr].end(),st,[](const int& a,const pair<int,int>& b){return a<b.first;});
while(iter!=updates[curr].end() and iter->first <=v){
int upd = iter->second;
if(upd<0){
upd= -upd-1;
ans.erase(upd);
} else ans.insert(upd);
iter++;
}
vector<int> heights;
for(int i:ans)heights.emplace_back(h[i]);
sort(heights.begin(),heights.end());
return heights;
};
auto htX = recover(x);
auto htY = recover(y);
auto f = htX.begin();
auto s = htY.begin();
int ans = 1e9;
while(f!=htX.end() and s!=htY.end()){
ans = min(ans,abs((*f)-(*s)));
if(*f < *s)f++;
else s++;
}
return ans;
}
Compilation message (stderr)
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
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 potion.cpp:4:
/usr/include/c++/11/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Val_comp_iter<_Compare>::operator()(_Value&, _Iterator) [with _Value = const int; _Iterator = __gnu_cxx::__normal_iterator<std::pair<int, std::set<int> >*, std::vector<std::pair<int, std::set<int> > > >; _Compare = question(int, int, int)::<lambda(int)>::<lambda(const int&, const std::pair<int, std::vector<int> >&)>]':
/usr/include/c++/11/bits/stl_algo.h:2041:14: required from 'constexpr _ForwardIterator std::__upper_bound(_ForwardIterator, _ForwardIterator, const _Tp&, _Compare) [with _ForwardIterator = __gnu_cxx::__normal_iterator<std::pair<int, std::set<int> >*, std::vector<std::pair<int, std::set<int> > > >; _Tp = int; _Compare = __gnu_cxx::__ops::_Val_comp_iter<question(int, int, int)::<lambda(int)>::<lambda(const int&, const std::pair<int, std::vector<int> >&)> >]'
/usr/include/c++/11/bits/stl_algo.h:2108:32: required from 'constexpr _FIter std::upper_bound(_FIter, _FIter, const _Tp&, _Compare) [with _FIter = __gnu_cxx::__normal_iterator<std::pair<int, std::set<int> >*, std::vector<std::pair<int, std::set<int> > > >; _Tp = int; _Compare = question(int, int, int)::<lambda(int)>::<lambda(const int&, const std::pair<int, std::vector<int> >&)>]'
potion.cpp:60:34: required from here
/usr/include/c++/11/bits/predefined_ops.h:240:30: error: no match for call to '(question(int, int, int)::<lambda(int)>::<lambda(const int&, const std::pair<int, std::vector<int> >&)>) (const int&, std::pair<int, std::set<int> >&)'
240 | { return bool(_M_comp(__val, *__it)); }
| ~~~~~~~^~~~~~~~~~~~~~
/usr/include/c++/11/bits/predefined_ops.h:240:30: note: candidate: 'bool (*)(const int&, const std::pair<int, std::vector<int> >&)' (conversion)
/usr/include/c++/11/bits/predefined_ops.h:240:30: note: candidate expects 3 arguments, 3 provided
potion.cpp:60:77: note: candidate: 'question(int, int, int)::<lambda(int)>::<lambda(const int&, const std::pair<int, std::vector<int> >&)>'
60 | auto base = --upper_bound(blocks[curr].begin(),blocks[curr].end(),v,[](const int& a,const pair<int,vector<int>>& b){return a<b.first;});
| ^
potion.cpp:60:77: note: no known conversion for argument 2 from 'std::pair<int, std::set<int> >' to 'const std::pair<int, std::vector<int> >&'
In file included from /usr/include/c++/11/ext/alloc_traits.h:34,
from /usr/include/c++/11/bits/basic_string.h:40,
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 potion.cpp:4:
/usr/include/c++/11/bits/alloc_traits.h: In instantiation of 'static constexpr void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = std::pair<int, std::set<int> >; _Args = {int, std::vector<int, std::allocator<int> >}; _Tp = std::pair<int, std::set<int> >; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<std::pair<int, std::set<int> > >]':
/usr/include/c++/11/bits/vector.tcc:115:30: required from 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {int, std::vector<int, std::allocator<int> >}; _Tp = std::pair<int, std::set<int> >; _Alloc = std::allocator<std::pair<int, std::set<int> > >; std::vector<_Tp, _Alloc>::reference = std::pair<int, std::set<int> >&]'
potion.cpp:23:31: required from here
/usr/include/c++/11/bits/alloc_traits.h:518:28: error: no matching function for call to 'construct_at(std::pair<int, std::set<int> >*&, int, std::vector<int>)'
518 | std::construct_at(__p, std::forward<_Args>(__args)...);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/stl_iterator.h:85,
from /usr/include/c++/11/bits/stl_algobase.h:67,
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 potion.cpp:4:
/usr/include/c++/11/bits/stl_construct.h:94:5: note: candidate: 'template<class _Tp, class ... _Args> constexpr decltype (::new(void*(0)) _Tp) std::construct_at(_Tp*, _Args&& ...)'
94 | construct_at(_Tp* __location, _Args&&... __args)
| ^~~~~~~~~~~~
/usr/include/c++/11/bits/stl_construct.h:94:5: note: template argument deduction/substitution failed:
/usr/include/c++/11/bits/stl_construct.h: In substitution of 'template<class _Tp, class ... _Args> constexpr decltype (::new(void*(0)) _Tp) std::construct_at(_Tp*, _Args&& ...) [with _Tp = std::pair<int, std::set<int> >; _Args = {int, std::vector<int, std::allocator<int> >}]':
/usr/include/c++/11/bits/alloc_traits.h:518:21: required from 'static constexpr void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = std::pair<int, std::set<int> >; _Args = {int, std::vector<int, std::allocator<int> >}; _Tp = std::pair<int, std::set<int> >; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<std::pair<int, std::set<int> > >]'
/usr/include/c++/11/bits/vector.tcc:115:30: required from 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {int, std::vector<int, std::allocator<int> >}; _Tp = std::pair<int, std::set<int> >; _Alloc = std::allocator<std::pair<int, std::set<int> > >; std::vector<_Tp, _Alloc>::reference = std::pair<int, std::set<int> >&]'
potion.cpp:23:31: required from here
/usr/include/c++/11/bits/stl_construct.h:96:17: error: no matching function for call to 'std::pair<int, std::set<int> >::pair(int, std::vector<int>)'
96 | -> decltype(::new((void*)0) _Tp(std::declval<_Args>()...))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 potion.cpp:4:
/usr/include/c++/11/bits/stl_pair.h:452:9: note: candidate: 'template<class ... _Args1, long unsigned int ..._Indexes1, class ... _Args2, long unsigned int ..._Indexes2> constexpr std::pair<_T1, _T2>::pair(std::tuple<_Args1 ...>&, std::tuple<_Args2 ...>&, std::_Index_tuple<_Indexes1 ...>, std::_Index_tuple<_Indexes2 ...>) [with _Args1 = {_Args1 ...}; long unsigned int ..._Indexes1 = {_Indexes1 ...}; _Args2 = {_Args2 ...}; long unsigned int ..._Indexes2 = {_Indexes2 ...}; _T1 = int; _T2 = std::set<int>]'
452 | pair(tuple<_Args1...>&, tuple<_Args2...>&,
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:452:9: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_iterator.h:85,
from /usr/include/c++/11/bits/stl_algobase.h:67,
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 potion.cpp:4:
/usr/include/c++/11/bits/stl_construct.h:96:17: note: mismatched types 'std::tuple<_Tps ...>' and 'int'
96 | -> decltype(::new((void*)0) _Tp(std::declval<_Args>()...))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 potion.cpp:4:
/usr/include/c++/11/bits/stl_pair.h:387:9: note: candidate: 'template<class ... _Args1, class ... _Args2> constexpr std::pair<_T1, _T2>::pair(std::piecewise_construct_t, std::tuple<_Args1 ...>, std::tuple<_Args2 ...>) [with _Args1 = {_Args1 ...}; _Args2 = {_Args2 ...}; _T1 = int; _T2 = std::set<int>]'
387 | pair(piecewise_construct_t, tuple<_Args1...>, tuple<_Args2...>);
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:387:9: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_iterator.h:85,
from /usr/include/c++/11/bits/stl_algobase.h:67,
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 potion.cpp:4:
/usr/include/c++/11/bits/stl_construct.h:96:17: note: 'std::vector<int>' is not derived from 'std::tuple<_Tps ...>'
96 | -> decltype(::new((void*)0) _Tp(std::declval<_Args>()...))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 potion.cpp:4:
/usr/include/c++/11/bits/stl_pair.h:381:28: note: candidate: 'template<class _U1, class _U2, typename std::enable_if<(std::_PCC<((! std::is_same<int, _U1>::value) || (! std::is_same<std::set<int>, _U2>::value)), int, std::set<int> >::_MoveConstructiblePair<_U1, _U2>() && (! std::_PCC<((! std::is_same<int, _U1>::value) || (! std::is_same<std::set<int>, _U2>::value)), int, std::set<int> >::_ImplicitlyMoveConvertiblePair<_U1, _U2>())), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(std::pair<_U1, _U2>&&) [with _U1 = _U1; _U2 = _U2; typename std::enable_if<(std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && (! std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>())), bool>::type <anonymous> = <anonymous>; _T1 = int; _T2 = std::set<int>]'
381 | explicit constexpr pair(pair<_U1, _U2>&& __p)
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:381:28: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_iterator.h:85,
from /usr/include/c++/11/bits/stl_algobase.h:67,
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 potion.cpp:4:
/usr/include/c++/11/bits/stl_construct.h:96:17: note: mismatched types 'std::pair<_T1, _T2>' and 'int'
96 | -> decltype(::new((void*)0) _Tp(std::declval<_Args>()...))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 potion.cpp:4:
/usr/include/c++/11/bits/stl_pair.h:371:19: note: candidate: 'template<class _U1, class _U2, typename std::enable_if<(std::_PCC<((! std::is_same<int, _U1>::value) || (! std::is_same<std::set<int>, _U2>::value)), int, std::set<int> >::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<((! std::is_same<int, _U1>::value) || (! std::is_same<std::set<int>, _U2>::value)), int, std::set<int> >::_ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(std::pair<_U1, _U2>&&) [with _U1 = _U1; _U2 = _U2; typename std::enable_if<(std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type <anonymous> = <anonymous>; _T1 = int; _T2 = std::set<int>]'
371 | constexpr pair(pair<_U1, _U2>&& __p)
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:371:19: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_iterator.h:85,
from /usr/include/c++/11/bits/stl_algobase.h:67,
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 potion.cpp:4:
/usr/include/c++/11/bits/stl_construct.h:96:17: note: mismatched types 'std::pair<_T1, _T2>' and 'int'
96 | -> decltype(::new((void*)0) _Tp(std::declval<_Args>()...))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 potion.cpp:4:
/usr/include/c++/11/bits/stl_pair.h:361:28: note: candidate: 'template<class _U1, class _U2, typename std::enable_if<(_MoveConstructiblePair<_U1, _U2>() && (! _ImplicitlyMoveConvertiblePair<_U1, _U2>())), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U1 = _U1; _U2 = _U2; typename std::enable_if<(std::_PCC<true, _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && (! std::_PCC<true, _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>())), bool>::type <anonymous> = <anonymous>; _T1 = int; _T2 = std::set<int>]'
361 | explicit constexpr pair(_U1&& __x, _U2&& __y)
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:361:28: note: template argument deduction/substitution failed:
/usr/include/c++/11/bits/stl_pair.h:360:38: error: no type named 'type' in 'struct std::enable_if<false, bool>'
360 | bool>::type=false>
| ^~~~~
/usr/include/c++/11/bits/stl_pair.h:352:19: note: candidate: 'template<class _U1, class _U2, typename std::enable_if<(_MoveConstructiblePair<_U1, _U2>() && _ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U1 = _U1; _U2 = _U2; typename std::enable_if<(std::_PCC<true, _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<true, _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type <anonymous> = <anonymous>; _T1 = int; _T2 = std::set<int>]'
352 | constexpr pair(_U1&& __x, _U2&& __y)
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:352:19: note: template argument deduction/substitution failed:
/usr/include/c++/11/bits/stl_pair.h:351:38: error: no type named 'type' in 'struct std::enable_if<false, bool>'
351 | bool>::type=true>
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:343:17: note: candidate: 'template<class _U2, typename std::enable_if<_CopyMovePair<false, int, _U2>(), bool>::type <anonymous> > std::pair<_T1, _T2>::pair(const _T1&, _U2&&) [with _U2 = _U2; typename std::enable_if<std::_PCC<true, _T1, _T2>::_CopyMovePair<false, _T1, _U2>(), bool>::type <anonymous> = <anonymous>; _T1 = int; _T2 = std::set<int>]'
343 | explicit pair(const _T1& __x, _U2&& __y)
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:343:17: note: template argument deduction/substitution failed:
/usr/include/c++/11/bits/stl_pair.h:342:38: error: no type named 'type' in 'struct std::enable_if<false, bool>'
342 | bool>::type=false>
| ^~~~~
/usr/include/c++/11/bits/stl_pair.h:336:18: note: candidate: 'template<class _U2, typename std::enable_if<_CopyMovePair<true, int, _U2>(), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(const _T1&, _U2&&) [with _U2 = _U2; typename std::enable_if<std::_PCC<true, _T1, _T2>::_CopyMovePair<true, _T1, _U2>(), bool>::type <anonymous> = <anonymous>; _T1 = int; _T2 = std::set<int>]'
336 | constexpr pair(const _T1& __x, _U2&& __y)
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:336:18: note: template argument deduction/substitution failed:
/usr/include/c++/11/bits/stl_pair.h:335:38: error: no type named 'type' in 'struct std::enable_if<false, bool>'
335 | bool>::type=true>
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:329:27: note: candidate: 'template<class _U1, typename std::enable_if<_MoveCopyPair<false, _U1, std::set<int, std::less<int>, std::allocator<int> > >(), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(_U1&&, const _T2&) [with _U1 = _U1; typename std::enable_if<std::_PCC<true, _T1, _T2>::_MoveCopyPair<false, _U1, _T2>(), bool>::type <anonymous> = <anonymous>; _T1 = int; _T2 = std::set<int>]'
329 | explicit constexpr pair(_U1&& __x, const _T2& __y)
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:329:27: note: template argument deduction/substitution failed:
/usr/include/c++/11/bits/stl_pair.h:328:38: error: no type named 'type' in 'struct std::enable_if<false, bool>'
328 | bool>::type=false>
| ^~~~~
/usr/include/c++/11/bits/stl_pair.h:322:18: note: candidate: 'template<class _U1, typename std::enable_if<_MoveCopyPair<true, _U1, std::set<int, std::less<int>, std::allocator<int> > >(), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(_U1&&, const _T2&) [with _U1 = _U1; typename std::enable_if<std::_PCC<true, _T1, _T2>::_MoveCopyPair<true, _U1, _T2>(), bool>::type <anonymous> = <anonymous>; _T1 = int; _T2 = std::set<int>]'
322 | constexpr pair(_U1&& __x, const _T2& __y)
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:322:18: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_iterator.h:85,
from /usr/include/c++/11/bits/stl_algobase.h:67,
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 potion.cpp:4:
/usr/include/c++/11/bits/stl_construct.h:96:17: note: cannot convert 'std::declval<std::vector<int> >()' (type 'std::vector<int>') to type 'const std::set<int>&'
96 | -> decltype(::new((void*)0) _Tp(std::declval<_Args>()...))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 potion.cpp:4:
/usr/include/c++/11/bits/stl_pair.h:309:28: note: candidate: 'template<class _U1, class _U2, typename std::enable_if<(std::_PCC<((! std::is_same<int, _U1>::value) || (! std::is_same<std::set<int>, _U2>::value)), int, std::set<int> >::_ConstructiblePair<_U1, _U2>() && (! std::_PCC<((! std::is_same<int, _U1>::value) || (! std::is_same<std::set<int>, _U2>::value)), int, std::set<int> >::_ImplicitlyConvertiblePair<_U1, _U2>())), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(const std::pair<_U1, _U2>&) [with _U1 = _U1; _U2 = _U2; typename std::enable_if<(std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_ConstructiblePair<_U1, _U2>() && (! std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_ImplicitlyConvertiblePair<_U1, _U2>())), bool>::type <anonymous> = <anonymous>; _T1 = int; _T2 = std::set<int>]'
309 | explicit constexpr pair(const pair<_U1, _U2>& __p)
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:309:28: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_iterator.h:85,
from /usr/include/c++/11/bits/stl_algobase.h:67,
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 potion.cpp:4:
/usr/include/c++/11/bits/stl_construct.h:96:17: note: mismatched types 'const std::pair<_T1, _T2>' and 'int'
96 | -> decltype(::new((void*)0) _Tp(std::declval<_Args>()...))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 potion.cpp:4:
/usr/include/c++/11/bits/stl_pair.h:300:19: note: candidate: 'template<class _U1, class _U2, typename std::enable_if<(std::_PCC<((! std::is_same<int, _U1>::value) || (! std::is_same<std::set<int>, _U2>::value)), int, std::set<int> >::_ConstructiblePair<_U1, _U2>() && std::_PCC<((! std::is_same<int, _U1>::value) || (! std::is_same<std::set<int>, _U2>::value)), int, std::set<int> >::_ImplicitlyConvertiblePair<_U1, _U2>()), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(const std::pair<_U1, _U2>&) [with _U1 = _U1; _U2 = _U2; typename std::enable_if<(std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_ConstructiblePair<_U1, _U2>() && std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_ImplicitlyConvertiblePair<_U1, _U2>()), bool>::type <anonymous> = <anonymous>; _T1 = int; _T2 = std::set<int>]'
300 | constexpr pair(const pair<_U1, _U2>& __p)
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:300:19: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_iterator.h:85,
from /usr/include/c++/11/bits/stl_algobase.h:67,
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 potion.cpp:4:
/usr/include/c++/11/bits/stl_construct.h:96:17: note: mismatched types 'const std::pair<_T1, _T2>' and 'int'
96 | -> decltype(::new((void*)0) _Tp(std::declval<_Args>()...))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 potion.cpp:4:
/usr/include/c++/11/bits/stl_pair.h:276:26: note: candidate: 'template<class _U1, class _U2, typename std::enable_if<(_ConstructiblePair<_U1, _U2>() && (! _ImplicitlyConvertiblePair<_U1, _U2>())), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(const _T1&, const _T2&) [with _U1 = _U1; _U2 = _U2; typename std::enable_if<(std::_PCC<true, _T1, _T2>::_ConstructiblePair<_U1, _U2>() && (! std::_PCC<true, _T1, _T2>::_ImplicitlyConvertiblePair<_U1, _U2>())), bool>::type <anonymous> = <anonymous>; _T1 = int; _T2 = std::set<int>]'
276 | explicit constexpr pair(const _T1& __a, const _T2& __b)
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:276:26: note: template argument deduction/substitution failed:
/usr/include/c++/11/bits/stl_pair.h:275:38: error: no type named 'type' in 'struct std::enable_if<false, bool>'
275 | bool>::type=false>
| ^~~~~
/usr/include/c++/11/bits/stl_pair.h:266:17: note: candidate: 'template<class _U1, class _U2, typename std::enable_if<(_ConstructiblePair<_U1, _U2>() && _ImplicitlyConvertiblePair<_U1, _U2>()), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(const _T1&, const _T2&) [with _U1 = _U1; _U2 = _U2; typename std::enable_if<(std::_PCC<true, _T1, _T2>::_ConstructiblePair<_U1, _U2>() && std::_PCC<true, _T1, _T2>::_ImplicitlyConvertiblePair<_U1, _U2>()), bool>::type <anonymous> = <anonymous>; _T1 = int; _T2 = std::set<int>]'
266 | constexpr pair(const _T1& __a, const _T2& __b)
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:266:17: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_iterator.h:85,
from /usr/include/c++/11/bits/stl_algobase.h:67,
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 potion.cpp:4:
/usr/include/c++/11/bits/stl_construct.h:96:17: note: cannot convert 'std::declval<std::vector<int> >()' (type 'std::vector<int>') to type 'const std::set<int>&'
96 | -> decltype(::new((void*)0) _Tp(std::declval<_Args>()...))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 potion.cpp:4:
/usr/include/c++/11/bits/stl_pair.h:245:26: note: candidate: 'template<class _U1, class _U2, typename std::enable_if<std::__and_<std::is_default_constructible<_U1>, std::is_default_constructible<_U2>, std::__not_<std::__and_<std::__is_implicitly_default_constructible<_U1>, std::__is_implicitly_default_constructible<_U2> > > >::value, bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair() [with _U1 = _U1; _U2 = _U2; typename std::enable_if<std::__and_<std::is_default_constructible<_U1>, std::is_default_constructible<_U2>, std::__not_<std::__and_<std::__is_implicitly_default_constructible<_U1>, std::__is_implicitly_default_constructible<_U2> > > >::value, bool>::type <anonymous> = <anonymous>; _T1 = int; _T2 = std::set<int>]'
245 | explicit constexpr pair()
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:245:26: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_iterator.h:85,
from /usr/include/c++/11/bits/stl_algobase.h:67,
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 potion.cpp:4:
/usr/include/c++/11/bits/stl_construct.h:96:17: note: candidate expects 0 arguments, 2 provided
96 | -> decltype(::new((void*)0) _Tp(std::declval<_Args>()...))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 potion.cpp:4:
/usr/include/c++/11/bits/stl_pair.h:232:26: note: candidate: 'template<class _U1, class _U2, typename std::enable_if<std::__and_<std::__is_implicitly_default_constructible<_U1>, std::__is_implicitly_default_constructible<_U2> >::value, bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair() [with _U1 = _U1; _U2 = _U2; typename std::enable_if<std::__and_<std::__is_implicitly_default_constructible<_U1>, std::__is_implicitly_default_constructible<_U2> >::value, bool>::type <anonymous> = <anonymous>; _T1 = int; _T2 = std::set<int>]'
232 | _GLIBCXX_CONSTEXPR pair()
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:232:26: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_iterator.h:85,
from /usr/include/c++/11/bits/stl_algobase.h:67,
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 potion.cpp:4:
/usr/include/c++/11/bits/stl_construct.h:96:17: note: candidate expects 0 arguments, 2 provided
96 | -> decltype(::new((void*)0) _Tp(std::declval<_Args>()...))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 potion.cpp:4:
/usr/include/c++/11/bits/stl_pair.h:315:17: note: candidate: 'std::pair<_T1, _T2>::pair(std::pair<_T1, _T2>&&) [with _T1 = int; _T2 = std::set<int>]'
315 | constexpr pair(pair&&) = default; ///< Move constructor
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:315:17: note: candidate expects 1 argument, 2 provided
/usr/include/c++/11/bits/stl_pair.h:314:17: note: candidate: 'std::pair<_T1, _T2>::pair(const std::pair<_T1, _T2>&) [with _T1 = int; _T2 = std::set<int>]'
314 | constexpr pair(const pair&) = default; ///< Copy constructor
| ^~~~
/usr/include/c++/11/bits/stl_pair.h:314:17: note: candidate expects 1 argument, 2 provided