QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#778800 | #5268. Computer Network | GuanYunchang | Compile Error | / | / | C++11 | 1.0kb | 2024-11-24 16:22:16 | 2024-11-24 16:22:17 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
answer.code: In function ‘void solve()’: answer.code:17:45: error: wrong number of template arguments (0, should be 1) 17 | priority_queue<int, vector<int>, greater<>> q; | ^ In file included from /usr/include/c++/13/string:49, from /usr/include/c++/13/bitset:52, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:52, from answer.code:3: /usr/include/c++/13/bits/stl_function.h:393:12: note: provided for ‘template<class _Tp> struct std::greater’ 393 | struct greater : public binary_function<_Tp, _Tp, bool> | ^~~~~~~ answer.code:17:46: error: template argument 3 is invalid 17 | priority_queue<int, vector<int>, greater<>> q; | ^~ answer.code:21:15: error: request for member ‘push’ in ‘q’, which is of non-class type ‘int’ 21 | q.push(a[i]); | ^~~~ answer.code:23:22: error: request for member ‘top’ in ‘q’, which is of non-class type ‘int’ 23 | ans += q.top() + a[i]; | ^~~ answer.code:24:15: error: request for member ‘push’ in ‘q’, which is of non-class type ‘int’ 24 | q.push(q.top() + a[i]); | ^~~~ answer.code:24:22: error: request for member ‘top’ in ‘q’, which is of non-class type ‘int’ 24 | q.push(q.top() + a[i]); | ^~~ answer.code:25:15: error: request for member ‘pop’ in ‘q’, which is of non-class type ‘int’ 25 | q.pop(); | ^~~