0_0_39138910_14678.cpp: In function 'void getnext()':
0_0_39138910_14678.cpp:8:5: error: reference to 'next' is ambiguous
8 | next[0] = -1;
| ^~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_construct.h:62,
from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/char_traits.h:57,
from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ios:42,
from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ostream:40,
from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/iostream:41,
from 0_0_39138910_14678.cpp: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_39138910_14678.cpp:4:5: note: 'int next [100010]'
4 | int next[100010], len;
| ^~~~
0_0_39138910_14678.cpp:15:13: error: reference to 'next' is ambiguous
15 | next[j] = k;
| ^~~~
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_39138910_14678.cpp:4:5: note: 'int next [100010]'
4 | int next[100010], len;
| ^~~~
0_0_39138910_14678.cpp:18:17: error: reference to 'next' is ambiguous
18 | k = next[k];
| ^~~~
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_39138910_14678.cpp:4:5: note: 'int next [100010]'
4 | int next[100010], len;
| ^~~~
0_0_39138910_14678.cpp: In function 'int main()':
0_0_39138910_14678.cpp:29:16: error: reference to 'next' is ambiguous
29 | memset(next, 0, sizeof(next));
| ^~~~
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_39138910_14678.cpp:4:5: note: 'int next [100010]'
4 | int next[100010], len;
| ^~~~
0_0_39138910_14678.cpp:29:32: error: reference to 'next' is ambiguous
29 | memset(next, 0, sizeof(next));
| ^~~~
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_39138910_14678.cpp:4:5: note: 'int next [100010]'
4 | int next[100010], len;
| ^~~~
0_0_39138910_14678.cpp:31:12: error: reference to 'next' is ambiguous
31 | if(next[len] == 0) cout << len << endl;
| ^~~~
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_39138910_14678.cpp:4:5: note: 'int next [100010]'
4 | int next[100010], len;
| ^~~~
0_0_39138910_14678.cpp:33:29: error: reference to 'next' is ambiguous
33 | int ans = len - next[len];
| ^~~~
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_39138910_14678.cpp:4:5: note: 'int next [100010]'
4 | int next[100010], len;
| ^~~~
|