/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'void dfs(int, int)':
/in/foo.cc:23:3: error: reference to 'hash' is ambiguous
   hash[x]^=hash[y];
   ^~~~
/in/foo.cc:9:4: note: candidates are: long long int hash [100005]
 LL hash[maxn],base[maxn];
    ^~~~
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/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 /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:23:12: error: reference to 'hash' is ambiguous
   hash[x]^=hash[y];
            ^~~~
/in/foo.cc:9:4: note: candidates are: long long int hash [100005]
 LL hash[maxn],base[maxn];
    ^~~~
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/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 /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:27:6: error: reference to 'hash' is ambiguous
     (hash[x]+=base[siz[x]])%=mod;
      ^~~~
/in/foo.cc:9:4: note: candidates are: long long int hash [100005]
 LL hash[maxn],base[maxn];
    ^~~~
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/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 /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:28:6: error: reference to 'hash' is ambiguous
     (hash[x]^=wxh)%=mod;
      ^~~~
/in/foo.cc:9:4: note: candidates are: long long int hash [100005]
 LL hash[maxn],base[maxn];
    ^~~~
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/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 /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:29:6: error: reference to 'hash' is ambiguous
     (hash[x]*=num)%=mod;
      ^~~~
/in/foo.cc:9:4: note: candidates are: long long int hash [100005]
 LL hash[maxn],base[maxn];
    ^~~~
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/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 /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: In function 'long long int solve()':
/in/foo.cc:35:21: error: reference to 'hash' is ambiguous
      head[i]=deg[i]=hash[i]=0;
                     ^~~~
/in/foo.cc:9:4: note: candidates are: long long int hash [100005]
 LL hash[maxn],base[maxn];
    ^~~~
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/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 /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:12: error: reference to 'hash' is ambiguous
     return hash[root];
            ^~~~
/in/foo.cc:9:4: note: candidates are: long long int hash [100005]
 LL hash[maxn],base[maxn];
    ^~~~
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/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 /in/foo.cc:1:
/usr/include/c++/7/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~

信息

递交者
类型
递交
题目
P1683 有根树的同构问题
语言
C++
递交时间
2018-10-29 16:36:18
评测时间
2018-10-29 16:36:18
评测机
分数
0
总耗时
1234ms
峰值内存
139.188 MiB