Problem lightningrod
User YH
Submission Time 2024-02-11 09:55:46
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lightningrod.cpp: In function ‘int main()’:
lightningrod.cpp:32:24: error: no match for ‘operator[]’ (operand types are ‘std::pair<char, int>’ and ‘int’)
32 | if (highest_building[1] - abs(stoi(highest_building[0]) - ((int) buildings[a].first) - 48) >= buildings[a].second) {
| ^
lightningrod.cpp:32:55: error: no match for ‘operator[]’ (operand types are ‘std::pair<char, int>’ and ‘int’)
32 | if (highest_building[1] - abs(stoi(highest_building[0]) - ((int) buildings[a].first) - 48) >= buildings[a].second) {
| ^
lightningrod.cpp:33:22: error: no matching function for call to ‘std::vector<std::pair<char, int> >::erase(int&)’
33 | buildings.erase(a);
| ^
In file included from /usr/include/c++/9/vector:67,
from lightningrod.cpp:2:
/usr/include/c++/9/bits/stl_vector.h:1427:7: n