/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:10:10: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  cin>>cha+1;
       ~~~^~
/in/foo.cc:12:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=1;i<=l1;i++)
              ~^~~~
/in/foo.cc:15:10: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  cin>>cha+1;
       ~~~^~
/in/foo.cc:17:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=1;i<=l2;i++)
              ~^~~~
/in/foo.cc:19:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=1;i<=l1;i++)
              ~^~~~
/in/foo.cc:21:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=1;i<=l2;i++)
              ~^~~~
/in/foo.cc:23:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0;i<=l2;i++){
              ~^~~~
/in/foo.cc:24:3: error: reference to 'hash' is ambiguous
   hash[i]=a[i+l2]-a[i]*p[l2];
   ^~~~
/in/foo.cc:5:57: note: candidates are: ll hash [1000005]
 ll bbb[1000005],aa[2000005],a[2000005],b[1000005],l1,l2,hash[1000005],p[1000005],minn=~0ll,st;char cha[1000005];bool f;
                                                         ^~~~
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/istream:38,
                 from /usr/include/c++/6/sstream:38,
                 from /usr/include/c++/6/complex:45,
                 from /usr/include/c++/6/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
/in/foo.cc:25:13: error: reference to 'hash' is ambiguous
   if(b[l2]==hash[i])f=1;
             ^~~~
/in/foo.cc:5:57: note: candidates are: ll hash [1000005]
 ll bbb[1000005],aa[2000005],a[2000005],b[1000005],l1,l2,hash[1000005],p[1000005],minn=~0ll,st;char cha[1000005];bool f;
                                                         ^~~~
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/istream:38,
                 from /usr/include/c++/6/sstream:38,
                 from /usr/include/c++/6/complex:45,
                 from /usr/include/c++/6/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
/in/foo.cc:26:6: error: reference to 'hash' is ambiguous
   if(hash[i]<minn){
      ^~~~
/in/foo.cc:5:57: note: candidates are: ll hash [1000005]
 ll bbb[1000005],aa[2000005],a[2000005],b[1000005],l1,l2,hash[1000005],p[1000005],minn=~0ll,st;char cha[1000005];bool f;
                                                         ^~~~
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/istream:38,
                 from /usr/include/c++/6/sstream:38,
                 from /usr/include/c++/6/complex:45,
                 from /usr/include/c++/6/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
/in/foo.cc:27:9: error: reference to 'hash' is ambiguous
    minn=hash[i];st=i;
         ^~~~
/in/foo.cc:5:57: note: candidates are: ll hash [1000005]
 ll bbb[1000005],aa[2000005],a[2000005],b[1000005],l1,l2,hash[1000005],p[1000005],minn=~0ll,st;char cha[1000005];bool f;
                                                         ^~~~
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/istream:38,
                 from /usr/include/c++/6/sstream:38,
                 from /usr/include/c++/6/complex:45,
                 from /usr/include/c++/6/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
/in/foo.cc:33:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int i=1;i<=l2;i++)
               ~^~~~

信息

递交者
类型
递交
题目
P1382 寻找主人
语言
C++
递交时间
2020-02-14 22:20:32
评测时间
2020-02-14 22:20:32
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes