QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#319142 | #8177. Sum is Integer | ucup-team598 | Compile Error | / | / | C++23 | 1.4kb | 2024-02-01 22:55:17 | 2024-02-01 22:55:19 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
answer.code: In function ‘int main()’: answer.code:60:43: error: conversion from ‘array<[...],2>’ to non-scalar type ‘array<[...],10>’ requested 60 | array<long long , 10> c = cur ; | ^~~ answer.code:62:26: error: no match for ‘operator[]’ (operand types are ‘std::map<std::array<long long int, 2>, int>’ and ‘std::array<long long int, 10>’) 62 | ans += mp[c] ++ ; | ^ 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:4: /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::array<long long int, 2>; _Tp = int; _Compare = std::less<std::array<long long int, 2> >; _Alloc = std::allocator<std::pair<const std::array<long long int, 2>, int> >; mapped_type = int; key_type = std::array<long long int, 2>]’ 504 | operator[](const key_type& __k) | ^~~~~~~~ /usr/include/c++/13/bits/stl_map.h:504:34: note: no known conversion for argument 1 from ‘std::array<long long int, 10>’ to ‘const std::map<std::array<long long int, 2>, int>::key_type&’ {aka ‘const std::array<long long int, 2>&’} 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::array<long long int, 2>; _Tp = int; _Compare = std::less<std::array<long long int, 2> >; _Alloc = std::allocator<std::pair<const std::array<long long int, 2>, int> >; mapped_type = int; key_type = std::array<long long int, 2>]’ 524 | operator[](key_type&& __k) | ^~~~~~~~ /usr/include/c++/13/bits/stl_map.h:524:29: note: no known conversion for argument 1 from ‘std::array<long long int, 10>’ to ‘std::map<std::array<long long int, 2>, int>::key_type&&’ {aka ‘std::array<long long int, 2>&&’} 524 | operator[](key_type&& __k) | ~~~~~~~~~~~^~~