# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1250162 | ezzzay | 선물 (IOI25_souvenirs) | C++20 | 컴파일 에러 | 0 ms | 0 KiB |
#include "souvenirs.h"
#include <utility>
#include <vector>
#include<bits/stdc++.h>
using namespace std;
void buy_souvenirs(int N, long long P0) {
for(int i=1;i<N;i++){
for(int j=0;j<N-i;j++){
long long p=i;
std::pair<std::vector<int>, long long> transaction(p);
}
}
}
컴파일 시 표준 에러 (stderr) 메시지
souvenirs.cpp: In function 'void buy_souvenirs(int, long long int)': souvenirs.cpp:10:77: error: no matching function for call to 'std::pair<std::vector<int>, long long int>::pair(long long int&)' 10 | std::pair<std::vector<int>, long long> transaction(p); | ^ In file included from /usr/include/c++/11/utility:70, from souvenirs.h:1, from souvenirs.cpp:1: /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 = std::vector<int>; _T2 = long long int]' 452 | pair(tuple<_Args1...>&, tuple<_Args2...>&, | ^~~~ /usr/include/c++/11/bits/stl_pair.h:452:9: note: template argument deduction/substitution failed: souvenirs.cpp:10:77: note: mismatched types 'std::tuple<_Tps ...>' and 'long long int' 10 | std::pair<std::vector<int>, long long> transaction(p); | ^ In file included from /usr/include/c++/11/utility:70, from souvenirs.h:1, from souvenirs.cpp:1: /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 = std::vector<int>; _T2 = long long 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: souvenirs.cpp:10:77: note: candidate expects 3 arguments, 1 provided 10 | std::pair<std::vector<int>, long long> transaction(p); | ^ In file included from /usr/include/c++/11/utility:70, from souvenirs.h:1, from souvenirs.cpp:1: /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<std::vector<int>, _U1>::value) || (! std::is_same<long long int, _U2>::value)), std::vector<int>, long long int>::_MoveConstructiblePair<_U1, _U2>() && (! std::_PCC<((! std::is_same<std::vector<int>, _U1>::value) || (! std::is_same<long long int, _U2>::value)), std::vector<int>, long long 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 = std::vector<int>; _T2 = long long 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: souvenirs.cpp:10:77: note: mismatched types 'std::pair<_T1, _T2>' and 'long long int' 10 | std::pair<std::vector<int>, long long> transaction(p); | ^ In file included from /usr/include/c++/11/utility:70, from souvenirs.h:1, from souvenirs.cpp:1: /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<std::vector<int>, _U1>::value) || (! std::is_same<long long int, _U2>::value)), std::vector<int>, long long int>::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<((! std::is_same<std::vector<int>, _U1>::value) || (! std::is_same<long long int, _U2>::value)), std::vector<int>, long long 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 = std::vector<int>; _T2 = long long int]' 371 | constexpr pair(pair<_U1, _U2>&& __p) | ^~~~ /usr/include/c++/11/bits/stl_pair.h:371:19: note: template argument deduction/substitution failed: souvenirs.cpp:10:77: note: mismatched types 'std::pair<_T1, _T2>' and 'long long int' 10 | std::pair<std::vector<int>, long long> transaction(p); | ^ In file included from /usr/include/c++/11/utility:70, from souvenirs.h:1, from souvenirs.cpp:1: /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 = std::vector<int>; _T2 = long long 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: souvenirs.cpp:10:77: note: candidate expects 2 arguments, 1 provided 10 | std::pair<std::vector<int>, long long> transaction(p); | ^ In file included from /usr/include/c++/11/utility:70, from souvenirs.h:1, from souvenirs.cpp:1: /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 = std::vector<int>; _T2 = long long int]' 352 | constexpr pair(_U1&& __x, _U2&& __y) | ^~~~ /usr/include/c++/11/bits/stl_pair.h:352:19: note: template argument deduction/substitution failed: souvenirs.cpp:10:77: note: candidate expects 2 arguments, 1 provided 10 | std::pair<std::vector<int>, long long> transaction(p); | ^ In file included from /usr/include/c++/11/utility:70, from souvenirs.h:1, from souvenirs.cpp:1: /usr/include/c++/11/bits/stl_pair.h:343:17: note: candidate: 'template<class _U2, typename std::enable_if<_CopyMovePair<false, std::vector<int, std::allocator<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 = std::vector<int>; _T2 = long long 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: souvenirs.cpp:10:77: note: candidate expects 2 arguments, 1 provided 10 | std::pair<std::vector<int>, long long> transaction(p); | ^ In file included from /usr/include/c++/11/utility:70, from souvenirs.h:1, from souvenirs.cpp:1: /usr/include/c++/11/bits/stl_pair.h:336:18: note: candidate: 'template<class _U2, typename std::enable_if<_CopyMovePair<true, std::vector<int, std::allocator<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 = std::vector<int>; _T2 = long long 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: souvenirs.cpp:10:77: note: candidate expects 2 arguments, 1 provided 10 | std::pair<std::vector<int>, long long> transaction(p); | ^ In file included from /usr/include/c++/11/utility:70, from souvenirs.h:1, from souvenirs.cpp:1: /usr/include/c++/11/bits/stl_pair.h:329:27: note: candidate: 'template<class _U1, typename std::enable_if<_MoveCopyPair<false, _U1, long long 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 = std::vector<int>; _T2 = long long 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: souvenirs.cpp:10:77: note: candidate expects 2 arguments, 1 provided 10 | std::pair<std::vector<int>, long long> transaction(p); | ^ In file included from /usr/include/c++/11/utility:70, from souvenirs.h:1, from souvenirs.cpp:1: /usr/include/c++/11/bits/stl_pair.h:322:18: note: candidate: 'template<class _U1, typename std::enable_if<_MoveCopyPair<true, _U1, long long 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 = std::vector<int>; _T2 = long long 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: souvenirs.cpp:10:77: note: candidate expects 2 arguments, 1 provided 10 | std::pair<std::vector<int>, long long> transaction(p); | ^ In file included from /usr/include/c++/11/utility:70, from souvenirs.h:1, from souvenirs.cpp:1: /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<std::vector<int>, _U1>::value) || (! std::is_same<long long int, _U2>::value)), std::vector<int>, long long int>::_ConstructiblePair<_U1, _U2>() && (! std::_PCC<((! std::is_same<std::vector<int>, _U1>::value) || (! std::is_same<long long int, _U2>::value)), std::vector<int>, long long 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 = std::vector<int>; _T2 = long long 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: souvenirs.cpp:10:77: note: mismatched types 'const std::pair<_T1, _T2>' and 'long long int' 10 | std::pair<std::vector<int>, long long> transaction(p); | ^ In file included from /usr/include/c++/11/utility:70, from souvenirs.h:1, from souvenirs.cpp:1: /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<std::vector<int>, _U1>::value) || (! std::is_same<long long int, _U2>::value)), std::vector<int>, long long int>::_ConstructiblePair<_U1, _U2>() && std::_PCC<((! std::is_same<std::vector<int>, _U1>::value) || (! std::is_same<long long int, _U2>::value)), std::vector<int>, long long 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 = std::vector<int>; _T2 = long long 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: souvenirs.cpp:10:77: note: mismatched types 'const std::pair<_T1, _T2>' and 'long long int' 10 | std::pair<std::vector<int>, long long> transaction(p); | ^ In file included from /usr/include/c++/11/utility:70, from souvenirs.h:1, from souvenirs.cpp:1: /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 = std::vector<int>; _T2 = long long 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: souvenirs.cpp:10:77: note: candidate expects 2 arguments, 1 provided 10 | std::pair<std::vector<int>, long long> transaction(p); | ^ In file included from /usr/include/c++/11/utility:70, from souvenirs.h:1, from souvenirs.cpp:1: /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 = std::vector<int>; _T2 = long long 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: souvenirs.cpp:10:77: note: candidate expects 2 arguments, 1 provided 10 | std::pair<std::vector<int>, long long> transaction(p); | ^ In file included from /usr/include/c++/11/utility:70, from souvenirs.h:1, from souvenirs.cpp:1: /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 = std::vector<int>; _T2 = long long int]' 245 | explicit constexpr pair() | ^~~~ /usr/include/c++/11/bits/stl_pair.h:245:26: note: template argument deduction/substitution failed: souvenirs.cpp:10:77: note: candidate expects 0 arguments, 1 provided 10 | std::pair<std::vector<int>, long long> transaction(p); | ^ In file included from /usr/include/c++/11/utility:70, from souvenirs.h:1, from souvenirs.cpp:1: /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 = std::vector<int>; _T2 = long long int]' 232 | _GLIBCXX_CONSTEXPR pair() | ^~~~ /usr/include/c++/11/bits/stl_pair.h:232:26: note: template argument deduction/substitution failed: souvenirs.cpp:10:77: note: candidate expects 0 arguments, 1 provided 10 | std::pair<std::vector<int>, long long> transaction(p); | ^ In file included from /usr/include/c++/11/utility:70, from souvenirs.h:1, from souvenirs.cpp:1: /usr/include/c++/11/bits/stl_pair.h:315:17: note: candidate: 'std::pair<_T1, _T2>::pair(std::pair<_T1, _T2>&&) [with _T1 = std::vector<int>; _T2 = long long int]' 315 | constexpr pair(pair&&) = default; ///< Move constructor | ^~~~ /usr/include/c++/11/bits/stl_pair.h:315:22: note: no known conversion for argument 1 from 'long long int' to 'std::pair<std::vector<int>, long long int>&&' 315 | constexpr pair(pair&&) = default; ///< Move constructor | ^~~~~~ /usr/include/c++/11/bits/stl_pair.h:314:17: note: candidate: 'std::pair<_T1, _T2>::pair(const std::pair<_T1, _T2>&) [with _T1 = std::vector<int>; _T2 = long long int]' 314 | constexpr pair(const pair&) = default; ///< Copy constructor | ^~~~ /usr/include/c++/11/bits/stl_pair.h:314:22: note: no known conversion for argument 1 from 'long long int' to 'const std::pair<std::vector<int>, long long int>&' 314 | constexpr pair(const pair&) = default; ///< Copy constructor | ^~~~~~~~~~~