| Problem | contestcalc |
|---|---|
| User | Leeyee |
| Submission Time | 2026-02-13 17:20:49 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
contestcalc.cpp: In function ‘int main()’:
contestcalc.cpp:11:4: error: no match for ‘operator[]’ (operand types are ‘std::unordered_map<int, std::__cxx11::basic_string<char> >’ and ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’})
11 | m[name] = score;
| ^
In file included from /usr/include/c++/9/unordered_map:47,
from /usr/include/c++/9/functional:61,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from contestcalc.cpp:1:
/usr/include/c++/9/bits/unordered_map.h:985:7: note: candidate: ‘std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type&) [with _Key = int; _Tp = std::__cxx11::basic_string<char>; _Hash = std::hash<int>