/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'void add(int, int)':
foo.cpp:31:2: error: reference to 'next' is ambiguous
  next[tot]=first[x];
  ^
foo.cpp:23:5: note: candidates are: int next [500003]
 int next[500003];
     ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:66:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:61,
                 from foo.cpp:2:
c:\mingw\lib\gcc\mingw32\4.8.1\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:44:28: error: reference to 'next' is ambiguous
  for(int c=first[x];c!=0;c=next[c])
                            ^
foo.cpp:23:5: note: candidates are: int next [500003]
 int next[500003];
     ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:66:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:61,
                 from foo.cpp:2:
c:\mingw\lib\gcc\mingw32\4.8.1\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
     ^

信息

递交者
类型
递交
题目
P1906 联合权值
语言
C++
递交时间
2016-08-13 21:26:18
评测时间
2016-08-13 21:26:20
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes