friends.cpp: In function 'int main()':
friends.cpp:80:12: error: reference to 'hash' is ambiguous
ll h1 = hash(0,i-1);
^
friends.cpp:41:4: note: candidates are: ll hash(int, int)
ll hash(int l, int r)
^
In file included from /usr/include/c++/5/bits/basic_string.h:5471:0,
from /usr/include/c++/5/string:52,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/istream:38,
from /usr/include/c++/5/sstream:38,
from /usr/include/c++/5/complex:45,
from /usr/include/c++/5/ccomplex:38,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52,
from friends.cpp:1:
/usr/include/c++/5/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^
friends.cpp:81:12: error: reference to 'hash' is ambiguous
ll h2 = hash(i+1,l);
^
friends.cpp:41:4: note: candidates are: ll hash(int, int)
ll hash(int l, int r)
^
In file included from /usr/include/c++/5/bits/basic_string.h:5471:0,
from /usr/include/c++/5/string:52,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/istream:38,
from /usr/include/c++/5/sstream:38,
from /usr/include/c++/5/complex:45,
from /usr/include/c++/5/ccomplex:38,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52,
from friends.cpp:1:
/usr/include/c++/5/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^
friends.cpp:85:14: error: reference to 'hash' is ambiguous
if(h1 == (hash(l+1,n-1)*CMOD)%MOD)
^
friends.cpp:41:4: note: candidates are: ll hash(int, int)
ll hash(int l, int r)
^
In file included from /usr/include/c++/5/bits/basic_string.h:5471:0,
from /usr/include/c++/5/string:52,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/istream:38,
from /usr/include/c++/5/sstream:38,
from /usr/include/c++/5/complex:45,
from /usr/include/c++/5/ccomplex:38,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52,
from friends.cpp:1:
/usr/include/c++/5/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^
friends.cpp:102:7: error: reference to 'hash' is ambiguous
if(hash(0,l-1)==(hash(l+1,n-1)*CMOD)%MOD)
^
friends.cpp:41:4: note: candidates are: ll hash(int, int)
ll hash(int l, int r)
^
In file included from /usr/include/c++/5/bits/basic_string.h:5471:0,
from /usr/include/c++/5/string:52,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/istream:38,
from /usr/include/c++/5/sstream:38,
from /usr/include/c++/5/complex:45,
from /usr/include/c++/5/ccomplex:38,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52,
from friends.cpp:1:
/usr/include/c++/5/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^
friends.cpp:102:21: error: reference to 'hash' is ambiguous
if(hash(0,l-1)==(hash(l+1,n-1)*CMOD)%MOD)
^
friends.cpp:41:4: note: candidates are: ll hash(int, int)
ll hash(int l, int r)
^
In file included from /usr/include/c++/5/bits/basic_string.h:5471:0,
from /usr/include/c++/5/string:52,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/istream:38,
from /usr/include/c++/5/sstream:38,
from /usr/include/c++/5/complex:45,
from /usr/include/c++/5/ccomplex:38,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52,
from friends.cpp:1:
/usr/include/c++/5/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^
friends.cpp:119:12: error: reference to 'hash' is ambiguous
ll h1 = hash(l,i-1);
^
friends.cpp:41:4: note: candidates are: ll hash(int, int)
ll hash(int l, int r)
^
In file included from /usr/include/c++/5/bits/basic_string.h:5471:0,
from /usr/include/c++/5/string:52,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/istream:38,
from /usr/include/c++/5/sstream:38,
from /usr/include/c++/5/complex:45,
from /usr/include/c++/5/ccomplex:38,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52,
from friends.cpp:1:
/usr/include/c++/5/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^
friends.cpp:120:12: error: reference to 'hash' is ambiguous
ll h2 = hash(i+1,n-1);
^
friends.cpp:41:4: note: candidates are: ll hash(int, int)
ll hash(int l, int r)
^
In file included from /usr/include/c++/5/bits/basic_string.h:5471:0,
from /usr/include/c++/5/string:52,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/istream:38,
from /usr/include/c++/5/sstream:38,
from /usr/include/c++/5/complex:45,
from /usr/include/c++/5/ccomplex:38,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52,
from friends.cpp:1:
/usr/include/c++/5/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^
friends.cpp:123:7: error: reference to 'hash' is ambiguous
if(hash(0,l-1)==(h1*CMOD)%MOD)
^
friends.cpp:41:4: note: candidates are: ll hash(int, int)
ll hash(int l, int r)
^
In file included from /usr/include/c++/5/bits/basic_string.h:5471:0,
from /usr/include/c++/5/string:52,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/istream:38,
from /usr/include/c++/5/sstream:38,
from /usr/include/c++/5/complex:45,
from /usr/include/c++/5/ccomplex:38,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52,
from friends.cpp:1:
/usr/include/c++/5/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^