/ new_bzoj /

记录详情

Compile Error

foo.cc: In function 'void add(int, int)':
foo.cc:10:14: error: reference to 'next' is ambiguous
  to[++cnt]=y;next[cnt]=head[x];head[x]=cnt;
              ^
foo.cc:7:22: note: candidates are: int next [2000010]
 int n,no,to[maxn<<1],next[maxn<<1],head[maxn],cnt;
                      ^
In file included from /usr/include/c++/5/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/5/algorithm:61,
                 from foo.cc:3:
/usr/include/c++/5/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.cc: In function 'void DFS1(int, int)':
foo.cc:14:20: error: reference to 'next' is ambiguous
  for(i=head[x];i;i=next[i]){
                    ^
foo.cc:7:22: note: candidates are: int next [2000010]
 int n,no,to[maxn<<1],next[maxn<<1],head[maxn],cnt;
                      ^
In file included from /usr/include/c++/5/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/5/algorithm:61,
                 from foo.cc:3:
/usr/include/c++/5/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.cc: In function 'void DFS2(int, int)':
foo.cc:30:20: error: reference to 'next' is ambiguous
  for(i=head[x];i;i=next[i]){
                    ^
foo.cc:7:22: note: candidates are: int next [2000010]
 int n,no,to[maxn<<1],next[maxn<<1],head[maxn],cnt;
                      ^
In file included from /usr/include/c++/5/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/5/algorithm:61,
                 from foo.cc:3:
/usr/include/c++/5/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.cc: In function 'int main()':
foo.cc:38:16: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&n);
                ^
foo.cc:40:31: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   int x,y; scanf("%d%d",&x,&y);
                               ^

自豪的采用 HydroJudger 进行评测(github.com/hydro-dev/HydroJudger)

信息

递交者
类型
递交
题目
Sta
语言
C++
递交时间
2020-04-12 16:17:10
评测时间
2020-04-12 16:17:10
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes