/ new_bzoj /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:32:13: error: reference to 'hash' is ambiguous
   hash1[i]=(hash[i-1]*base+a[i])%mod;
             ^~~~
/in/foo.cc:22:14: note: candidates are: std::map<long long unsigned int, int> hash
 map<ULL,int> hash;
              ^~~~
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/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 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:36:3: error: reference to 'hash' is ambiguous
   hash.clear();
   ^~~~
/in/foo.cc:22:14: note: candidates are: std::map<long long unsigned int, int> hash
 map<ULL,int> hash;
              ^~~~
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/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 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:42:8: error: reference to 'hash' is ambiguous
    if(!hash.count(h1)||!hash.count(h2)){
        ^~~~
/in/foo.cc:22:14: note: candidates are: std::map<long long unsigned int, int> hash
 map<ULL,int> hash;
              ^~~~
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/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 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:42:25: error: reference to 'hash' is ambiguous
    if(!hash.count(h1)||!hash.count(h2)){
                         ^~~~
/in/foo.cc:22:14: note: candidates are: std::map<long long unsigned int, int> hash
 map<ULL,int> hash;
              ^~~~
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/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 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:5: error: reference to 'hash' is ambiguous
     hash[h1]=1;
     ^~~~
/in/foo.cc:22:14: note: candidates are: std::map<long long unsigned int, int> hash
 map<ULL,int> hash;
              ^~~~
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/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 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:45:5: error: reference to 'hash' is ambiguous
     hash[h2]=1;
     ^~~~
/in/foo.cc:22:14: note: candidates are: std::map<long long unsigned int, int> hash
 map<ULL,int> hash;
              ^~~~
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/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 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:54:34: warning: format '%d' expects argument of type 'int', but argument 3 has type 'std::vector<int>::size_type {aka long unsigned int}' [-Wformat=]
  printf("%d %d\n",ans,ansk.size());
                       ~~~~~~~~~~~^
/in/foo.cc:55:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0;i<ansk.size();i++) printf("%d ",ansk[i]);
              ~^~~~~~~~~~~~

信息

递交者
类型
递交
题目
Beads
语言
C++
递交时间
2017-09-12 20:41:16
评测时间
2017-09-12 20:41:17
评测机
分数
0
总耗时
571ms
峰值内存
49.551 MiB