Problem rblock
User kxd
Submission Time 2023-08-12 16:41:41
Score 0
Max Time N/A
Max Memory N/A

Compile Error

rblock.cpp: In function ‘int best_path(int, int)’:
rblock.cpp:13:13: error: reference to ‘prev’ is ambiguous
13 | memset (prev, -1, sizeof (prev));
| ^~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:66,
from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from rblock.cpp:1:
/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:6:43: note: ‘int prev [505]’
6 | int N, M, edge [MAXN][MAXN], dist [MAXN], prev [MAXN];
|