记录详情

Compile Error

/in/foo.cc: In function 'void get_hash()':
/in/foo.cc:22:9: error: reference to 'hash' is ambiguous
         hash[i]=hash[i-1]*P+s[i]-'a';
         ^~~~
/in/foo.cc:16:5: note: candidates are: long long unsigned int hash [500010]
 ull hash[N],base[N];
     ^~~~
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:3:
/usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
/in/foo.cc:22:17: error: reference to 'hash' is ambiguous
         hash[i]=hash[i-1]*P+s[i]-'a';
                 ^~~~
/in/foo.cc:16:5: note: candidates are: long long unsigned int hash [500010]
 ull hash[N],base[N];
     ^~~~
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:3:
/usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
/in/foo.cc: In function 'void check(int, int, int)':
/in/foo.cc:27:14: error: reference to 'hash' is ambiguous
     ull has1=hash[y-t]-hash[x-1]*base[y-x+1-t];
              ^~~~
/in/foo.cc:16:5: note: candidates are: long long unsigned int hash [500010]
 ull hash[N],base[N];
     ^~~~
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:3:
/usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
/in/foo.cc:27:24: error: reference to 'hash' is ambiguous
     ull has1=hash[y-t]-hash[x-1]*base[y-x+1-t];
                        ^~~~
/in/foo.cc:16:5: note: candidates are: long long unsigned int hash [500010]
 ull hash[N],base[N];
     ^~~~
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:3:
/usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
/in/foo.cc:28:14: error: reference to 'hash' is ambiguous
     ull has2=hash[y]-hash[x+t-1]*base[y-x+1-t];
              ^~~~
/in/foo.cc:16:5: note: candidates are: long long unsigned int hash [500010]
 ull hash[N],base[N];
     ^~~~
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:3:
/usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
/in/foo.cc:28:22: error: reference to 'hash' is ambiguous
     ull has2=hash[y]-hash[x+t-1]*base[y-x+1-t];
                      ^~~~
/in/foo.cc:16:5: note: candidates are: long long unsigned int hash [500010]
 ull hash[N],base[N];
     ^~~~
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:3:
/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:32:14: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
     n=read();gets(s+1);m=read();
              ^~~~
In file included from /usr/include/c++/6/cstdio:42:0,
                 from /in/foo.cc:1:
/usr/include/stdio.h:640:14: note: declared here
 extern char *gets (char *__s) __wur __attribute_deprecated__;
              ^~~~
/in/foo.cc:32:22: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
     n=read();gets(s+1);m=read();
                      ^
In file included from /usr/include/c++/6/cstdio:42:0,
                 from /in/foo.cc:1:
/usr/include/stdio.h:640:14: note: declared here
 extern char *gets (char *__s) __wur __attribute_deprecated__;
              ^~~~

信息

递交者
类型
递交
题目
A Horrible Poem
题目数据
下载
语言
C++
递交时间
2018-09-05 21:43:58
评测时间
2018-09-05 21:43:58
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes