QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#128439#5514. Mazedong_liuCompile Error//C++203.2kb2023-07-21 04:30:042023-07-21 04:30:05

Details

answer.code: In function ‘int main()’:
answer.code:130:17: error: reference to ‘next’ is ambiguous
  130 |                 next.clear();
      |                 ^~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:66,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1927,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from answer.code:41:
/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:95:29: note:                 ‘std::vector<std::pair<int, int> > next’
   95 | vector<pair<int, int>> now, next;
      |                             ^~~~
answer.code:134:27: error: reference to ‘next’ is ambiguous
  134 |                 swap(now, next);
      |                           ^~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:66,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1927,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from answer.code:41:
/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:95:29: note:                 ‘std::vector<std::pair<int, int> > next’
   95 | vector<pair<int, int>> now, next;
      |                             ^~~~