Problem | contestcalc |
---|---|
User | carson |
Submission Time | 2025-03-22 16:57:02 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
contestcalc.cpp: In function ‘int main()’:
contestcalc.cpp:7:14: error: wrong number of template arguments (1, should be at least 2)
7 | multimap<int> scores(n);
| ^
In file included from /usr/include/c++/9/map:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:81,
from contestcalc.cpp:1:
/usr/include/c++/9/bits/stl_map.h:72:11: note: provided for ‘template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap’
72 | class multimap;
| ^~~~~~~~
contestcalc.cpp:11:16: error: no match for ‘operator[]’ (operand types are ‘int’ and ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’})
11 | cin >> scores[x];
| ^
contestcalc.cpp:18:16: error: no match for ‘operator[]’ (operand types are ‘int’ and ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’})
18 | sum += scores[x];
|