Karosai (LMIO 2018/2019)
Taškai: 0
Compile: FAIL
karosai_vyr.cpp: In function ‘int main()’: karosai_vyr.cpp:19:77: error: wrong number of template arguments (0, should be 1) 19 | priority_queue<pair<long long,int>, vector<pair<long long,int>>, greater<>> pq; | ^ In file included from /usr/include/c++/11/string:48, from /usr/include/c++/11/bits/locale_classes.h:40, from /usr/include/c++/11/bits/ios_base.h:41, from /usr/include/c++/11/ios:42, from /usr/include/c++/11/istream:38, from /usr/include/c++/11/sstream:38, from /usr/include/c++/11/complex:45, from /usr/include/c++/11/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54, from karosai_vyr.cpp:1: /usr/include/c++/11/bits/stl_function.h:385:12: note: provided for ‘template<class _Tp> struct std::greater’ 385 | struct greater : public binary_function<_Tp, _Tp, bool> | ^~~~~~~ karosai_vyr.cpp:19:78: error: template argument 3 is invalid 19 | priority_queue<pair<long long,int>, vector<pair<long long,int>>, greater<>> pq; | ^~ karosai_vyr.cpp:22:8: error: request for member ‘push’ in ‘pq’, which is of non-class type ‘int’ 22 | pq.push({0, 1}); | ^~~~ karosai_vyr.cpp:24:16: error: request for member ‘empty’ in ‘pq’, which is of non-class type ‘int’ 24 | while (!pq.empty()) { | ^~~~~ karosai_vyr.cpp:25:14: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ 25 | auto [d, v] = pq.top(); | ^ karosai_vyr.cpp:25:26: error: request for member ‘top’ in ‘pq’, which is of non-class type ‘int’ 25 | auto [d, v] = pq.top(); | ^~~ karosai_vyr.cpp:26:12: error: request for member ‘pop’ in ‘pq’, which is of non-class type ‘int’ 26 | pq.pop(); | ^~~ karosai_vyr.cpp:30:19: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ 30 | for (auto [u, h] : adj[v]) { | ^ karosai_vyr.cpp:34:20: error: request for member ‘push’ in ‘pq’, which is of non-class type ‘int’ 34 | pq.push({nd, u}); | ^~~~
| nr. | result | time | message |
|---|
