Potvynis

Taškai: 0

Compile: FAIL

potvynis.cpp: In function ‘int main()’: potvynis.cpp:20:89: error: wrong number of template arguments (0, should be 1) 20 | priority_queue<pair<int, pair<int, int>>, vector<pair<int, pair<int, int>>>, greater<>>kai; | ^ 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 potvynis.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> | ^~~~~~~ potvynis.cpp:20:90: error: template argument 3 is invalid 20 | priority_queue<pair<int, pair<int, int>>, vector<pair<int, pair<int, int>>>, greater<>>kai; | ^~ potvynis.cpp:24:13: error: request for member ‘push’ in ‘kai’, which is of non-class type ‘int’ 24 | kai.push(temp); | ^~~~ potvynis.cpp:29:28: error: request for member ‘top’ in ‘kai’, which is of non-class type ‘int’ 29 | val = max(val, kai.top().first); | ^~~ potvynis.cpp:31:21: error: request for member ‘top’ in ‘kai’, which is of non-class type ‘int’ 31 | int x = kai.top().second.second; | ^~~ potvynis.cpp:32:21: error: request for member ‘top’ in ‘kai’, which is of non-class type ‘int’ 32 | int y = kai.top().second.first; | ^~~ potvynis.cpp:38:13: error: request for member ‘pop’ in ‘kai’, which is of non-class type ‘int’ 38 | kai.pop(); | ^~~ potvynis.cpp:41:17: error: request for member ‘push’ in ‘kai’, which is of non-class type ‘int’ 41 | kai.push(temp); | ^~~~ potvynis.cpp:45:17: error: request for member ‘push’ in ‘kai’, which is of non-class type ‘int’ 45 | kai.push(temp); | ^~~~ potvynis.cpp:49:17: error: request for member ‘push’ in ‘kai’, which is of non-class type ‘int’ 49 | kai.push(temp); | ^~~~ potvynis.cpp:53:17: error: request for member ‘push’ in ‘kai’, which is of non-class type ‘int’ 53 | kai.push(temp); | ^~~~

nr.resulttimemessage