foo.cc: In function 'void push(int, int, int, int)':
foo.cc:44:8: error: reference to 'hash' is ambiguous
44 | if(vis[hash(x,y)])return;
| ^~~~
In file included from /usr/include/c++/9/bits/basic_string.h:6719,
from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from foo.cc:1:
/usr/include/c++/9/bits/functional_hash.h:58:12: note: candidates are: 'template<class _Tp> struct std::hash'
58 | struct hash;
| ^~~~
foo.cc:34:12: note: 'int hash(int, int)'
34 | inline int hash(int x,int y){
| ^~~~
foo.cc:45:5: error: reference to 'hash' is ambiguous
45 | vis[hash(x,y)]=1;
| ^~~~
In file included from /usr/include/c++/9/bits/basic_string.h:6719,
from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from foo.cc:1:
/usr/include/c++/9/bits/functional_hash.h:58:12: note: candidates are: 'template<class _Tp> struct std::hash'
58 | struct hash;
| ^~~~
foo.cc:34:12: note: 'int hash(int, int)'
34 | inline int hash(int x,int y){
| ^~~~
foo.cc:46:3: error: reference to 'hash' is ambiguous
46 | d[hash(x,y)]=d[hash(a,b)]+1;
| ^~~~
In file included from /usr/include/c++/9/bits/basic_string.h:6719,
from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from foo.cc:1:
/usr/include/c++/9/bits/functional_hash.h:58:12: note: candidates are: 'template<class _Tp> struct std::hash'
58 | struct hash;
| ^~~~
foo.cc:34:12: note: 'int hash(int, int)'
34 | inline int hash(int x,int y){
| ^~~~
foo.cc:46:16: error: reference to 'hash' is ambiguous
46 | d[hash(x,y)]=d[hash(a,b)]+1;
| ^~~~
In file included from /usr/include/c++/9/bits/basic_string.h:6719,
from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from foo.cc:1:
/usr/include/c++/9/bits/functional_hash.h:58:12: note: candidates are: 'template<class _Tp> struct std::hash'
58 | struct hash;
| ^~~~
foo.cc:34:12: note: 'int hash(int, int)'
34 | inline int hash(int x,int y){
| ^~~~
foo.cc: In function 'void bfs()':
foo.cc:52:19: error: reference to 'hash' is ambiguous
52 | int x=c.x,y=c.y,u=hash(x,y);
| ^~~~
In file included from /usr/include/c++/9/bits/basic_string.h:6719,
from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from foo.cc:1:
/usr/include/c++/9/bits/functional_hash.h:58:12: note: candidates are: 'template<class _Tp> struct std::hash'
58 | struct hash;
| ^~~~
foo.cc:34:12: note: 'int hash(int, int)'
34 | inline int hash(int x,int y){
| ^~~~
foo.cc:82:7: error: reference to 'hash' is ambiguous
82 | int v=hash(e1[i].x,e1[i].y);
| ^~~~
In file included from /usr/include/c++/9/bits/basic_string.h:6719,
from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from foo.cc:1:
/usr/include/c++/9/bits/functional_hash.h:58:12: note: candidates are: 'template<class _Tp> struct std::hash'
58 | struct hash;
| ^~~~
foo.cc:34:12: note: 'int hash(int, int)'
34 | inline int hash(int x,int y){
| ^~~~
foo.cc:89:7: error: reference to 'hash' is ambiguous
89 | int v=hash(e1[i].x,e1[i].y);
| ^~~~
In file included from /usr/include/c++/9/bits/basic_string.h:6719,
from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from foo.cc:1:
/usr/include/c++/9/bits/functional_hash.h:58:12: note: candidates are: 'template<class _Tp> struct std::hash'
58 | struct hash;
| ^~~~
foo.cc:34:12: note: 'int hash(int, int)'
34 | inline int hash(int x,int y){
| ^~~~
foo.cc:98:7: error: reference to 'hash' is ambiguous
98 | int v=hash(e2[i].x,e2[i].y);
| ^~~~
In file included from /usr/include/c++/9/bits/basic_string.h:6719,
from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from foo.cc:1:
/usr/include/c++/9/bits/functional_hash.h:58:12: note: candidates are: 'template<class _Tp> struct std::hash'
58 | struct hash;
| ^~~~
foo.cc:34:12: note: 'int hash(int, int)'
34 | inline int hash(int x,int y){
| ^~~~
foo.cc:106:7: error: reference to 'hash' is ambiguous
106 | int v=hash(e2[i].x,e2[i].y);
| ^~~~
In file included from /usr/include/c++/9/bits/basic_string.h:6719,
from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from foo.cc:1:
/usr/include/c++/9/bits/functional_hash.h:58:12: note: candidates are: 'template<class _Tp> struct std::hash'
58 | struct hash;
| ^~~~
foo.cc:34:12: note: 'int hash(int, int)'
34 | inline int hash(int x,int y){
| ^~~~
foo.cc: In function 'int main()':
foo.cc:120:3: error: reference to 'hash' is ambiguous
120 | d[hash(sx,sy)]=0;
| ^~~~
In file included from /usr/include/c++/9/bits/basic_string.h:6719,
from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from foo.cc:1:
/usr/include/c++/9/bits/functional_hash.h:58:12: note: candidates are: 'template<class _Tp> struct std::hash'
58 | struct hash;
| ^~~~
foo.cc:34:12: note: 'int hash(int, int)'
34 | inline int hash(int x,int y){
| ^~~~
foo.cc:121:5: error: reference to 'hash' is ambiguous
121 | vis[hash(sx,sy)]=1;
| ^~~~
In file included from /usr/include/c++/9/bits/basic_string.h:6719,
from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from foo.cc:1:
/usr/include/c++/9/bits/functional_hash.h:58:12: note: candidates are: 'template<class _Tp> struct std::hash'
58 | struct hash;
| ^~~~
foo.cc:34:12: note: 'int hash(int, int)'
34 | inline int hash(int x,int y){
| ^~~~
foo.cc:142:7: error: reference to 'hash' is ambiguous
142 | int v=hash(ex[i].x,ex[i].y);
| ^~~~
In file included from /usr/include/c++/9/bits/basic_string.h:6719,
from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from foo.cc:1:
/usr/include/c++/9/bits/functional_hash.h:58:12: note: candidates are: 'template<class _Tp> struct std::hash'
58 | struct hash;
| ^~~~
foo.cc:34:12: note: 'int hash(int, int)'
34 | inline int hash(int x,int y){
| ^~~~
foo.cc:118:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
118 | scanf("%d%d%d%d",&n,&m,&sx,&sy);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:125:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
125 | scanf("%d%d",&a,&b);
| ~~~~~^~~~~~~~~~~~~~
foo.cc:132:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
132 | scanf("%d%d",&a,&b);
| ~~~~~^~~~~~~~~~~~~~