/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'void build(int, int)':
foo.cpp:10:2: error: reference to 'next' is ambiguous
  next[++tot]=first[x];
  ^
foo.cpp:4:27: note: candidates are: int next [400001]
 int n,tot=0,first[200001],next[400001],v[400001],w[200001],ans1=0,maxn[200001],sec[200001];
                           ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:61,
                 from foo.cpp:3:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/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
     ^
foo.cpp:13:2: error: reference to 'next' is ambiguous
  next[++tot]=first[y];
  ^
foo.cpp:4:27: note: candidates are: int next [400001]
 int n,tot=0,first[200001],next[400001],v[400001],w[200001],ans1=0,maxn[200001],sec[200001];
                           ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:61,
                 from foo.cpp:3:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/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
     ^
foo.cpp: In function 'void dfs(int)':
foo.cpp:35:5: error: reference to 'next' is ambiguous
   t=next[t];
     ^
foo.cpp:4:27: note: candidates are: int next [400001]
 int n,tot=0,first[200001],next[400001],v[400001],w[200001],ans1=0,maxn[200001],sec[200001];
                           ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:61,
                 from foo.cpp:3:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/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
     ^
foo.cpp: In function 'void solve(int)':
foo.cpp:51:5: error: reference to 'next' is ambiguous
   t=next[t];
     ^
foo.cpp:4:27: note: candidates are: int next [400001]
 int n,tot=0,first[200001],next[400001],v[400001],w[200001],ans1=0,maxn[200001],sec[200001];
                           ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:61,
                 from foo.cpp:3:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/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
     ^
foo.cpp: In function 'int main()':
foo.cpp:60:9: error: reference to 'next' is ambiguous
  memset(next,0,sizeof(next));
         ^
foo.cpp:4:27: note: candidates are: int next [400001]
 int n,tot=0,first[200001],next[400001],v[400001],w[200001],ans1=0,maxn[200001],sec[200001];
                           ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:61,
                 from foo.cpp:3:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/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
     ^
foo.cpp:60:23: error: reference to 'next' is ambiguous
  memset(next,0,si

信息

递交者
类型
递交
题目
P1906 联合权值
语言
C++
递交时间
2015-08-24 11:41:16
评测时间
2015-08-24 11:41:17
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes