记录详情

Compile Error

/in/foo.cc: In function 'void Dijkstra(int)':
/in/foo.cc:18:4: error: reference to 'prev' is ambiguous
    prev[i]=-1;
    ^~~~
/in/foo.cc:8:5: note: candidates are: int prev [110]
 int prev[maxn]={0};
     ^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/7/algorithm:61,
                 from /in/foo.cc:2:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:220:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^~~~
/in/foo.cc:20:4: error: reference to 'prev' is ambiguous
    prev[i]=sp;
    ^~~~
/in/foo.cc:8:5: note: candidates are: int prev [110]
 int prev[maxn]={0};
     ^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/7/algorithm:61,
                 from /in/foo.cc:2:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:220:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^~~~
/in/foo.cc:38:6: error: reference to 'prev' is ambiguous
      prev[j]=u;
      ^~~~
/in/foo.cc:8:5: note: candidates are: int prev [110]
 int prev[maxn]={0};
     ^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/7/algorithm:61,
                 from /in/foo.cc:2:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:220:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^~~~

信息

递交者
类型
递交
题目
偷拍硕哥1
比赛
小兰赛 2018/12/9
语言
C++
递交时间
2018-12-09 08:32:05
评测时间
2018-12-09 08:32:06
评测机
分数
0
总耗时
104ms
峰值内存
15.086 MiB