QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#172022#7178. Bishopsucup-team026#Compile Error//C++143.7kb2023-09-09 17:57:492023-09-09 17:57:49

Details

answer.code: In function ‘std::vector<std::pair<int, int> > solve(std::vector<std::tuple<int, int, int> >)’:
answer.code:15:24: error: no matching function for call to ‘get<0>(__gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int> >, std::tuple<int, int, int> >::value_type&)’
   15 |     int l = std::get<0>(v[0]);
      |             ~~~~~~~~~~~^~~~~~
In file included from answer.code:3:
/usr/include/c++/11/utility:223:5: note: candidate: ‘template<long unsigned int _Int, class _Tp1, class _Tp2> constexpr typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type& std::get(std::pair<_Tp1, _Tp2>&)’
  223 |     get(pair<_Tp1, _Tp2>& __in) noexcept
      |     ^~~
/usr/include/c++/11/utility:223:5: note:   template argument deduction/substitution failed:
answer.code:15:24: note:   ‘__gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int> >, std::tuple<int, int, int> >::value_type’ {aka ‘std::tuple<int, int, int>’} is not derived from ‘std::pair<_Tp1, _Tp2>’
   15 |     int l = std::get<0>(v[0]);
      |             ~~~~~~~~~~~^~~~~~
In file included from answer.code:3:
/usr/include/c++/11/utility:228:5: note: candidate: ‘template<long unsigned int _Int, class _Tp1, class _Tp2> constexpr typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type&& std::get(std::pair<_Tp1, _Tp2>&&)’
  228 |     get(pair<_Tp1, _Tp2>&& __in) noexcept
      |     ^~~
/usr/include/c++/11/utility:228:5: note:   template argument deduction/substitution failed:
answer.code:15:24: note:   ‘__gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int> >, std::tuple<int, int, int> >::value_type’ {aka ‘std::tuple<int, int, int>’} is not derived from ‘std::pair<_Tp1, _Tp2>’
   15 |     int l = std::get<0>(v[0]);
      |             ~~~~~~~~~~~^~~~~~
In file included from answer.code:3:
/usr/include/c++/11/utility:233:5: note: candidate: ‘template<long unsigned int _Int, class _Tp1, class _Tp2> constexpr const typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type& std::get(const std::pair<_Tp1, _Tp2>&)’
  233 |     get(const pair<_Tp1, _Tp2>& __in) noexcept
      |     ^~~
/usr/include/c++/11/utility:233:5: note:   template argument deduction/substitution failed:
answer.code:15:24: note:   ‘__gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int> >, std::tuple<int, int, int> >::value_type’ {aka ‘std::tuple<int, int, int>’} is not derived from ‘const std::pair<_Tp1, _Tp2>’
   15 |     int l = std::get<0>(v[0]);
      |             ~~~~~~~~~~~^~~~~~
In file included from answer.code:3:
/usr/include/c++/11/utility:238:5: note: candidate: ‘template<long unsigned int _Int, class _Tp1, class _Tp2> constexpr const typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type&& std::get(const std::pair<_Tp1, _Tp2>&&)’
  238 |     get(const pair<_Tp1, _Tp2>&& __in) noexcept
      |     ^~~
/usr/include/c++/11/utility:238:5: note:   template argument deduction/substitution failed:
answer.code:15:24: note:   ‘__gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int> >, std::tuple<int, int, int> >::value_type’ {aka ‘std::tuple<int, int, int>’} is not derived from ‘const std::pair<_Tp1, _Tp2>’
   15 |     int l = std::get<0>(v[0]);
      |             ~~~~~~~~~~~^~~~~~
In file included from answer.code:3:
/usr/include/c++/11/utility:247:5: note: candidate: ‘template<class _Tp, class _Up> constexpr _Tp& std::get(std::pair<_T1, _T2>&)’
  247 |     get(pair<_Tp, _Up>& __p) noexcept
      |     ^~~
/usr/include/c++/11/utility:247:5: note:   template argument deduction/substitution failed:
answer.code:15:24: error: type/value mismatch at argument 1 in template parameter list for ‘template<class _Tp, class _Up> constexpr _Tp& std::get(std::pair<_T1, _T2>&)’
   15 |     int l = std::get<0>(v[0]);
      |             ~~~~~~~~~~~^~~~~~
answer.code:15:24: note:   expected a type, got ‘0’
In file included from answer.code:3:
/usr/include/c++/11/utility:252:5: note: candidate: ‘template<class _Tp, class _Up> constexpr const _Tp& std::get(const std::pair<_T1, _T2>&)’
  252 |     get(const pair<_Tp, _Up>& __p) noexcept
      |     ^~~
/usr/include/c++/11/utility:252:5: note:   template argument deduction/substitution failed:
answer.code:15:24: error: type/value mismatch at argument 1 in template parameter list for ‘template<class _Tp, class _Up> constexpr const _Tp& std::get(const std::pair<_T1, _T2>&)’
   15 |     int l = std::get<0>(v[0]);
      |             ~~~~~~~~~~~^~~~~~
answer.code:15:24: note:   expected a type, got ‘0’
In file included from answer.code:3:
/usr/include/c++/11/utility:257:5: note: candidate: ‘template<class _Tp, class _Up> constexpr _Tp&& std::get(std::pair<_T1, _T2>&&)’
  257 |     get(pair<_Tp, _Up>&& __p) noexcept
      |     ^~~
/usr/include/c++/11/utility:257:5: note:   template argument deduction/substitution failed:
answer.code:15:24: error: type/value mismatch at argument 1 in template parameter list for ‘template<class _Tp, class _Up> constexpr _Tp&& std::get(std::pa...