제출 #42308

#제출 시각아이디문제언어결과실행 시간메모리
42308hsb154질문 (CEOI14_question_grader)C++14
컴파일 에러
0 ms0 KiB
int decode (int n, int q, int h) { int i; h -= 1; int cnt = 0; for (i = 0;; i++) { if (cnt == h % 9) break; if ((q & (1 << i))) cnt++; } if (h>=9&&(q & (1 << i))) return 1; if (h < 9 && (q & (1 << i)) == 0) return 1; return 0; }
int decode (int n, int q, int h) { int i; h -= 1; int cnt = 0; for (i = 0;; i++) { if (cnt == h % 8) break; if ((q & (1 << i))) cnt++; } if (h>=8&&(q & (1 << i))) return 1; if (h < 8 && (q & (1 << i)) == 0) return 1; return 0; }

컴파일 시 표준 에러 (stderr) 메시지

/tmp/ccDltaxu.o: In function `main':
grader_encode.c:(.text.startup+0x10a): undefined reference to `encode(int, int, int)'
collect2: error: ld returned 1 exit status