실행 실패 (제출 코드 컴파일 에러)
Main.cpp: In member function ‘int Heap::pop()’: Main.cpp:37:14: error: invalid conversion from ‘int*’ to ‘int’ [-fpermissive] 37 | swap(&data[0], &data[heapCnt]); | ^~~~~~~~ | | | int* Main.cpp:18:20: note: initializing argument 1 of ‘void Heap::swap(int&, int&)’ 18 | void swap(int &a, int &b) { | ~~~~~^ Main.cpp:37:14: error: cannot bind rvalue ‘(int)((Heap*)this)->Heap::data’ to ‘int&’ 37 | swap(&data[0], &data[heapCnt]); | ^~~~~~~~ Main.cpp:48:18: error: invalid conversion from ‘int*’ to ‘int’ [-fpermissive] 48 | swap(&data[child], &data[parent]); | ^~~~~~~~~~~~ | | | int* Main.cpp:18:20: note: initializing argument 1 of ‘void Heap::swap(int&, int&)’ 18 | void swap(int &a, int &b) { | ~~~~~^ Main.cpp:48:18: error: cannot bind rvalue ‘(int)(((Heap*)this)->Heap::data + ((sizetype)(((long unsigned int)child) * 4)))’ to ‘int&’ 48 | swap(&data[child], &data[parent]); | ^~~~~~~~~~~~ Main.cpp: In member function ‘void Heap::push(int)’: Main.cpp:66:18: error: invalid conversion from ‘int*’ to ‘int’ [-fpermissive] 66 | swap(&data[child], &data[parent]); | ^~~~~~~~~~~~ | | | int* Main.cpp:18:20: note: initializing argument 1 of ‘void Heap::swap(int&, int&)’ 18 | void swap(int &a, int &b) { | ~~~~~^ Main.cpp:66:18: error: cannot bind rvalue ‘(int)(((Heap*)this)->Heap::data + ((sizetype)(((long unsigned int)child) * 4)))’ to ‘int&’ 66 | swap(&data[child], &data[parent]); | ^~~~~~~~~~~~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.