실행 실패 (제출 코드 컴파일 에러)
Main.cpp: In function ‘int binarySearch(std::vector<int>&, int, int, int)’: Main.cpp:58:26: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 58 | if(left >= 0 && left < list.size()){ | ~~~~~^~~~~~~~~~~~~ Main.cpp:59:51: error: ‘absTarget’ was not declared in this scope; did you mean ‘target’? 59 | if(std::abs(target - list[left]) < std::abs(absTarget - list[right])){ | ^~~~~~~~~ | target Main.cpp: In function ‘int main(int, char**)’: Main.cpp:15:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 15 | scanf("%d", &N); | ~~~~~^~~~~~~~~~ Main.cpp:20:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 20 | scanf("%d", &list[i]); | ~~~~~^~~~~~~~~~~~~~~~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.