QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#68701 | #4152. 工作安排 | ZhaoZiLong | Compile Error | / | / | C++ | 1.8kb | 2022-12-18 22:12:29 | 2022-12-18 22:12:29 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
answer.code: In function ‘void add(int, int, int, int)’: answer.code:12:52: error: reference to ‘next’ is ambiguous 12 | to[++cnt] = y , val[cnt] = v , cost[cnt] = c , next[cnt] = head[x] , head[x] = cnt; | ^~~~ In file included from /usr/include/c++/11/bits/stl_algobase.h:66, from /usr/include/c++/11/deque:60, from /usr/include/c++/11/queue:60, from answer.code:1: /usr/include/c++/11/bits/stl_iterator_base_funcs.h:213:5: note: candidates are: ‘template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename std::iterator_traits<_Iter>::difference_type)’ 213 | next(_InputIterator __x, typename | ^~~~ answer.code:9:53: note: ‘int next [1000010]’ 9 | int temp[10] , head[N] , to[M] , val[M] , cost[M] , next[M] , cnt = 1 , s , t , dis[N] , from[N] , pre[N]; | ^~~~ answer.code:13:53: error: reference to ‘next’ is ambiguous 13 | to[++cnt] = x , val[cnt] = 0 , cost[cnt] = -c , next[cnt] = head[y] , head[y] = cnt; | ^~~~ In file included from /usr/include/c++/11/bits/stl_algobase.h:66, from /usr/include/c++/11/deque:60, from /usr/include/c++/11/queue:60, from answer.code:1: /usr/include/c++/11/bits/stl_iterator_base_funcs.h:213:5: note: candidates are: ‘template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename std::iterator_traits<_Iter>::difference_type)’ 213 | next(_InputIterator __x, typename | ^~~~ answer.code:9:53: note: ‘int next [1000010]’ 9 | int temp[10] , head[N] , to[M] , val[M] , cost[M] , next[M] , cnt = 1 , s , t , dis[N] , from[N] , pre[N]; | ^~~~ answer.code: In function ‘bool spfa()’: answer.code:24:35: error: reference to ‘next’ is ambiguous 24 | for(i = head[x] ; i ; i = next[i]) | ^~~~ In file included from /usr/include/c++/11/bits/stl_algobase.h:66, from /usr/include/c++/11/deque:60, from /usr/include/c++/11/queue:60, from answer.code:1: /usr/include/c++/11/bits/stl_iterator_base_funcs.h:213:5: note: candidates are: ‘template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename std::iterator_traits<_Iter>::difference_type)’ 213 | next(_InputIterator __x, typename | ^~~~ answer.code:9:53: note: ‘int next [1000010]’ 9 | int temp[10] , head[N] , to[M] , val[M] , cost[M] , next[M] , cnt = 1 , s , t , dis[N] , from[N] , pre[N]; | ^~~~ answer.code: In function ‘int main()’: answer.code:47:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 47 | scanf("%d%d" , &m , &n) , s = 0 , t = n + m + 1; | ~~~~~^~~~~~~~~~~~~~~~~~ answer.code:48:38: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 48 | for(i = 1 ; i <= n ; i ++ ) scanf("%d" , &x) , add(s , i , x , 0); | ~~~~~^~~~~~~~~~~ answer.code:53:18: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 53 | scanf("%d" , &x); | ~~~~~^~~~~~~~~~~ answer.code:59:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 59 | scanf("%d" , &k); | ~~~~~^~~~~~~~~~~ answer.code:60:42: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 60 | for(j = 1 ; j <= k ; j ++ ) scanf("%d" , &temp[j]); | ~~~~~^~~~~~~~~~~~~~~~~ answer.code:62:46: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 62 | for(j = 1 ; j <= k + 1 ; j ++ ) scanf("%d" , &x) , add(i + n , t , temp[j] - temp[j - 1] , x); | ~~~~~^~~~~~~~~~~