/in/foo.cc: In function 'int main()':
/in/foo.cc:32:13: error: reference to 'hash' is ambiguous
hash1[i]=(hash[i-1]*base+a[i])%mod;
^~~~
/in/foo.cc:22:14: note: candidates are: std::map<long long unsigned int, int> hash
map<ULL,int> hash;
^~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6385:0,
from /usr/include/c++/7/string:52,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/foo.cc:1:
/usr/include/c++/7/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^~~~
/in/foo.cc:36:3: error: reference to 'hash' is ambiguous
hash.clear();
^~~~
/in/foo.cc:22:14: note: candidates are: std::map<long long unsigned int, int> hash
map<ULL,int> hash;
^~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6385:0,
from /usr/include/c++/7/string:52,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/foo.cc:1:
/usr/include/c++/7/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^~~~
/in/foo.cc:42:8: error: reference to 'hash' is ambiguous
if(!hash.count(h1)||!hash.count(h2)){
^~~~
/in/foo.cc:22:14: note: candidates are: std::map<long long unsigned int, int> hash
map<ULL,int> hash;
^~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6385:0,
from /usr/include/c++/7/string:52,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/foo.cc:1:
/usr/include/c++/7/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^~~~
/in/foo.cc:42:25: error: reference to 'hash' is ambiguous
if(!hash.count(h1)||!hash.count(h2)){
^~~~
/in/foo.cc:22:14: note: candidates are: std::map<long long unsigned int, int> hash
map<ULL,int> hash;
^~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6385:0,
from /usr/include/c++/7/string:52,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/foo.cc:1:
/usr/include/c++/7/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^~~~
/in/foo.cc:44:5: error: reference to 'hash' is ambiguous
hash[h1]=1;
^~~~
/in/foo.cc:22:14: note: candidates are: std::map<long long unsigned int, int> hash
map<ULL,int> hash;
^~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6385:0,
from /usr/include/c++/7/string:52,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/foo.cc:1:
/usr/include/c++/7/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^~~~
/in/foo.cc:45:5: error: reference to 'hash' is ambiguous
hash[h2]=1;
^~~~
/in/foo.cc:22:14: note: candidates are: std::map<long long unsigned int, int> hash
map<ULL,int> hash;
^~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6385:0,
from /usr/include/c++/7/string:52,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/foo.cc:1:
/usr/include/c++/7/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^~~~
/in/foo.cc:54:34: warning: format '%d' expects argument of type 'int', but argument 3 has type 'std::vector<int>::size_type {aka long unsigned int}' [-Wformat=]
printf("%d %d\n",ans,ansk.size());
~~~~~~~~~~~^
/in/foo.cc:55:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<ansk.size();i++) printf("%d ",ansk[i]);
~^~~~~~~~~~~~