Problem | snowball |
---|---|
User | Henries |
Submission Time | 2024-10-08 11:24:15 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
snowball.cpp: In function ‘void solve(std::priority_queue<long long int>, long long int)’:
snowball.cpp:5:12: error: assignment of read-only location ‘pq.std::priority_queue<long long int>::top()’
5 | pq.top() += 1;
| ~~~~~~~~~^~~~
snowball.cpp:9:13: error: invalid use of member function ‘std::priority_queue<_Tp, _Sequence, _Compare>::const_reference std::priority_queue<_Tp, _Sequence, _Compare>::top() const [with _Tp = long long int; _Sequence = std::vector<long long int, std::allocator<long long int> >; _Compare = std::less<long long int>; std::priority_queue<_Tp, _Sequence, _Compare>::const_reference = const long long int&]’ (did you forget the ‘()’ ?)
9 | ans += pq.top * pq.top();
| ~~~^~~
| ()
snowball.cpp: In function ‘int main()’:
snowball.cpp:21:11: error: ‘top’ was not declared in this scope
21 | pq.push(top);
| ^~~
sn