Problem | fractional_knapsack |
---|---|
User | Henries |
Submission Time | 2024-11-17 20:30:38 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
fractional_knapsack.cpp: In function ‘int main()’:
fractional_knapsack.cpp:33:14: error: ‘num’ was not declared in this scope; did you mean ‘enum’?
33 | pq.push({v/num,w});
| ^~~
| enum
fractional_knapsack.cpp:33:20: error: no matching function for call to ‘std::priority_queue<std::pair<long long int, long long int> >::push(<brace-enclosed initializer list>)’
33 | pq.push({v/num,w});
| ^
In file included from /usr/include/c++/9/queue:64,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
from fractional_knapsack.cpp:1:
/usr/include/c++/9/bits/stl_queue.h:627:7: note: candidate: ‘void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::pair<long long int, long long int>; _Sequence = std::vector<std::pair<long long int, long long int>, std::allocator<std::pair<lo