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_39007814_12008.cpp: In function 'int main()':
0_0_39007814_12008.cpp:30:16: error: reference to 'next' is ambiguous
   30 |         memset(next,-1,sizeof(next));
      |                ^~~~
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 0_0_39007814_12008.cpp:3:
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_39007814_12008.cpp:9:20: note:                 'int next [110][3010]'
    9 | int dp[MAXN][MAXM],next[MAXN][MAXM];
      |                    ^~~~
0_0_39007814_12008.cpp:30:31: error: reference to 'next' is ambiguous
   30 |         memset(next,-1,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_39007814_12008.cpp:9:20: note:                 'int next [110][3010]'
    9 | int dp[MAXN][MAXM],next[MAXN][MAXM];
      |                    ^~~~
0_0_39007814_12008.cpp:35:25: error: reference to 'next' is ambiguous
   35 |                         next[i][j] = 10;
      |                         ^~~~
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_39007814_12008.cpp:9:20: note:                 'int next [110][3010]'
    9 | int dp[MAXN][MAXM],next[MAXN][MAXM];
      |                    ^~~~
0_0_39007814_12008.cpp:42:67: error: reference to 'next' is ambiguous
   42 |                             if (dp[newi][newj] == dp[i][j] + 1 && next[newi][newj] >= 0){
      |                                                                   ^~~~
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_39007814_12008.cpp:9:20: note:                 'int next [110][3010]'
    9 | int dp[MAXN][MAXM],next[MAXN][MAXM];
      |                    ^~~~
0_0_39007814_12008.cpp:43:33: error: reference to 'next' is ambiguous
   43 |                                 next[i][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_39007814_12008.cpp:9:20: note:                 'int next [110][3010]'
    9 | int dp[MAXN][MAXM],next[MAXN][MAXM];
      |                    ^~~~
0_0_39007814_12008.cpp:53:20: error: reference to 'next' is ambiguous
   53 |             while (next[i][j] != 10){
      |                    ^~~~
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_39007814_12008.cpp:9:20: note:                 'int next [110][3010]'
    9 | int dp[MAXN][MAXM],next[MAXN][MAXM];
      |                    ^~~~
0_0_39007814_12008.cpp:54:30: error: reference to 'next' is ambiguous
   54 |                 u = i + used[next[i][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_39007814_12008.cpp:9:20: note:                 'int next [110][3010]'
    9 | int dp[MAXN][MAXM],next[MAXN][MAXM];
      |                    ^~~~
0_0_39007814_12008.cpp:55:27: error: reference to 'next' is ambiguous
   55 |                 v = (j*10+next[i][j]) % m;
      |                           ^~~~
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_39007814_12008.cpp:9:20: note:                 'int next [110][3010]'
    9 | int dp[MAXN][MAXM],next[MAXN][MAXM];
      |                    ^~~~
0_0_39007814_12008.cpp:56:29: error: reference to 'next' is ambiguous
   56 |                 printf("%d",next[i][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_39007814_12008.cpp:9:20: note:                 'int next [110][3010]'
    9 | int dp[MAXN][MAXM],next[MAXN][MAXM];
      |                    ^~~~


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.001000(s) query 1, Server time : 2025-01-10 04:01:58, Gzip enabled