QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#72629#13. RouterdoltCompile Error//C++146.0kb2023-01-17 09:28:042023-01-17 09:28:11

Details

answer.code: In function ‘void ins(int, int)’:
answer.code:15:29: error: reference to ‘next’ is ambiguous
   15 | void ins(int x, int y){e++; next[e] = node[x]; node[x] = e; to[e] = y;}//epsilon
      |                             ^~~~
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/string:40,
                 from answer.code:3:
/usr/include/c++/11/bits/stl_iterator_base_funcs.h:213:5: note: candidates are: ‘template<class _InputIterator> _InputIterator std::next(_InputIterator, typename std::iterator_traits<_Iter>::difference_type)’
  213 |     next(_InputIterator __x, typename
      |     ^~~~
answer.code:13:15: note:                 ‘int next [20000000]’
   13 | int node[sz], next[sz * 2], to[sz * 2];
      |               ^~~~
answer.code: In function ‘void gao(std::string)’:
answer.code:161:32: error: reference to ‘next’ is ambiguous
  161 |       for (j = node[k]; j; j = next[j]){
      |                                ^~~~
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/string:40,
                 from answer.code:3:
/usr/include/c++/11/bits/stl_iterator_base_funcs.h:213:5: note: candidates are: ‘template<class _InputIterator> _InputIterator std::next(_InputIterator, typename std::iterator_traits<_Iter>::difference_type)’
  213 |     next(_InputIterator __x, typename
      |     ^~~~
answer.code:13:15: note:                 ‘int next [20000000]’
   13 | int node[sz], next[sz * 2], to[sz * 2];
      |               ^~~~
answer.code: In function ‘void doit()’:
answer.code:221:28: error: reference to ‘next’ is ambiguous
  221 |   for (i = 1; i <= e; i++) next[i] = to[i] = 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/string:40,
                 from answer.code:3:
/usr/include/c++/11/bits/stl_iterator_base_funcs.h:213:5: note: candidates are: ‘template<class _InputIterator> _InputIterator std::next(_InputIterator, typename std::iterator_traits<_Iter>::difference_type)’
  213 |     next(_InputIterator __x, typename
      |     ^~~~
answer.code:13:15: note:                 ‘int next [20000000]’
   13 | int node[sz], next[sz * 2], to[sz * 2];
      |               ^~~~