QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#68105#4152. 工作安排 MaMengQiCompile Error//C++2.2kb2022-12-14 17:40:422022-12-14 17:40:44

Details

answer.code: In function ‘void add(int, int, int, long long int)’:
answer.code:17:12: error: reference to ‘next’ is ambiguous
   17 |     tot++; next[tot]=point[x]; point[x]=tot; v[tot]=y; c[tot]=k; remain[tot]=z;
      |            ^~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:66,
                 from /usr/include/c++/11/bits/char_traits.h:39,
                 from /usr/include/c++/11/ios:40,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 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:13:5: note:                 ‘int next [2000000]’
   13 | int next[M],point[N],remain[M],v[M],last[M],can[M],total;
      |     ^~~~
answer.code:18:12: error: reference to ‘next’ is ambiguous
   18 |     tot++; next[tot]=point[y]; point[y]=tot; v[tot]=x; c[tot]=-k; remain[tot]=0;
      |            ^~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:66,
                 from /usr/include/c++/11/bits/char_traits.h:39,
                 from /usr/include/c++/11/ios:40,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 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:13:5: note:                 ‘int next [2000000]’
   13 | int next[M],point[N],remain[M],v[M],last[M],can[M],total;
      |     ^~~~
answer.code: In function ‘bool spfa(int, int)’:
answer.code:47:39: error: reference to ‘next’ is ambiguous
   47 |         for (int i=point[now];i!=-1;i=next[i])
      |                                       ^~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:66,
                 from /usr/include/c++/11/bits/char_traits.h:39,
                 from /usr/include/c++/11/ios:40,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 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:13:5: note:                 ‘int next [2000000]’
   13 | int next[M],point[N],remain[M],v[M],last[M],can[M],total;
      |     ^~~~
answer.code: In function ‘int main()’:
answer.code:74:12: error: reference to ‘next’ is ambiguous
   74 |     memset(next,-1,sizeof(next));
      |            ^~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:66,
                 from /usr/include/c++/11/bits/char_traits.h:39,
                 from /usr/include/c++/11/ios:40,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 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:13:5: note:                 ‘int next [2000000]’
   13 | int next[M],point[N],remain[M],v[M],last[M],can[M],total;
      |     ^~~~
answer.code:74:27: error: reference to ‘next’ is ambiguous
   74 |     memset(next,-1,sizeof(next));
      |                           ^~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:66,
                 from /usr/include/c++/11/bits/char_traits.h:39,
                 from /usr/include/c++/11/ios:40,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 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:13:5: note:                 ‘int next [2000000]’
   13 | int next[M],point[N],remain[M],v[M],last[M],can[M],total;
      |     ^~~~
answer.code:71:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   71 |     scanf("%d%d",&m,&n);
      |     ~~~~~^~~~~~~~~~~~~~
answer.code:77:21: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with ...