Problem photo
User highdelao
Submission Time 2025-02-06 00:42:31
Score 0
Max Time N/A
Max Memory N/A

Compile Error

photo.cpp: In function ‘int main()’:
photo.cpp:44:13: error: ‘pointers’ was not declared in this scope
44 | if (pointers[class_idx] + 1 >= s) {
| ^~~~~~~~
photo.cpp:48:9: error: ‘pointers’ was not declared in this scope
48 | pointers[class_idx]++;
| ^~~~~~~~
photo.cpp:49:69: error: no matching function for call to ‘std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >::push(<brace-enclosed initializer list>)’
49 | pq.push({heights[class_idx][pointers[class_idx]], class_idx});
| ^
In file included from /usr/include/c++/9/queue:64,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
from photo.cpp:1:
/usr/include/c++/9/bits/stl_queue.h:627:7: note: candidate: ‘void std::