Problem potatosalad
User JcYong
Submission Time 2024-06-20 09:38:30
Score 0
Max Time N/A
Max Memory N/A

Compile Error

potatosalad.cpp: In function ‘int main()’:
potatosalad.cpp:11:9: error: no match for ‘operator[]’ (operand types are ‘std::priority_queue<int>’ and ‘int’)
11 | chosen[i] = mass;
| ^
potatosalad.cpp:14:3: error: ‘a’ was not declared in this scope
14 | a += chosen[j];
| ^
potatosalad.cpp:14:14: error: no match for ‘operator[]’ (operand types are ‘std::priority_queue<int>’ and ‘int’)
14 | a += chosen[j];
| ^
potatosalad.cpp:16:10: error: ‘a’ was not declared in this scope
16 | cout << a;
| ^