longesttrip.cpp: In function 'std::vector<int> longest_trip(int, int)':
longesttrip.cpp:52:38: error: 'b' was not declared in this scope
52 | else if (query({i}, {b.back()}))b.pb(i);
| ^
longesttrip.cpp:52:31: error: could not convert '{<expression error>}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
52 | else if (query({i}, {b.back()}))b.pb(i);
| ~~~~~^~~~~~~~~~~~~~~~~
| |
| <brace-enclosed initializer list>
longesttrip.cpp:58:20: error: 'i' was not declared in this scope
58 | if (query({i}, {a.back()}))a.pb(i);
| ^
longesttrip.cpp:58:18: error: could not convert '{<expression error>}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
58 | if (query({i}, {a.back()}))a.pb(i);
| ~~~~~^~~~~~~~~~~~~~~~~
| |
| <brace-enclosed initializer list>
longesttrip.cpp:59:30: error: 'b' was not declared in this scope
59 | else if (query({i}, {b.back()}))b.pb(i);
| ^
longesttrip.cpp:59:23: error: could not convert '{i}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
59 | else if (query({i}, {b.back()}))b.pb(i);
| ~~~~~^~~~~~~~~~~~~~~~~
| |
| <brace-enclosed initializer list>
longesttrip.cpp:64:13: error: 'b' was not declared in this scope
64 | if (b.size()>a.size())swap(a, b);
| ^
longesttrip.cpp:65:32: error: 'b' was not declared in this scope
65 | if (query({a.back()}, {b.back()})){
| ^
longesttrip.cpp:65:18: error: could not convert '{<expression error>}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
65 | if (query({a.back()}, {b.back()})){
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
| |
| <brace-enclosed initializer list>
longesttrip.cpp:68:23: error: could not convert '{<expression error>}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
68 | else if (query({a.back()}, {b[0]})){
| ~~~~~^~~~~~~~~~~~~~~~~~~~
| |
| <brace-enclosed initializer list>
longesttrip.cpp:71:23: error: could not convert '{<expression error>}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
71 | else if (query({a[0]}, {b.back()})){
| ~~~~~^~~~~~~~~~~~~~~~~~~~
| |
| <brace-enclosed initializer list>
longesttrip.cpp:74:23: error: could not convert '{<expression error>}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
74 | else if (query({a[0]}, {b[0]})){
| ~~~~~^~~~~~~~~~~~~~~~
| |
| <brace-enclosed initializer list>
longesttrip.cpp:80:39: error: could not convert '{<expression error>}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
80 | else if (query({i}, {b.back()}))b.pb(i);
| ~~~~~^~~~~~~~~~~~~~~~~
| |
| <brace-enclosed initializer list>