실행 실패 (제출 코드 컴파일 에러)
Main.cpp:24:16: error: ‘bool select [8]’ redeclared as different kind of entity 24 | bool select[MAX]; | ^ In file included from /usr/include/aarch64-linux-gnu/sys/types.h:179, from /usr/include/stdlib.h:395, from /usr/include/c++/11/cstdlib:75, from /usr/include/c++/11/bits/stl_algo.h:59, 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/aarch64-linux-gnu/sys/select.h:102:12: note: previous declaration ‘int select(int, fd_set*, fd_set*, fd_set*, timeval*)’ 102 | extern int select (int __nfds, fd_set *__restrict __readfds, | ^~~~~~ Main.cpp: In function ‘void DFS(int)’: Main.cpp:40:20: warning: pointer to a function used in arithmetic [-Wpointer-arith] 40 | if(select[i] == false) | ^ Main.cpp:40:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 40 | if(select[i] == false) | ~~~~~~~~~~^~~~~~~~ Main.cpp:42:21: warning: pointer to a function used in arithmetic [-Wpointer-arith] 42 | select[i] = true; | ^ Main.cpp:42:23: error: assignment of read-only location ‘*(select + ((sizetype)i))’ 42 | select[i] = true; | ~~~~~~~~~~^~~~~~ Main.cpp:46:21: warning: pointer to a function used in arithmetic [-Wpointer-arith] 46 | select[i] = false; | ^ Main.cpp:46:23: error: assignment of read-only location ‘*(select + ((sizetype)i))’ 46 | select[i] = false; | ~~~~~~~~~~^~~~~~~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
비공개 코드입니다. 코드 작성자만 볼 수 있습니다.
반례를 발견하지 못했습니다.