Problem rblock
User chenweilian
Submission Time 2022-12-25 16:10:04
Score 0
Max Time N/A
Max Memory N/A

Compile Error

rblock.cpp: In function ‘int best_path(int, int)’:
rblock.cpp:17:13: error: reference to ‘prev’ is ambiguous
17 | memset (prev, -1, sizeof (prev));
| ^~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:66,
from /usr/include/c++/9/algorithm:61,
from rblock.cpp:3:
/usr/include/c++/9/bits/stl_iterator_base_funcs.h:224:5: note: candidates are: ‘template<class _BidirectionalIterator> constexpr _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)’
224 | prev(_BidirectionalIterator __x, typename
| ^~~~
rblock.cpp:10:43: note: ‘int prev [505]’
10 | int N, M, edge [MAXN][MAXN], dist [MAXN], prev [MAXN];
| ^~~~
rblock.cpp:17:31: error: reference to ‘prev’ is ambiguous
17 | memset (prev, -1, sizeof (prev));
|