0_0_38510766_31911.cpp: In function 'void solve()':
0_0_38510766_31911.cpp:16:62: error: wrong number of template arguments (0, should be 1)
priority_queue<array<int, 2>, vector<array<int, 2>>, greater<>> q1;
^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:48:0,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/locale_classes.h:40,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/ios_base.h:41,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:42,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/istream:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/sstream:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/complex:45,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/ccomplex:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:52,
from 0_0_38510766_31911.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_function.h:358:12: error: provided for 'template<class _Tp> struct std::greater'
struct greater : public binary_function<_Tp, _Tp, bool>
^
0_0_38510766_31911.cpp:16:63: error: template argument 3 is invalid
priority_queue<array<int, 2>, vector<array<int, 2>>, greater<>> q1;
^
0_0_38510766_31911.cpp:16:68: error: invalid type in declaration before ';' token
priority_queue<array<int, 2>, vector<array<int, 2>>, greater<>> q1;
^
0_0_38510766_31911.cpp:17:42: error: wrong number of template arguments (0, should be 1)
priority_queue<int, vector<int>, greater<>> q2;
^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:48:0,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/locale_classes.h:40,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/ios_base.h:41,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:42,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/istream:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/sstream:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/complex:45,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/ccomplex:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:52,
from 0_0_38510766_31911.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_function.h:358:12: error: provided for 'template<class _Tp> struct std::greater'
struct greater : public binary_function<_Tp, _Tp, bool>
^
0_0_38510766_31911.cpp:17:43: error: template argument 3 is invalid
priority_queue<int, vector<int>, greater<>> q2;
^
0_0_38510766_31911.cpp:17:48: error: invalid type in declaration before ';' token
priority_queue<int, vector<int>, greater<>> q2;
^
0_0_38510766_31911.cpp:19:8: error: expected unqualified-id before '[' token
auto [s, t] = a[i];
^
0_0_38510766_31911.cpp:20:6: error: request for member 'push' in 'q1', which is of non-class type 'int'
q1.push({s + t, i});
^
0_0_38510766_31911.cpp:20:12: error: 's' was not declared in this scope
q1.push({s + t, i});
^
0_0_38510766_31911.cpp:20:16: error: 't' was not declared in this scope
q1.push({s + t, i});
^
0_0_38510766_31911.cpp:26:10: error: request for member 'empty' in 'q2', which is of non-class type 'int'
if (q2.empty()) {
^
0_0_38510766_31911.cpp:27:9: error: expected unqualified-id before '[' token
auto [t, id] = q1.top();
^
0_0_38510766_31911.cpp:28:7: error: request for member 'pop' in 'q1', which is of non-class type 'int'
q1.pop();
^
0_0_38510766_31911.cpp:30:10: error: 't' was not declared in this scope
ans = t;
^
0_0_38510766_31911.cpp:32:14: error: 'id' was not declared in this scope
if (l == id) {
^
0_0_38510766_31911.cpp:36:8: error: request for member 'push' in 'q2', which is of non-class type 'int'
q2.push(a[l][1]);
^
0_0_38510766_31911.cpp:39:15: error: request for member 'empty' in 'q1', which is of non-class type 'int'
while (!q1.empty() && q1.top()[1] < l) {
^
0_0_38510766_31911.cpp:39:29: error: request for member 'top' in 'q1', which is of non-class type 'int'
while (!q1.empty() && q1.top()[1] < l) {
^
0_0_38510766_31911.cpp:40:8: error: request for member 'pop' in 'q1', which is of non-class type 'int'
q1.pop();
^
0_0_38510766_31911.cpp:42:17: error: request for member 'empty' in 'q1', which is of non-class type 'int'
} else if (q1.empty()) {
^
0_0_38510766_31911.cpp:44:14: error: request for member 'top' in 'q2', which is of non-class type 'int'
ans += q2.top();
^
0_0_38510766_31911.cpp:45:7: error: request for member 'pop' in 'q2', which is of non-class type 'int'
q2.pop();
^
0_0_38510766_31911.cpp:47:8: error: request for member 'push' in 'q2', which is of non-class type 'int'
q2.push(a[l][1]);
^
0_0_38510766_31911.cpp:50:15: error: request for member 'empty' in 'q1', which is of non-class type 'int'
while (!q1.empty() && q1.top()[1] < l) {
^
0_0_38510766_31911.cpp:50:29: error: request for member 'top' in 'q1', which is of non-class type 'int'
while (!q1.empty() && q1.top()[1] < l) {
^
0_0_38510766_31911.cpp:51:8: error: request for member 'pop' in 'q1', which is of non-class type 'int'
q1.pop();
^
0_0_38510766_31911.cpp:53:17: error: request for member 'top' in 'q1', which is of non-class type 'int'
} else if (q1.top()[0] < q2.top() + ans) {
^
0_0_38510766_31911.cpp:53:31: error: request for member 'top' in 'q2', which is of non-class type 'int'
} else if (q1.top()[0] < q2.top() + ans) {
^
0_0_38510766_31911.cpp:54:9: error: expected unqualified-id before '[' token
auto [t, id] = q1.top();
^
0_0_38510766_31911.cpp:55:7: error: request for member 'pop' in 'q1', which is of non-class type 'int'
q1.pop();
^
0_0_38510766_31911.cpp:57:10: error: 't' was not declared in this scope
ans = t;
^
0_0_38510766_31911.cpp:59:14: error: 'id' was not declared in this scope
if (l == id) {
^
0_0_38510766_31911.cpp:63:8: error: request for member 'push' in 'q2', which is of non-class type 'int'
q2.push(a[l][1]);
^
0_0_38510766_31911.cpp:66:15: error: request for member 'empty' in 'q1', which is of non-class type 'int'
while (!q1.empty() && q1.top()[1] < l) {
^
0_0_38510766_31911.cpp:66:29: error: request for member 'top' in 'q1', which is of non-class type 'int'
while (!q1.empty() && q1.top()[1] < l) {
^
0_0_38510766_31911.cpp:67:8: error: request for member 'pop' in 'q1', which is of non-class type 'int'
q1.pop();
^
0_0_38510766_31911.cpp:71:14: error: request for member 'top' in 'q2', which is of non-class type 'int'
ans += q2.top();
^
0_0_38510766_31911.cpp:72:7: error: request for member 'pop' in 'q2', which is of non-class type 'int'
q2.pop();
^
0_0_38510766_31911.cpp:74:8: error: request for member 'push' in 'q2', which is of non-class type 'int'
q2.push(a[l][1]);
^
0_0_38510766_31911.cpp:77:15: error: request for member 'empty' in 'q1', which is of non-class type 'int'
while (!q1.empty() && q1.top()[1] < l) {
^
0_0_38510766_31911.cpp:77:29: error: request for member 'top' in 'q1', which is of non-class type 'int'
while (!q1.empty() && q1.top()[1] < l) {
^
0_0_38510766_31911.cpp:78:8: error: request for member 'pop' in 'q1', which is of non-class type 'int'
q1.pop();
^
|