QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#584254 | #7700. Split Decisions | ZhangYiDe | Compile Error | / | / | C++20 | 1.2kb | 2024-09-23 10:56:40 | 2024-09-23 10:56:41 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
详细
answer.code: In function ‘int main()’: answer.code:55:60: error: expected ‘}’ before ‘)’ token 55 | mp[{(s1,s2),(len,k))]++; | ~ ^ answer.code:55:60: error: expected ‘]’ before ‘)’ token 55 | mp[{(s1,s2),(len,k))]++; | ^ | ] answer.code:55:43: error: no match for ‘operator[]’ (operand types are ‘std::map<std::pair<std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >, std::pair<long long int, long long int> >, long long int>’ and ‘<brace-enclosed initializer list>’) 55 | mp[{(s1,s2),(len,k))]++; | ^ In file included from /usr/include/c++/13/map:63, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:152, from answer.code:1: /usr/include/c++/13/bits/stl_map.h:504:7: note: candidate: ‘std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::pair<std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >, std::pair<long long int, long long int> >; _Tp = long long int; _Compare = std::less<std::pair<std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >, std::pair<long long int, long long int> > >; _Alloc = std::allocator<std::pair<const std::pair<std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >, std::pair<long long int, long long int> >, long long int> >; mapped_type = long long int; key_type = std::pair<std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >, std::pair<long long int, long long int> >]’ 504 | operator[](const key_type& __k) | ^~~~~~~~ /usr/include/c++/13/bits/stl_map.h:504:34: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const std::map<std::pair<std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >, std::pair<long long int, long long int> >, long long int>::key_type&’ {aka ‘const std::pair<std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >, std::pair<long long int, long long int> >&’} 504 | operator[](const key_type& __k) | ~~~~~~~~~~~~~~~~^~~ /usr/include/c++/13/bits/stl_map.h:524:7: note: candidate: ‘std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = std::pair<std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >, std::pair<long long int, long long int> >; _Tp = long long int; _Compare = std::less<std::pair<std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >, std::pair<long long int, long long int> > >; _Alloc = std::allocator<std::pair<const std::pair<std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >, std::pair<long long int, long long int> >, long long int> >; mapped_type = long long int; key_type = std::pair<std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >, std::pair<long long int, long long int> >]’ 524 | operator[](key_type&& __k) | ^~~~~~~~ /usr/include/c++/13/bits/stl_map.h:524:29: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘std::map<std::pair<std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >, std::pair<long long int, long long int> >, long long int>::key_type&&’ {aka ‘std::pair<std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >, std::pair<long long int, long long int> >&&’} 524 | operator[](key_type&& __k) | ~~~~~~~~~~~^~~