QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#534669 | #4927. Bounded Spanning Tree | egypt_ioi2024_02# | Compile Error | / | / | C++20 | 943b | 2024-08-27 15:06:03 | 2024-08-27 15:06:04 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
详细
answer.code: In function ‘int main()’: answer.code:36:45: error: ‘a’ was not declared in this scope 36 | if (s.find({a[p][3], p}) != s.end()) { | ^ answer.code:36:43: error: no matching function for call to ‘std::set<std::array<int, 2> >::find(<brace-enclosed initializer list>)’ 36 | if (s.find({a[p][3], p}) != s.end()) { | ~~~~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/13/set:63, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:158, from answer.code:1: /usr/include/c++/13/bits/stl_set.h:806:9: note: candidate: ‘template<class _Kt> decltype (std::set<_Key, _Compare, _Alloc>::iterator{((std::set<_Key, _Compare, _Alloc>*)this)->std::set<_Key, _Compare, _Alloc>::_M_t._M_find_tr(__x)}) std::set<_Key, _Compare, _Alloc>::find(const _Kt&) [with _Key = std::array<int, 2>; _Compare = std::less<std::array<int, 2> >; _Alloc = std::allocator<std::array<int, 2> >]’ 806 | find(const _Kt& __x) | ^~~~ /usr/include/c++/13/bits/stl_set.h:806:9: note: template argument deduction/substitution failed: answer.code:36:43: note: couldn’t deduce template parameter ‘_Kt’ 36 | if (s.find({a[p][3], p}) != s.end()) { | ~~~~~~^~~~~~~~~~~~~~ /usr/include/c++/13/bits/stl_set.h:812:9: note: candidate: ‘template<class _Kt> decltype (std::set<_Key, _Compare, _Alloc>::const_iterator{((const std::set<_Key, _Compare, _Alloc>*)this)->std::set<_Key, _Compare, _Alloc>::_M_t._M_find_tr(__x)}) std::set<_Key, _Compare, _Alloc>::find(const _Kt&) const [with _Key = std::array<int, 2>; _Compare = std::less<std::array<int, 2> >; _Alloc = std::allocator<std::array<int, 2> >]’ 812 | find(const _Kt& __x) const | ^~~~ /usr/include/c++/13/bits/stl_set.h:812:9: note: template argument deduction/substitution failed: answer.code:36:43: note: couldn’t deduce template parameter ‘_Kt’ 36 | if (s.find({a[p][3], p}) != s.end()) { | ~~~~~~^~~~~~~~~~~~~~ /usr/include/c++/13/bits/stl_set.h:796:7: note: candidate: ‘std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::find(const key_type&) [with _Key = std::array<int, 2>; _Compare = std::less<std::array<int, 2> >; _Alloc = std::allocator<std::array<int, 2> >; iterator = std::_Rb_tree<std::array<int, 2>, std::array<int, 2>, std::_Identity<std::array<int, 2> >, std::less<std::array<int, 2> >, std::allocator<std::array<int, 2> > >::const_iterator; key_type = std::array<int, 2>]’ 796 | find(const key_type& __x) | ^~~~ /usr/include/c++/13/bits/stl_set.h:796:28: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const std::set<std::array<int, 2> >::key_type&’ {aka ‘const std::array<int, 2>&’} 796 | find(const key_type& __x) | ~~~~~~~~~~~~~~~~^~~ /usr/include/c++/13/bits/stl_set.h:800:7: note: candidate: ‘std::set<_Key, _Compare, _Alloc>::const_iterator std::set<_Key, _Compare, _Alloc>::find(const key_type&) const [with _Key = std::array<int, 2>; _Compare = std::less<std::array<int, 2> >; _Alloc = std::allocator<std::array<int, 2> >; const_iterator = std::_Rb_tree<std::array<int, 2>, std::array<int, 2>, std::_Identity<std::array<int, 2> >, std::less<std::array<int, 2> >, std::allocator<std::array<int, 2> > >::const_iterator; key_type = std::array<int, 2>]’ 800 | find(const key_type& __x) const | ^~~~ /usr/include/c++/13/bits/stl_set.h:800:28: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const std::set<std::array<int, 2> >::key_type&’ {aka ‘const std::array<int, 2>&’} 800 | find(const key_type& __x) const | ~~~~~~~~~~~~~~~~^~~ answer.code:37:48: error: no matching function for call to ‘std::set<std::array<int, 2> >::erase(<brace-enclosed initializer list>)’ 37 | s.erase({a[p][3], p}); | ~~~~~~~^~~~~~~~~~~~~~ /usr/include/c++/13/bits/stl_set.h:656:7: note: candidate: ‘std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::erase(const_iterator) [with _Key = std::array<int, 2>; _Compare = std::less<std::array<int, 2> >; _Alloc = std::allocator<std::array<int, 2> >; iterator = std::_Rb_tree<std::array<int, 2>, std::array<int, 2>, std::_Identity<std::array<int, 2> >, std::less<std::array<int, 2> >, std::allocator<std::array<int, 2> > >::const_iterator; const_iterator = std::_Rb_tree<std::array<int, 2>, std::array<int, 2>, std::_Identity<std::array<int, 2> >, std::less<std::array<int, 2> >, std::allocator<std::array<int, 2> > >::const_iterator]’ 656 | erase(const_iterator __position) | ^~~~~ /usr/in...