실행 실패 (제출 코드 컴파일 에러)
{"stderr": "Main.cpp: In function \u2018int main()\u2019:\nMain.cpp:24:24: error: \u2018j\u2019 was not declared in this scope\n 24 | if (Nmap.find(Mnum[j] != Nmap.end()) Nmap[Mnum[j]]++;\n | ^\nMain.cpp:25:48: error: expected \u2018)\u2019 before \u2018;\u2019 token\n 25 | cout << Nmap.find(Mnum[j]) -> second << \" \";\n | ^\n | )\nMain.cpp:24:8: note: to match this \u2018(\u2019\n 24 | if (Nmap.find(Mnum[j] != Nmap.end()) Nmap[Mnum[j]]++;\n | ^\nIn file included from /usr/include/c++/11/map:61,\n from Main.cpp:2:\n/usr/include/c++/11/bits/stl_map.h: In instantiation of \u2018void std::map<_Key, _Tp, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _InputIterator = int; _Key = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >]\u2019:\nMain.cpp:13:16: required from here\n/usr/include/c++/11/bits/stl_map.h:894:38: error: no matching function for call to \u2018std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int> >, std::less<int>, std::allocator<std::pair<const int, int> > >::_M_insert_range_unique(int&, int&)\u2019\n 894 | { _M_t._M_insert_range_unique(__first, __last); }\n | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~\nIn file included from /usr/include/c++/11/map:60,\n from Main.cpp:2:\n/usr/include/c++/11/bits/stl_tree.h:1098:9: note: candidate: \u2018template<class _InputIterator> std::__enable_if_t<std::is_same<_Val, typename std::iterator_traits<_InputIterator>::value_type>::value> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_range_unique(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; _Key = int; _Val = std::pair<const int, int>; _KeyOfValue = std::_Select1st<std::pair<const int, int> >; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >]\u2019\n 1098 | _M_insert_range_unique(_InputIterator __first, _InputIterator __last)\n | ^~~~~~~~~~~~~~~~~~~~~~\n/usr/include/c++/11/bits/stl_tree.h:1098:9: note: template argument deduction/substitution failed:\n/usr/include/c++/11/bits/stl_tree.h: In substitution of \u2018template<class _InputIterator> std::__enable_if_t<std::is_same<std::pair<const int, int>, typename std::iterator_traits< <template-parameter-1-1> >::value_type>::value, void> std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int> >, std::less<int>, std::allocator<std::pair<const int, int> > >::_M_insert_range_unique<_InputIterator>(_InputIterator, _InputIterator) [with _InputIterator = int]\u2019:\n/usr/include/c++/11/bits/stl_map.h:894:31: required from \u2018void std::map<_Key, _Tp, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _InputIterator = int; _Key = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >]\u2019\nMain.cpp:13:16: required from here\n/usr/include/c++/11/bits/stl_tree.h:1098:9: error: no type named \u2018value_type\u2019 in \u2018struct std::iterator_traits<int>\u2019\n/usr/include/c++/11/bits/stl_map.h: In instantiation of \u2018void std::map<_Key, _Tp, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _InputIterator = int; _Key = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >]\u2019:\nMain.cpp:13:16: required from here\n/usr/include/c++/11/bits/stl_tree.h:1107:9: note: candidate: \u2018template<class _InputIterator> std::__enable_if_t<(! std::is_same<_Val, typename std::iterator_traits<_InputIterator>::value_type>::value)> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_range_unique(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; _Key = int; _Val = std::pair<const int, int>; _KeyOfValue = st(...truncated, total 5471 characters)
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
비공개 코드입니다. 코드 작성자만 볼 수 있습니다.
반례를 발견하지 못했습니다.