/ new_bzoj /

记录详情

Compile Error

/in/foo.cc: In function 'void KMP()':
/in/foo.cc:8:4: error: reference to 'next' is ambiguous
    next[i]=j;
    ^~~~
/in/foo.cc:3:13: note: candidates are: int next [101]
 int n,m,ans,next[101],aa[101],c[21][21],b[21][21],a[21][21],f[1][21];
             ^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/6/bits/char_traits.h:39,
                 from /usr/include/c++/6/ios:40,
                 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/stl_iterator_base_funcs.h:205:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^~~~
/in/foo.cc:11:11: error: reference to 'next' is ambiguous
    else j=next[j];
           ^~~~
/in/foo.cc:3:13: note: candidates are: int next [101]
 int n,m,ans,next[101],aa[101],c[21][21],b[21][21],a[21][21],f[1][21];
             ^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/6/bits/char_traits.h:39,
                 from /usr/include/c++/6/ios:40,
                 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/stl_iterator_base_funcs.h:205:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^~~~
/in/foo.cc:17:34: error: reference to 'next' is ambiguous
      while(now&&aa[now+1]!=j)now=next[now];
                                  ^~~~
/in/foo.cc:3:13: note: candidates are: int next [101]
 int n,m,ans,next[101],aa[101],c[21][21],b[21][21],a[21][21],f[1][21];
             ^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/6/bits/char_traits.h:39,
                 from /usr/include/c++/6/ios:40,
                 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/stl_iterator_base_funcs.h:205:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:36:15: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'char (*)[101]' [-Wformat=]
  scanf("%s",&s);
               ^

信息

递交者
类型
递交
题目
GT考试
语言
C++
递交时间
2018-07-09 19:37:16
评测时间
2018-07-09 19:37:16
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes