QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#243771#5250. Combination Locksucup-team1281#Compile Error//C++231.7kb2023-11-08 17:06:142023-11-08 17:06:14

详细

answer.code: In function ‘bool dfs(int)’:
answer.code:16:22: error: reference to ‘erase’ is ambiguous
   16 |         if(vis[v] || erase[v])continue;
      |                      ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:104,
                 from answer.code:1:
/usr/include/c++/11/forward_list:74:5: note: candidates are: ‘template<class _Tp, class _Alloc, class _Up> typename std::forward_list<_Tp, _Alloc>::size_type std::erase(std::forward_list<_Tp, _Alloc>&, const _Up&)’
   74 |     erase(forward_list<_Tp, _Alloc>& __cont, const _Up& __value)
      |     ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:79,
                 from answer.code:1:
/usr/include/c++/11/list:98:5: note:                 ‘template<class _Tp, class _Alloc, class _Up> typename std::__cxx11::list<_Tp, _Alloc>::size_type std::erase(std::__cxx11::list<_Tp, _Alloc>&, const _Up&)’
   98 |     erase(list<_Tp, _Alloc>& __cont, const _Up& __value)
      |     ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:68,
                 from answer.code:1:
/usr/include/c++/11/deque:108:5: note:                 ‘template<class _Tp, class _Alloc, class _Up> typename std::deque<_Tp, _Alloc>::size_type std::erase(std::deque<_Tp, _Alloc>&, const _Up&)’
  108 |     erase(deque<_Tp, _Alloc>& __cont, const _Up& __value)
      |     ^~~~~
In file included from /usr/include/c++/11/functional:62,
                 from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/11/algorithm:74,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
                 from answer.code:1:
/usr/include/c++/11/vector:118:5: note:                 ‘template<class _Tp, class _Alloc, class _Up> typename std::vector<_Tp, _Alloc>::size_type std::erase(std::vector<_Tp, _Alloc>&, const _Up&)’
  118 |     erase(vector<_Tp, _Alloc>& __cont, const _Up& __value)
      |     ^~~~~
In file included from /usr/include/c++/11/bits/locale_classes.h:40,
                 from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from answer.code:1:
/usr/include/c++/11/string:136:5: note:                 ‘template<class _CharT, class _Traits, class _Alloc, class _Up> typename std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::erase(std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _Up&)’
  136 |     erase(basic_string<_CharT, _Traits, _Alloc>& __cont, const _Up& __value)
      |     ^~~~~
answer.code:9:6: note:                 ‘bool erase [1100]’
    9 | bool erase[N];
      |      ^~~~~
answer.code: In function ‘int main()’:
answer.code:43:16: error: reference to ‘erase’ is ambiguous
   43 |         memset(erase,0,sizeof(erase));
      |                ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:104,
                 from answer.code:1:
/usr/include/c++/11/forward_list:74:5: note: candidates are: ‘template<class _Tp, class _Alloc, class _Up> typename std::forward_list<_Tp, _Alloc>::size_type std::erase(std::forward_list<_Tp, _Alloc>&, const _Up&)’
   74 |     erase(forward_list<_Tp, _Alloc>& __cont, const _Up& __value)
      |     ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:79,
                 from answer.code:1:
/usr/include/c++/11/list:98:5: note:                 ‘template<class _Tp, class _Alloc, class _Up> typename std::__cxx11::list<_Tp, _Alloc>::size_type std::erase(std::__cxx11::list<_Tp, _Alloc>&, const _Up&)’
   98 |     erase(list<_Tp, _Alloc>& __cont, const _Up& __value)
      |     ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:68,
                 from answer.code:1:
/usr/include/c++/11/deque:108:5: note:                 ‘template<class _Tp, class _Alloc, class _Up> typename std::deque<_Tp, _Alloc>::size_type std::erase(std::deque<_Tp, _Alloc>&, const _Up&)’
  108 |     erase(deque<_Tp, _Alloc>& __cont, const _Up& __value)
      |     ^~~~~
In file included from /usr/include/c++/11/functional:62,
                 from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/11/algorithm:74,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
                 from answer.code:1:
/usr/include/c++/11/vector:118:5: note:                 ‘template<class _Tp, class _Alloc, class _Up> typename std::vector<_Tp, _Alloc>::size_type std::erase(std::vector<_Tp, _Alloc>&, const _Up&)’
  118 |     erase(vector<_Tp, _Alloc>& __cont, const _Up& __value)
      |     ^~~~~
In file included from /usr/include/c++/11/bit...