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_19872581_7051.cpp: In function 'void ex_kmp()':
0_0_19872581_7051.cpp:16:9: error: reference to 'next' is ambiguous
  memset(next,0,sizeof(next));
         ^
0_0_19872581_7051.cpp:11:9: note: candidates are: int next [1000010]
 int T,n,next[maxn],pre[maxn],suf[maxn];
         ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:61,
                 from 0_0_19872581_7051.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
0_0_19872581_7051.cpp:16:23: error: reference to 'next' is ambiguous
  memset(next,0,sizeof(next));
                       ^
0_0_19872581_7051.cpp:11:9: note: candidates are: int next [1000010]
 int T,n,next[maxn],pre[maxn],suf[maxn];
         ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:61,
                 from 0_0_19872581_7051.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
0_0_19872581_7051.cpp:17:2: error: reference to 'next' is ambiguous
  next[1]=n;
  ^
0_0_19872581_7051.cpp:11:9: note: candidates are: int next [1000010]
 int T,n,next[maxn],pre[maxn],suf[maxn];
         ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:61,
                 from 0_0_19872581_7051.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
0_0_19872581_7051.cpp:20:3: error: reference to 'next' is ambiguous
   next[i]=min(ed-i+1,next[i-st+1]);
   ^
0_0_19872581_7051.cpp:11:9: note: candidates are: int next [1000010]
 int T,n,next[maxn],pre[maxn],suf[maxn];
         ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:61,
                 from 0_0_19872581_7051.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
0_0_19872581_7051.cpp:20:22: error: reference to 'next' is ambiguous
   next[i]=min(ed-i+1,next[i-st+1]);
                      ^
0_0_19872581_7051.cpp:11:9: note: candidates are: int next [1000010]
 int T,n,next[maxn],pre[maxn],suf[maxn];
         ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:61,
                 from 0_0_19872581_7051.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
0_0_19872581_7051.cpp:21:3: error: reference to 'next' is ambiguous
   next[i]=max(next[i],0);
   ^
0_0_19872581_7051.cpp:11:9: note: candidates are: int next [1000010]
 int T,n,next[maxn],pre[maxn],suf[maxn];
         ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:61,
                 from 0_0_19872581_7051.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
0_0_19872581_7051.cpp:21:15: error: reference to 'next' is ambiguous
   next[i]=max(next[i],0);
               ^
0_0_19872581_7051.cpp:11:9: note: candidates are: int next [1000010]
 int T,n,next[maxn],pre[maxn],suf[maxn];
         ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:61,
                 from 0_0_19872581_7051.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
0_0_19872581_7051.cpp:22:9: error: reference to 'next' is ambiguous
   if (i+next[i]-1>=ed)
         ^
0_0_19872581_7051.cpp:11:9: note: candidates are: int next [1000010]
 int T,n,next[maxn],pre[maxn],suf[maxn];
         ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:61,
                 from 0_0_19872581_7051.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
0_0_19872581_7051.cpp:23:13: error: reference to 'next' is ambiguous
    while (i+next[i]<=n&&s[i+next[i]]==s[1+next[i]]) next[i]++;
             ^
0_0_19872581_7051.cpp:11:9: note: candidates are: int next [1000010]
 int T,n,next[maxn],pre[maxn],suf[maxn];
         ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:61,
                 from 0_0_19872581_7051.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
0_0_19872581_7051.cpp:23:29: error: reference to 'next' is ambiguous
    while (i+next[i]<=n&&s[i+next[i]]==s[1+next[i]]) next[i]++;
                             ^
0_0_19872581_7051.cpp:11:9: note: candidates are: int next [1000010]
 int T,n,next[maxn],pre[maxn],suf[maxn];
         ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:61,
                 from 0_0_19872581_7051.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
0_0_19872581_7051.cpp:23:43: error: reference to 'next' is ambiguous
    while (i+next[i]<=n&&s[i+next[i]]==s[1+next[i]]) next[i]++;
                                           ^
0_0_19872581_7051.cpp:11:9: note: candidates are: int next [1000010]
 int T,n,next[maxn],pre[maxn],suf[maxn];
         ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:61,
                 from 0_0_19872581_7051.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
0_0_19872581_7051.cpp:23:53: error: reference to 'next' is ambiguous
    while (i+next[i]<=n&&s[i+next[i]]==s[1+next[i]]) next[i]++;
                                                     ^
0_0_19872581_7051.cpp:11:9: note: candidates are: int next [1000010]
 int T,n,next[maxn],pre[maxn],suf[maxn];
         ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:61,
                 from 0_0_19872581_7051.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
0_0_19872581_7051.cpp:24:9: error: reference to 'next' is ambiguous
   if (i+next[i]-1>ed)
         ^
0_0_19872581_7051.cpp:11:9: note: candidates are: int next [1000010]
 int T,n,next[maxn],pre[maxn],suf[


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