실행 실패 (제출 코드 컴파일 에러)
Main.cpp: In function ‘void merge(char*, char*, int, int, int)’: Main.cpp:34:26: error: expected primary-expression before ‘]’ token 34 | if(arr_bigger(in_arr[] ,in_arr[] )){ | ^ Main.cpp:34:36: error: expected primary-expression before ‘]’ token 34 | if(arr_bigger(in_arr[] ,in_arr[] )){ | ^ Main.cpp:44:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 44 | while(j<right){out_arr[k++]=in_arr[j++];} | ~^~~~~~ Main.cpp: At global scope: Main.cpp:57:5: error: expected unqualified-id before ‘delete’ 57 | delete[] temp; | ^~~~~~ Main.cpp:58:1: error: expected declaration before ‘}’ token 58 | } | ^ Main.cpp: In function ‘int main()’: Main.cpp:96:22: error: no matching function for call to ‘merge(char [64769][8], char [40001], int&, int, int)’ 96 | merge(num_arr,temp,j,i+j,i+j*2); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/11/string:52, 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/ostream:38, from /usr/include/c++/11/iostream:39, from Main.cpp:1: /usr/include/c++/11/bits/stl_algo.h:4927:5: note: candidate: ‘template<class _IIter1, class _IIter2, class _OIter> constexpr _OIter std::merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter)’ 4927 | merge(_InputIterator1 __first1, _InputIterator1 __last1, | ^~~~~ /usr/include/c++/11/bits/stl_algo.h:4927:5: note: template argument deduction/substitution failed: Main.cpp:96:22: note: deduced conflicting types for parameter ‘_IIter1’ (‘char (*)[8]’ and ‘char*’) 96 | merge(num_arr,temp,j,i+j,i+j*2); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/11/string:52, 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/ostream:38, from /usr/include/c++/11/iostream:39, from Main.cpp:1: /usr/include/c++/11/bits/stl_algo.h:4978:5: note: candidate: ‘template<class _IIter1, class _IIter2, class _OIter, class _Compare> constexpr _OIter std::merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare)’ 4978 | merge(_InputIterator1 __first1, _InputIterator1 __last1, | ^~~~~ /usr/include/c++/11/bits/stl_algo.h:4978:5: note: template argument deduction/substitution failed: Main.cpp:96:22: note: deduced conflicting types for parameter ‘_IIter1’ (‘char (*)[8]’ and ‘char*’) 96 | merge(num_arr,temp,j,i+j,i+j*2); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ Main.cpp:31:6: note: candidate: ‘void merge(char*, char*, int, int, int)’ 31 | void merge(char in_arr[],char out_arr[],int start,int mid,int end){ | ^~~~~ Main.cpp:31:17: note: no known conversion for argument 1 from ‘char [64769][8]’ to ‘char*’ 31 | void merge(char in_arr[],char out_arr[],int start,int mid,int end){ | ~~~~~^~~~~~~~ Main.cpp:99:22: error: no matching function for call to ‘merge(char [64769][8], char [40001], int&, int, int)’ 99 | merge(num_arr,temp,j,i+j,40000); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/11/string:52, 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/ostream:38, from /usr/include/c++/11/iostream:39, from Main.cpp:1: /usr/include/c++/11/bits/stl_algo.h:4927:5: note: candidate: ‘template<class _IIter1, class _IIter2, class _OIter> constexpr _OIter std::merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter)’ 4927 | merge(_InputIterator1 __first1, _InputIterator1 __last1, | ^~~~~ /usr/include/c++/11/bits/stl_algo.h:4927:5: note: template argument deduction/substitution failed: Main.cpp:99:22: note: deduced conflicting types for parameter ‘_IIter1’ (‘char (*)[8]’ and ‘char*’) 99 | merge(num_arr,temp,j,i+j,40000); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/11/string:52, 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/ostream:38, from /usr/include/c++/11/iostream:39, from Main.cpp:1: /usr/include/c++/11/bits/stl_algo.h:4978:5: note: candidate: ‘template<class _IIter1, class _IIter2, class _OIter, class _Compare> constexpr _OIter std::merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare)’ 4978 | merge(_InputIterator1 __first1, _InputIterator1 __last1, | ^~~~~ /usr/include/c++/11/bits/stl_algo.h:4978:5: note: template argument deduction/substitution failed: Main.cpp:99:22: note: deduced conflicting types for parameter ‘_IIter1’ (‘char (*)[8]’ and ‘char*’) 99 | merge(num_arr,temp,j,i+j,40000); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ Main.cpp:31:6: note: candidate: ‘void merge(char*, char*, int, int, int)’ 31 | void merge(char in_arr[],char out_arr[],int start,int mid,int end){ | ^~~~~ Main.cpp:31:17: note: no known conversion for argument 1 from ‘char [64769][8]’ to ‘char*’ 31 | void merge(char in_arr[],char out_arr[],int start,int mid,int end){ | ~~~~~^~~~~~~~ Main.cpp:104:22: error: no matching function for call to ‘merge(char [64769][8], char [40001], int&, int, int)’ 104 | merge(num_arr,temp,j,40000,i+j*2); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/11/string:52, 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/ostream:38, from /usr/include/c++/11/iostream:39, from Main.cpp:1: /usr/include/c++/11/bits/stl_algo.h:4927:5: note: candidate: ‘template<class _IIter1, class _IIter2, class _OIter> constexpr _OIter std::merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter)’ 4927 | merge(_InputIterator1 __first1, _InputIterator1 __last1, | ^~~~~ /usr/include/c++/11/bits/stl_algo.h:4927:5: note: template argument deduction/substitution failed: Main.cpp:104:22: note: deduced conflicting types for parameter ‘_IIter1’ (‘char (*)[8]’ and ‘char*’) 104 | merge(num_arr,temp,j,40000,i+j*2); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/11/string:52, 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/ostream:38, from /usr/include/c++/11/iostream:39, from Main.cpp:1: /usr/include/c++/11/bits/stl_algo.h:4978:5: note: candidate: ‘template<class _IIter1, class _IIter2, class _OIter, class _Compare> constexpr _OIter std::merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare)’ 4978 | merge(_InputIterator1 __first1, _InputIterator1 __last1, | ^~~~~ /usr/include/c++/11/bits/stl_algo.h:4978:5: note: template argument deduction/substitution failed: Main.cpp:104:22: note: deduced conflicting types for parameter ‘_IIter1’ (‘char (*)[8]’ and ‘char*’) 104 | merge(num_arr,temp,j,40000,i+j*2); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ Main.cpp:31:6: note: candidate: ‘void merge(char*, char*, int, int, int)’ 31 | void merge(char in_arr[],char out_arr[],int start,int mid,int end){ | ^~~~~ Main.cpp:31:17: note: no known conversion for argument 1 from ‘char [64769][8]’ to ‘char*’ 31 | void merge(char in_arr[],char out_arr[],int start,int mid,int end){ | ~~~~~^~~~~~~~ Main.cpp:107:22: error: no matching function for call to ‘merge(char [64769][8], char [40001], int&, int, int)’ 107 | merge(num_arr,temp,j,40000,40000); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/11/string:52, 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/ostream:38, from /usr/include/c++/11/iostream:39, from Main.cpp:1: /usr/include/c++/11/bits/stl_algo.h:4927:5: note: candidate: ‘template<class _IIter1, class _IIter2, class _OIter> constexpr _OIter std::merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter)’ 4927 | merge(_InputIterator1 __first1, _InputIterator1 __last1, | ^~~~~ /usr/include/c++/11/bits/stl_algo.h:4927:5: note: template argument deduction/substitution failed: Main.cpp:107:22: note: deduced conflicting types for parameter ‘_IIter1’ (‘char (*)[8]’ and ‘char*’) 107 | merge(num_arr,temp,j,40000,40000); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/11/string:52, 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/ostream:38, from /usr/include/c++/11/iostream:39, from Main.cpp:1: /usr/include/c++/11/bits/stl_algo.h:4978:5: note: candidate: ‘template<class _IIter1, class _IIter2, class _OIter, class _Compare> constexpr _OIter std::merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare)’ 4978 | merge(_InputIterator1 __first1, _InputIterator1 __last1, | ^~~~~ /usr/include/c++/11/bits/stl_algo.h:4978:5: note: template argument deduction/substitution failed: Main.cpp:107:22: note: deduced conflicting types for parameter ‘_IIter1’ (‘char (*)[8]’ and ‘char*’) 107 | merge(num_arr,temp,j,40000,40000); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ Main.cpp:31:6: note: candidate: ‘void merge(char*, char*, int, int, int)’ 31 | void merge(char in_arr[],char out_arr[],int start,int mid,int end){ | ^~~~~ Main.cpp:31:17: note: no known conversion for argument 1 from ‘char [64769][8]’ to ‘char*’ 31 | void merge(char in_arr[],char out_arr[],int start,int mid,int end){ | ~~~~~^~~~~~~~ Main.cpp:119:2: error: expected ‘}’ at end of input 119 | } | ^ Main.cpp:60:11: note: to match this ‘{’ 60 | int main(){ | ^
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.