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_38631247_21358.cpp: In function 'void Add_edge(int, int, int)':
0_0_38631247_21358.cpp:53:5: error: reference to 'next' is ambiguous
     next[++ecnt] = first[u];
     ^~~~
In file included from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/stl_algobase.h:66,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/specfun.h:45,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/cmath:1892,
                 from 0_0_38631247_21358.cpp:12:
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/stl_iterator_base_funcs.h:213:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename std::iterator_traits<_Iter>::difference_type)'
     next(_InputIterator __x, typename
     ^~~~
0_0_38631247_21358.cpp:29:17: note:                 'int next [200020]'
 int first[maxn],next[maxn << 1],ver[maxn << 1],ecnt;
                 ^~~~
0_0_38631247_21358.cpp:57:5: error: reference to 'next' is ambiguous
     next[++ecnt] = first[v];
     ^~~~
In file included from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/stl_algobase.h:66,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/specfun.h:45,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/cmath:1892,
                 from 0_0_38631247_21358.cpp:12:
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/stl_iterator_base_funcs.h:213:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename std::iterator_traits<_Iter>::difference_type)'
     next(_InputIterator __x, typename
     ^~~~
0_0_38631247_21358.cpp:29:17: note:                 'int next [200020]'
 int first[maxn],next[maxn << 1],ver[maxn << 1],ecnt;
                 ^~~~
0_0_38631247_21358.cpp: In function 'void Dfs(int, int, int)':
0_0_38631247_21358.cpp:69:40: error: reference to 'next' is ambiguous
     for(int i = first[p]; i != -1; i = next[i]) if((v = ver[i]) != pre){
                                        ^~~~
In file included from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/stl_algobase.h:66,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/specfun.h:45,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/cmath:1892,
                 from 0_0_38631247_21358.cpp:12:
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/stl_iterator_base_funcs.h:213:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename std::iterator_traits<_Iter>::difference_type)'
     next(_InputIterator __x, typename
     ^~~~
0_0_38631247_21358.cpp:29:17: note:                 'int next [200020]'
 int first[maxn],next[maxn << 1],ver[maxn << 1],ecnt;
                 ^~~~
0_0_38631247_21358.cpp: In function 'void Dfs_pos(int, int)':
0_0_38631247_21358.cpp:85:40: error: reference to 'next' is ambiguous
     for(int i = first[p]; i != -1; i = next[i]){
                                        ^~~~
In file included from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/stl_algobase.h:66,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/specfun.h:45,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/cmath:1892,
                 from 0_0_38631247_21358.cpp:12:
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/stl_iterator_base_funcs.h:213:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename std::iterator_traits<_Iter>::difference_type)'
     next(_InputIterator __x, typename
     ^~~~
0_0_38631247_21358.cpp:29:17: note:                 'int next [200020]'
 int first[maxn],next[maxn << 1],ver[maxn << 1],ecnt;
                 ^~~~


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-06-17 14:37:29, Gzip enabled