QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#599634 | #5492. Toll Roads | Owstin | Compile Error | / | / | C++14 | 3.3kb | 2024-09-29 07:48:44 | 2024-09-29 07:48:44 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
详细
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:...