Problem swords
User boomphcoding
Submission Time 2024-01-29 16:27:12
Score 0
Max Time N/A
Max Memory N/A

Compile Error

swords.cpp: In function ‘int main()’:
swords.cpp:19:25: error: request for member ‘first’ in ‘swords.std::map<int, int>::operator[](i)’, which is of non-class type ‘std::map<int, int>::mapped_type’ {aka ‘int’}
19 | int key = swords[i].first;
| ^~~~~
swords.cpp:20:27: error: request for member ‘second’ in ‘swords.std::map<int, int>::operator[](i)’, which is of non-class type ‘std::map<int, int>::mapped_type’ {aka ‘int’}
20 | int value = swords[i].second;
| ^~~~~~