실행 실패 (제출 코드 컴파일 에러)
Main.cpp: In function ‘int init(int, int, int)’: Main.cpp:9:5: error: expected ‘,’ or ‘;’ before ‘return’ 9 | return Tree[n] = init(n*2, st, mid) + init(n*2+1, mid+1, end); | ^~~~~~ Main.cpp:8:9: warning: unused variable ‘mid’ [-Wunused-variable] 8 | int mid = (st+end)/2 | ^~~ Main.cpp: In function ‘int main()’: Main.cpp:31:23: error: ‘n’ was not declared in this scope 31 | for(int i = 1; i<=n; i++){ | ^ Main.cpp:43:25: error: void value not ignored as it ought to be 43 | res = update(1, 1, N, upd, newn); | ~~~~~~^~~~~~~~~~~~~~~~~~~~ Main.cpp: In function ‘int init(int, int, int)’: Main.cpp:8:9: warning: control reaches end of non-void function [-Wreturn-type] 8 | int mid = (st+end)/2 | ^~~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
비공개 코드입니다. 코드 작성자만 볼 수 있습니다.
반례를 발견하지 못했습니다.