highway.cpp:5:8: error: 'pii' was not declared in this scope
5 | vector<pii> Edges;
| ^~~
highway.cpp:5:11: error: template argument 1 is invalid
5 | vector<pii> Edges;
| ^
highway.cpp:5:11: error: template argument 2 is invalid
highway.cpp:8:1: error: 'pii' does not name a type
8 | pii BlockedEdge;
| ^~~
highway.cpp: In function 'void FindBlockedEdge()':
highway.cpp:17:26: error: invalid initialization of reference of type 'const std::vector<int>&' from expression of type 'int [M]'
17 | int firstValue = ask(w);
| ^
In file included from highway.cpp:1:
highway.h:7:39: note: in passing argument 1 of 'long long int ask(const std::vector<int>&)'
7 | long long ask(const std::vector<int> &w);
| ~~~~~~~~~~~~~~~~~~~~~~~~^
highway.cpp:30:9: error: 'int64_t' was not declared in this scope
30 | int64_t result = ask(w);
| ^~~~~~~
highway.cpp:32:13: error: 'result' was not declared in this scope
32 | if (result < firstValue)
| ^~~~~~
highway.cpp:42:5: error: 'cout' was not declared in this scope
42 | cout << "Found (" << Edges[low].f << ", " << Edges[low].s << ")\n";
| ^~~~
highway.cpp:2:1: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
1 | #include "highway.h"
+++ |+#include <iostream>
2 | using namespace std;
highway.cpp:42:31: error: invalid types 'int[int]' for array subscript
42 | cout << "Found (" << Edges[low].f << ", " << Edges[low].s << ")\n";
| ^
highway.cpp:42:55: error: invalid types 'int[int]' for array subscript
42 | cout << "Found (" << Edges[low].f << ", " << Edges[low].s << ")\n";
| ^
highway.cpp: In function 'void find_pair(int, std::vector<int>, std::vector<int>, int, int)':
highway.cpp:54:15: error: request for member 'push_back' in 'Edges', which is of non-class type 'int'
54 | Edges.push_back({u[i], v[i]});
| ^~~~~~~~~
highway.cpp:60:5: error: reference to 'distance' is ambiguous
60 | distance = ask(w) / A;
| ^~~~~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:66,
from /usr/include/c++/10/vector:60,
from highway.h:3,
from highway.cpp:1:
/usr/include/c++/10/bits/stl_iterator_base_funcs.h:138:5: note: candidates are: 'template<class _InputIterator> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::distance(_InputIterator, _InputIterator)'
138 | distance(_InputIterator __first, _InputIterator __last)
| ^~~~~~~~
highway.cpp:6:5: note: 'int distance'
6 | int distance;
| ^~~~~~~~
highway.cpp:60:20: error: invalid initialization of reference of type 'const std::vector<int>&' from expression of type 'int [M]'
60 | distance = ask(w) / A;
| ^
In file included from highway.cpp:1:
highway.h:7:39: note: in passing argument 1 of 'long long int ask(const std::vector<int>&)'
7 | long long ask(const std::vector<int> &w);
| ~~~~~~~~~~~~~~~~~~~~~~~~^