F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_39442034_31151.cpp: In function 'int main()':
0_0_39442034_31151.cpp:16:17: error: reference to 'next' is ambiguous
   16 |                 next[1]=0;
      |                 ^~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algobase.h:66,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/algorithm:60,
                 from .\stdc++.h:51:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
  232 |     next(_InputIterator __x, typename
      |     ^~~~
0_0_39442034_31151.cpp:5:11: note:                 'int next [1000009]'
    5 | int T,n,m,next[N],s[N],t[N];
      |           ^~~~
0_0_39442034_31151.cpp:18:31: error: reference to 'next' is ambiguous
   18 |                         int j=next[i-1];
      |                               ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
  232 |     next(_InputIterator __x, typename
      |     ^~~~
0_0_39442034_31151.cpp:5:11: note:                 'int next [1000009]'
    5 | int T,n,m,next[N],s[N],t[N];
      |           ^~~~
0_0_39442034_31151.cpp:19:50: error: reference to 'next' is ambiguous
   19 |                         while(j&&s[j+1]!=s[i]) j=next[j];
      |                                                  ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
  232 |     next(_InputIterator __x, typename
      |     ^~~~
0_0_39442034_31151.cpp:5:11: note:                 'int next [1000009]'
    5 | int T,n,m,next[N],s[N],t[N];
      |           ^~~~
0_0_39442034_31151.cpp:20:25: error: reference to 'next' is ambiguous
   20 |                         next[i]=j+(s[j+1]==s[i]);
      |                         ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
  232 |     next(_InputIterator __x, typename
      |     ^~~~
0_0_39442034_31151.cpp:5:11: note:                 'int next [1000009]'
    5 | int T,n,m,next[N],s[N],t[N];
      |           ^~~~
0_0_39442034_31151.cpp:25:53: error: reference to 'next' is ambiguous
   25 |                         while(ma&&s[i]!=t[ma+1]) ma=next[ma];
      |                                                     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
  232 |     next(_InputIterator __x, typename
      |     ^~~~
0_0_39442034_31151.cpp:5:11: note:                 'int next [1000009]'
    5 | int T,n,m,next[N],s[N],t[N];
      |           ^~~~


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-09-29 13:20:42, Gzip enabled