Problem mountainbridges
User aj
Submission Time 2025-02-21 18:44:48
Score 0
Max Time N/A
Max Memory N/A

Compile Error

mountainbridges.cpp: In function ‘int main()’:
mountainbridges.cpp:68:32: error: no match for ‘operator[]’ (operand types are ‘const std::set<int>’ and ‘int’)
68 | int u = indices[i], v = indices[j];
| ^
mountainbridges.cpp:71:21: error: ‘v’ was not declared in this scope
71 | if (v>0&&prefix_max[v - 1] > H[u]) continue;
| ^
mountainbridges.cpp:75:41: error: ‘v’ was not declared in this scope
75 | for (int k = u + 1; k < v; k++) {
| ^
mountainbridges.cpp:79:30: error: ‘v’ was not declared in this scope
79 | int length = v - u;
| ^
mountainbridges.cpp:83:52: error: no matching function for call to ‘std::vector<std::pair<int, int> >::push_back(<brace-enclosed initializer list>)’
83 |