실행 실패 (제출 코드 컴파일 에러)
Main.cpp:8:2: error: expected ‘;’ after struct definition 8 | } | ^ | ; Main.cpp: In function ‘void merge(ST_Point, int, int, int, int)’: Main.cpp:24:28: error: no match for ‘operator[]’ (operand types are ‘ST_Point’ and ‘int’) 24 | if(comparePoint(arr[l_count],arr[r_count]){ | ^ Main.cpp:24:41: error: no match for ‘operator[]’ (operand types are ‘ST_Point’ and ‘int’) 24 | if(comparePoint(arr[l_count],arr[r_count]){ | ^ Main.cpp:24:51: error: expected ‘)’ before ‘{’ token 24 | if(comparePoint(arr[l_count],arr[r_count]){ | ~ ^ | ) Main.cpp:30:5: error: expected primary-expression before ‘}’ token 30 | } | ^ Main.cpp:33:27: error: expected ‘]’ before ‘;’ token 33 | temp[merge_count++;]=arr[l_count++;] | ^ | ] Main.cpp:33:28: error: expected primary-expression before ‘]’ token 33 | temp[merge_count++;]=arr[l_count++;] | ^ Main.cpp:33:44: error: expected primary-expression before ‘]’ token 33 | temp[merge_count++;]=arr[l_count++;] | ^ Main.cpp:36:27: error: expected ‘]’ before ‘;’ token 36 | temp[merge_count++;]=arr[r_count++;] | ^ | ] Main.cpp:36:28: error: expected primary-expression before ‘]’ token 36 | temp[merge_count++;]=arr[r_count++;] | ^ Main.cpp:36:44: error: expected primary-expression before ‘]’ token 36 | temp[merge_count++;]=arr[r_count++;] | ^ Main.cpp:39:12: error: no match for ‘operator[]’ (operand types are ‘ST_Point’ and ‘int’) 39 | arr[i]=temp[i] | ^ Main.cpp: In function ‘void mergeSort(ST_Point*, int, int)’: Main.cpp:48:14: error: no matching function for call to ‘merge(ST_Point*&, int&, int, int&, int&)’ 48 | merge(arr, left, mid-1,mid, right); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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:48:14: note: deduced conflicting types for parameter ‘_IIter1’ (‘ST_Point*’ and ‘int’) 48 | merge(arr, left, mid-1,mid, right); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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:48:14: note: deduced conflicting types for parameter ‘_IIter1’ (‘ST_Point*’ and ‘int’) 48 | merge(arr, left, mid-1,mid, right); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Main.cpp:17:6: note: candidate: ‘void merge(ST_Point, int, int, int, int)’ 17 | void merge(ST_Point arr,int left,int left_end, int right, int right_end ){ | ^~~~~ Main.cpp:17:21: note: no known conversion for argument 1 from ‘ST_Point*’ to ‘ST_Point’ 17 | void merge(ST_Point arr,int left,int left_end, int right, int right_end ){ | ~~~~~~~~~^~~ Main.cpp: In function ‘int main()’: Main.cpp:64:15: error: ‘stPoints’ was not declared in this scope; did you mean ‘stPoint’? 64 | mergeSort(stPoints, 0, n - 1); | ^~~~~~~~ | stPoint Main.cpp:67:17: error: ‘points’ was not declared in this scope; did you mean ‘printf’? 67 | cout << points[i].x << " " << points[i].y << "\n"; | ^~~~~~ | printf
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.