/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'void add(int, int)':
/in/foo.cc:30:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
  if(g[x][y]) return; g[x][y]=1;
  ^~
/in/foo.cc:30:22: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
  if(g[x][y]) return; g[x][y]=1;
                      ^
/in/foo.cc: In function 'void link(int, int, int)':
/in/foo.cc:35:13: error: reference to 'next' is ambiguous
  to[++tt]=y;next[tt]=head[x];head[x]=tt;
             ^~~~
/in/foo.cc:17:13: note: candidates are: int next [750010]
 int head[N],next[M],to[M],c[M],tt=1;
             ^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/6/bits/char_traits.h:39,
                 from /usr/include/c++/6/ios:40,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^~~~
/in/foo.cc:36:13: error: reference to 'next' is ambiguous
  to[++tt]=x;next[tt]=head[y];head[y]=tt;
             ^~~~
/in/foo.cc:17:13: note: candidates are: int next [750010]
 int head[N],next[M],to[M],c[M],tt=1;
             ^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/6/bits/char_traits.h:39,
                 from /usr/include/c++/6/ios:40,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^~~~
/in/foo.cc: In function 'bool bfs()':
/in/foo.cc:60:35: error: reference to 'next' is ambiguous
   for(int i=head[u],v;v=to[i],i;i=next[i])
                                   ^~~~
/in/foo.cc:17:13: note: candidates are: int next [750010]
 int head[N],next[M],to[M],c[M],tt=1;
             ^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/6/bits/char_traits.h:39,
                 from /usr/include/c++/6/ios:40,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^~~~
/in/foo.cc: In function 'int dfs(int, int)':
/in/foo.cc:69:34: error: reference to 'next' is ambiguous
  for(int i=head[u],v;v=to[i],i;i=next[i])
                                  ^~~~
/in/foo.cc:17:13: note: candidates are: int next [750010]
 int head[N],next[M],to[M],c[M],tt=1;
             ^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/6/bits/char_traits.h:39,
                 from /usr/include/c++/6/ios:40,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^~~~

信息

递交者
类型
递交
题目
P1607 植物大战僵尸
语言
C++
递交时间
2017-05-26 11:53:41
评测时间
2017-05-26 11:53:41
评测机
分数
0
总耗时
254ms
峰值内存
36.039 MiB