/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'void bfs(int)':
foo.cpp:35:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(i=0;i<v[e].size();i++)
                       ^
foo.cpp: In function 'void spfa(int)':
foo.cpp:65:22: error: reference to 'next' is ambiguous
   for(i=h[e];i!=-1;i=next[i])
                      ^
foo.cpp:17:5: note: candidates are: int next [200005]
 int next[200005];
     ^
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++\deque:60,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\queue:60,
                 from foo.cpp:1:
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 'int main()':
foo.cpp:99:3: error: reference to 'next' is ambiguous
   next[cnt]=h[x];
   ^
foo.cpp:17:5: note: candidates are: int next [200005]
 int next[200005];
     ^
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++\deque:60,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\queue:60,
                 from foo.cpp:1:
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:109:22: error: reference to 'next' is ambiguous
   for(j=h[i];j!=-1;j=next[j])
                      ^
foo.cpp:17:5: note: candidates are: int next [200005]
 int next[200005];
     ^
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++\deque:60,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\queue:60,
                 from foo.cpp:1:
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
     ^

信息

递交者
类型
递交
题目
P1909 寻找道路
语言
C++
递交时间
2016-10-08 14:52:48
评测时间
2016-10-08 14:52:48
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes