In file included from /usr/include/c++/7/map:60:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:81,
from flood.cpp:1:
/usr/include/c++/7/bits/stl_tree.h: In instantiation of 'struct std::_Rb_tree_key_compare<bool(int, int)>':
/usr/include/c++/7/bits/stl_tree.h:677:16: required from 'struct std::_Rb_tree<int, int, std::_Identity<int>, bool(int, int), std::allocator<int> >::_Rb_tree_impl<bool(int, int), false>'
/usr/include/c++/7/bits/stl_tree.h:708:31: required from 'class std::_Rb_tree<int, int, std::_Identity<int>, bool(int, int), std::allocator<int> >'
/usr/include/c++/7/bits/stl_set.h:123:17: required from 'class std::set<int, bool(int, int)>'
flood.cpp:31:27: required from here
/usr/include/c++/7/bits/stl_tree.h:144:21: error: field 'std::_Rb_tree_key_compare<bool(int, int)>::_M_key_compare' invalidly declared function type
_Key_compare _M_key_compare;
^~~~~~~~~~~~~~
/usr/include/c++/7/bits/stl_tree.h: In instantiation of 'class std::_Rb_tree<int, int, std::_Identity<int>, bool(int, int), std::allocator<int> >':
/usr/include/c++/7/bits/stl_set.h:123:17: required from 'class std::set<int, bool(int, int)>'
flood.cpp:31:27: required from here
/usr/include/c++/7/bits/stl_tree.h:956:7: error: function returning a function
key_comp() const
^~~~~~~~
In file included from /usr/include/c++/7/set:61:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:87,
from flood.cpp:1:
/usr/include/c++/7/bits/stl_set.h: In instantiation of 'class std::set<int, bool(int, int)>':
flood.cpp:31:27: required from here
/usr/include/c++/7/bits/stl_set.h:317:7: error: function returning a function
key_comp() const
^~~~~~~~
/usr/include/c++/7/bits/stl_set.h:321:7: error: function returning a function
value_comp() const
^~~~~~~~~~
flood.cpp: In function 'int main()':
flood.cpp:131:36: error: too few arguments to function 'void go(int, int)'
go(*sortedWalls.begin());
^
flood.cpp:59:6: note: declared here
void go(int u, int dir) {
^~
flood.cpp:133:36: error: too few arguments to function 'void go(int, int)'
go(*sortedWalls.begin());
^
flood.cpp:59:6: note: declared here
void go(int u, int dir) {
^~
flood.cpp:147:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < ans.size(); i++) {
~~^~~~~~~~~~~~