/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'void add(int, int, ll)':
foo.cpp:16:2: error: reference to 'next' is ambiguous
  next[tot]=head[x];
  ^
foo.cpp:7:5: note: candidates are: int next [210000]
 int next[N],to[N],head[N],tot;
     ^
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 init(int)':
foo.cpp:22:24: error: reference to 'next' is ambiguous
  for(int i=head[x];i;i=next[i])
                        ^
foo.cpp:7:5: note: candidates are: int next [210000]
 int next[N],to[N],head[N],tot;
     ^
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 getP(int)':
foo.cpp:36:24: error: reference to 'next' is ambiguous
  for(int i=head[x];i;i=next[i])
                        ^
foo.cpp:7:5: note: candidates are: int next [210000]
 int next[N],to[N],head[N],tot;
     ^
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 'll find(int)':
foo.cpp:46:8: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   mid=l+r>>1;
        ^
foo.cpp: In function 'void getG(int, int)':
foo.cpp:58:20: error: reference to 'next' is ambiguous
  for(i=head[x];i;i=next[i])
                    ^
foo.cpp:7:5: note: candidates are: int next [210000]
 int next[N],to[N],head[N],tot;
     ^
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:57:14: warning: unused variable 'temp' [-Wunused-variable]
  int i,mas=0,temp;
              ^
foo.cpp: In function 'void slove(int, int)':
foo.cpp:73:20: error: reference to 'next' is ambiguous
  for(i=head[y];i;i=next[i])
                    ^
foo.cpp:7:5: note: candidates are: int next [210000]
 int next[N],to[N],head[N],tot;
     ^
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:80:20: error: reference to 'next' is ambiguous
  for(i=head[y];i;

信息

递交者
类型
递交
题目
P1868 购票
语言
C++
递交时间
2015-09-25 13:37:52
评测时间
2015-09-25 13:37:53
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes