foo.cc: In function 'int main()':
foo.cc:27:7: error: reference to 'hash' is ambiguous
if(hash[j]==0){
^~~~
foo.cc:4:5: note: candidates are: int hash [5000001]
int hash[5000001];
^~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6587: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/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from foo.cc:1:
/usr/include/c++/7/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^~~~
foo.cc:29:5: error: reference to 'hash' is ambiguous
hash[j]=1;
^~~~
foo.cc:4:5: note: candidates are: int hash [5000001]
int hash[5000001];
^~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6587: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/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from foo.cc:1:
/usr/include/c++/7/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^~~~
foo.cc:35:8: error: reference to 'hash' is ambiguous
if(hash[k]==0){
^~~~
foo.cc:4:5: note: candidates are: int hash [5000001]
int hash[5000001];
^~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6587: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/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from foo.cc:1:
/usr/include/c++/7/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^~~~
foo.cc:36:6: error: reference to 'hash' is ambiguous
hash[k]=1;
^~~~
foo.cc:4:5: note: candidates are: int hash [5000001]
int hash[5000001];
^~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6587: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/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from foo.cc:1:
/usr/include/c++/7/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^~~~
[Hydro](https://hydro.ac)提供评测服务