记录详情

Compile Error

/in/foo.cc: In function 'bool check(int)':
/in/foo.cc:27:13: error: reference to 'hash' is ambiguous
         if((hash[i]-(hash[i-x]*cc)%mod+mod)%mod!=hash[x])
             ^~~~
/in/foo.cc:11:4: note: candidates are: ll hash [1001000]
 ll hash[1001000];
    ^~~~
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:27:22: error: reference to 'hash' is ambiguous
         if((hash[i]-(hash[i-x]*cc)%mod+mod)%mod!=hash[x])
                      ^~~~
/in/foo.cc:11:4: note: candidates are: ll hash [1001000]
 ll hash[1001000];
    ^~~~
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:27:50: error: reference to 'hash' is ambiguous
         if((hash[i]-(hash[i-x]*cc)%mod+mod)%mod!=hash[x])
                                                  ^~~~
/in/foo.cc:11:4: note: candidates are: ll hash [1001000]
 ll hash[1001000];
    ^~~~
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:46:13: error: reference to 'hash' is ambiguous
             hash[i]=(hash[i-1]*k+s[i])%mod;
             ^~~~
/in/foo.cc:11:4: note: candidates are: ll hash [1001000]
 ll hash[1001000];
    ^~~~
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:46:22: error: reference to 'hash' is ambiguous
             hash[i]=(hash[i-1]*k+s[i])%mod;
                      ^~~~
/in/foo.cc:11:4: note: candidates are: ll hash [1001000]
 ll hash[1001000];
    ^~~~
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;
            ^~~~

信息

递交者
类型
递交
题目
Power Strings
题目数据
下载
语言
C++
递交时间
2018-08-21 21:52:38
评测时间
2018-08-21 21:52:38
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes