flood.cpp:17:1: error: 'pr' does not name a type; did you mean 'pf'?
pr p[100005];
^~
pf
flood.cpp: In function 'int go(int, int)':
flood.cpp:42:24: error: 'struct std::pair<int, int>' has no member named 'y'
int vecin = ed.y;
^
flood.cpp:47:23: error: 'struct std::pair<int, int>' has no member named 'x'
ans.pb(ed.x);
^
flood.cpp: In function 'int main()':
flood.cpp:66:16: error: 'p' was not declared in this scope
cin >> p[i].fi >> p[i].se;
^
flood.cpp:67:23: error: no matching function for call to 'std::vector<std::pair<std::pair<int, int>, int> >::push_back(<brace-enclosed initializer list>)'
v.pb({p[i], i});
^
In file included from /usr/include/c++/7/vector:64:0,
from /usr/include/c++/7/queue:61,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:86,
from flood.cpp:1:
/usr/include/c++/7/bits/stl_vector.h:939:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<std::pair<int, int>, int>; _Alloc = std::allocator<std::pair<std::pair<int, int>, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<std::pair<int, int>, int>]
push_back(const value_type& __x)
^~~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:939:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const std::pair<std::pair<int, int>, int>&}'
/usr/include/c++/7/bits/stl_vector.h:953:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::pair<std::pair<int, int>, int>; _Alloc = std::allocator<std::pair<std::pair<int, int>, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<std::pair<int, int>, int>]
push_back(value_type&& __x)
^~~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:953:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<std::pair<std::pair<int, int>, int> >::value_type&& {aka std::pair<std::pair<int, int>, int>&&}'
flood.cpp:74:26: error: 'p' was not declared in this scope
mch[a][direction(p[a], p[b])].pb({i, b});
^
flood.cpp:78:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < v.size(); ++i)
~~^~~~~~~~~~
flood.cpp:81:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < ans.size(); ++i)
~~^~~~~~~~~~~~