# Partial Judge Note ## Intro. to Programming Ⅱ, Prof. Kuo In case you're not so familiar with **partial-judged problems**, this note intoduces this mechanism in brief. Normally, on the online judge, you're asked to submit a piece of complete codes, say `Main.c(pp)`, that contains the `main()` function. The judge would compile your codes like: ```bash gcc Main.c -o a.out ``` and execute the binary with the testcases. Nevertheless, for **partial-judged problems**, you would be given the _partial judge header_ and _code_, say `function.h` and `parJudge.c(pp)`, and you're required to implement the functions (or the classes, ...) declared in the header. The judge would compile your codes like: ```bash gcc parJudge.c Main.c -o a.out ``` Technically, the compiler would compile the _partial judge code_ and the codes you submited to two object files respectively, and then link the objects to create the binary. You will learn the detail in this course. ## Example Suppose the _partial judge header_ `function.h`: ```c void hello(); ``` And the _partial judge code_ `parJudge.c`: ```c #include "function.h" int main() { hello(); return 0; } ``` You should implement the function `hello()` in another `.c` file: ```c #include "function.h" void hello() { puts("hello, world"); } ```