/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:20:3: error: reference to 'hash' is ambiguous
   hash[a%=b]=++p;
   ^~~~
/in/foo.cc:10:25: note: candidates are: int hash [1000005]
 int pre,cut,i,a,t=1,b,k,hash[1000005],p;
                         ^~~~
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:4:
/usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
/in/foo.cc:24:9: error: reference to 'hash' is ambiguous
  while(!hash[a%b]);
         ^~~~
/in/foo.cc:10:25: note: candidates are: int hash [1000005]
 int pre,cut,i,a,t=1,b,k,hash[1000005],p;
                         ^~~~
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:4:
/usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
/in/foo.cc:26:16: error: reference to 'hash' is ambiguous
  for(int j=1;j<hash[a%b];j++)
                ^~~~
/in/foo.cc:10:25: note: candidates are: int hash [1000005]
 int pre,cut,i,a,t=1,b,k,hash[1000005],p;
                         ^~~~
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:4:
/usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
/in/foo.cc:29:18: error: reference to 'hash' is ambiguous
  printf("%s",ans+hash[a%b]);
                  ^~~~
/in/foo.cc:10:25: note: candidates are: int hash [1000005]
 int pre,cut,i,a,t=1,b,k,hash[1000005],p;
                         ^~~~
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:4:
/usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~

信息

递交者
类型
自测
题目
P1748 进制转换
语言
C++
递交时间
2017-06-10 22:39:05
评测时间
2017-06-10 22:39:05
评测机
分数
0
总耗时
379ms
峰值内存
34.078 MiB