/in/foo.cc: In function 'int ins(int)':
/in/foo.cc:27:25: error: reference to 'hash' is ambiguous
for (int i=head[u];i;i=hash[i].next)
^~~~
/in/foo.cc:17:27: note: candidates are: ha hash [1800030]
struct ha{int v,next,rnk;}hash[3*N];bool operator <(const ha &a,const ha &b){return a.v<b.v;}
^~~~
In file included from /usr/include/c++/6/bits/basic_string.h:5643:0,
from /usr/include/c++/6/string:52,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:2:
/usr/include/c++/6/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^~~~
/in/foo.cc:28:8: error: reference to 'hash' is ambiguous
if (hash[i].v==w) return i;
^~~~
/in/foo.cc:17:27: note: candidates are: ha hash [1800030]
struct ha{int v,next,rnk;}hash[3*N];bool operator <(const ha &a,const ha &b){return a.v<b.v;}
^~~~
In file included from /usr/include/c++/6/bits/basic_string.h:5643:0,
from /usr/include/c++/6/string:52,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:2:
/usr/include/c++/6/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^~~~
/in/foo.cc:29:2: error: reference to 'hash' is ambiguous
hash[++cnt].v=w;
^~~~
/in/foo.cc:17:27: note: candidates are: ha hash [1800030]
struct ha{int v,next,rnk;}hash[3*N];bool operator <(const ha &a,const ha &b){return a.v<b.v;}
^~~~
In file included from /usr/include/c++/6/bits/basic_string.h:5643:0,
from /usr/include/c++/6/string:52,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:2:
/usr/include/c++/6/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^~~~
/in/foo.cc:30:2: error: reference to 'hash' is ambiguous
hash[cnt].next=head[u];
^~~~
/in/foo.cc:17:27: note: candidates are: ha hash [1800030]
struct ha{int v,next,rnk;}hash[3*N];bool operator <(const ha &a,const ha &b){return a.v<b.v;}
^~~~
In file included from /usr/include/c++/6/bits/basic_string.h:5643:0,
from /usr/include/c++/6/string:52,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:2:
/usr/include/c++/6/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^~~~
/in/foo.cc:31:2: error: reference to 'hash' is ambiguous
hash[cnt].rnk=cnt;
^~~~
/in/foo.cc:17:27: note: candidates are: ha hash [1800030]
struct ha{int v,next,rnk;}hash[3*N];bool operator <(const ha &a,const ha &b){return a.v<b.v;}
^~~~
In file included from /usr/include/c++/6/bits/basic_string.h:5643:0,
from /usr/include/c++/6/string:52,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:2:
/usr/include/c++/6/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:84:7: error: reference to 'hash' is ambiguous
sort(hash+1,hash+cnt+1);
^~~~
/in/foo.cc:17:27: note: candidates are: ha hash [1800030]
struct ha{int v,next,rnk;}hash[3*N];bool operator <(const ha &a,const ha &b){return a.v<b.v;}
^~~~
In file included from /usr/include/c++/6/bits/basic_string.h:5643:0,
from /usr/include/c++/6/string:52,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:2:
/usr/include/c++/6/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^~~~
/in/foo.cc:84:14: error: reference to 'hash' is ambiguous
sort(hash+1,hash+cnt+1);
^~~~
/in/foo.cc:17:27: note: candidates are: ha hash [1800030]
struct ha{int v,next,rnk;}hash[3*N];bool operator <(const ha &a,const ha &b){return a.v<b.v;}
^~~~
In file included from /usr/include/c++/6/bits/basic_string.h:5643:0,
from /usr/include/c++/6/string:52,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:2:
/usr/include/c++/6/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^~~~
/in/foo.cc:86:9: error: reference to 'hash' is ambiguous
from[hash[i].rnk]=i;
^~~~
/in/foo.cc:17:27: note: candidates are: ha hash [1800030]
struct ha{int v,next,rnk;}hash[3*N];bool operator <(const ha &a,const ha &b){return a.v<b.v;}
^~~~
In file included from /usr/include/c++/6/bits/basic_string.h:5643:0,
from /usr/include/c++/6/string:52,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:2:
/usr/include/c++/6/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^~~~
/in/foo.cc:101:22: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
printf("%I64d\n",ans);
^