/ new_bzoj /

记录详情

Compile Error

foo.cc: In function 'void add(int, int, int)':
foo.cc:19:17: error: reference to 'next' is ambiguous
     go[++tot]=y;next[tot]=head[x][z];head[x][z]=tot;
                 ^~~~
foo.cc:12:17: note: candidates are: int next [200005]
 int head[N][27],next[N],go[N],a[N],head1[N][27];
                 ^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/7/algorithm:61,
                 from foo.cc:2:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^~~~
foo.cc:20:17: error: reference to 'next' is ambiguous
     go[++tot]=x;next[tot]=head1[y][z];head1[y][z]=tot;
                 ^~~~
foo.cc:12:17: note: candidates are: int next [200005]
 int head[N][27],next[N],go[N],a[N],head1[N][27];
                 ^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/7/algorithm:61,
                 from foo.cc:2:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208: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 bfs()':
foo.cc:39:38: error: reference to 'next' is ambiguous
             for(int j=head[y][i];j;j=next[j])
                                      ^~~~
foo.cc:12:17: note: candidates are: int next [200005]
 int head[N][27],next[N],go[N],a[N],head1[N][27];
                 ^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/7/algorithm:61,
                 from foo.cc:2:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^~~~
foo.cc:51:39: error: reference to 'next' is ambiguous
             for(int i=head1[x][z];i;i=next[i])
                                       ^~~~
foo.cc:12:17: note: candidates are: int next [200005]
 int head[N][27],next[N],go[N],a[N],head1[N][27];
                 ^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/7/algorithm:61,
                 from foo.cc:2:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208: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:70:32: warning: format '%s' expects argument of type 'char*', but argument 4 has type 'char (*)[2]' [-Wformat=]
         scanf("%d%d%s",&x,&y,&s);
                              ~~^
foo.cc:65:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d%d",&n,&m);
     ~~~~~^~~~~~~~~~~~~~
foo.cc:70:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d%d%s",&x,&y,&s);
         ~~~~~^~~~~~~~~~~~~~~~~~~
foo.cc:77:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d%d",&q,&last);
     ~~~~~^~~~~~~~~~~~~~~~~
foo.cc:82:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d",&x);
         ~~~~~^~~~~~~~~

自豪的采用 HydroJudge 进行评测(github.com/hydro-dev/HydroJudge)
正在同步测试数据,请稍后

信息

递交者
类型
递交
题目
Baj 最短回文路
语言
C++
递交时间
2020-07-16 15:12:35
评测时间
2020-07-16 15:12:35
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes