QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#599634#5492. Toll RoadsOwstinCompile Error//C++143.3kb2024-09-29 07:48:442024-09-29 07:48:44

詳細信息

answer.code: In member function ‘bool DSU::unite(int, int, int)’:
answer.code:40:24: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
   40 |             for (auto &[idx, v]: que1[u]) {
      |                        ^
answer.code:40:40: error: no matching function for call to ‘begin(std::pair<int, int>&)’
   40 |             for (auto &[idx, v]: que1[u]) {
      |                                        ^
In file included from /usr/include/c++/13/bits/algorithmfwd.h:39,
                 from /usr/include/c++/13/bits/stl_algo.h:59,
                 from /usr/include/c++/13/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51,
                 from answer.code:1:
/usr/include/c++/13/initializer_list:88:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::begin(initializer_list<_Tp>)’
   88 |     begin(initializer_list<_Tp> __ils) noexcept
      |     ^~~~~
/usr/include/c++/13/initializer_list:88:5: note:   template argument deduction/substitution failed:
answer.code:40:40: note:   ‘std::pair<int, int>’ is not derived from ‘std::initializer_list<_Tp>’
   40 |             for (auto &[idx, v]: que1[u]) {
      |                                        ^
In file included from /usr/include/c++/13/string:53,
                 from /usr/include/c++/13/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:52:
/usr/include/c++/13/bits/range_access.h:52:5: note: candidate: ‘template<class _Container> decltype (__cont.begin()) std::begin(_Container&)’
   52 |     begin(_Container& __cont) -> decltype(__cont.begin())
      |     ^~~~~
/usr/include/c++/13/bits/range_access.h:52:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/range_access.h: In substitution of ‘template<class _Container> decltype (__cont.begin()) std::begin(_Container&) [with _Container = std::pair<int, int>]’:
answer.code:40:40:   required from here
/usr/include/c++/13/bits/range_access.h:52:50: error: ‘struct std::pair<int, int>’ has no member named ‘begin’
   52 |     begin(_Container& __cont) -> decltype(__cont.begin())
      |                                           ~~~~~~~^~~~~
/usr/include/c++/13/bits/range_access.h:63:5: note: candidate: ‘template<class _Container> decltype (__cont.begin()) std::begin(const _Container&)’
   63 |     begin(const _Container& __cont) -> decltype(__cont.begin())
      |     ^~~~~
/usr/include/c++/13/bits/range_access.h:63:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/range_access.h: In substitution of ‘template<class _Container> decltype (__cont.begin()) std::begin(const _Container&) [with _Container = std::pair<int, int>]’:
answer.code:40:40:   required from here
/usr/include/c++/13/bits/range_access.h:63:56: error: ‘const struct std::pair<int, int>’ has no member named ‘begin’
   63 |     begin(const _Container& __cont) -> decltype(__cont.begin())
      |                                                 ~~~~~~~^~~~~
/usr/include/c++/13/bits/range_access.h:95:5: note: candidate: ‘template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::begin(_Tp (&)[_Nm])’
   95 |     begin(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~~~
/usr/include/c++/13/bits/range_access.h:95:5: note:   template argument deduction/substitution failed:
answer.code:40:40: note:   mismatched types ‘_Tp [_Nm]’ and ‘std::pair<int, int>’
   40 |             for (auto &[idx, v]: que1[u]) {
      |                                        ^
In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:166:
/usr/include/c++/13/valarray:1221:5: note: candidate: ‘template<class _Tp> _Tp* std::begin(valarray<_Tp>&)’
 1221 |     begin(valarray<_Tp>& __va) noexcept
      |     ^~~~~
/usr/include/c++/13/valarray:1221:5: note:   template argument deduction/substitution failed:
answer.code:40:40: note:   ‘std::pair<int, int>’ is not derived from ‘std::valarray<_Tp>’
   40 |             for (auto &[idx, v]: que1[u]) {
      |                                        ^
/usr/include/c++/13/valarray:1232:5: note: candidate: ‘template<class _Tp> const _Tp* std::begin(const valarray<_Tp>&)’
 1232 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
/usr/include/c++/13/valarray:1232:5: note:   template argument deduction/substitution failed:
answer.code:40:40: note:   ‘std::pair<int, int>’ is not derived from ‘const std::valarray<_Tp>’
   40 |             for (auto &[idx, v]: que1[u]) {
      |                                        ^
answer.code:40:40: error: no matching function for call to ‘end(std::pair<int, int>&)’
/usr/include/c++/13/initializer_list:99:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)’
   99 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
/usr/include/c++/13/initializer_list:99:5: note:   template argument deduction/substitution failed:
answer.code:40:40: note:...