Are programming contests evaluated by a jury or automatically?

Hi everybody,

this question is not about an algorithmic problem or something like that, but rather about an aspect of the programming contests which are presented here.
Is there a jury (that means, a group of human beings) who compare the contributions of the different teams, and decide “manually” which team is the winner? Or, is there a kind of backend server, which compiles and evaluates the contributions “automatically”? What I mean is, that this server would be able to check the contributed programs and decide, which program is the best of all and wins.

If it was like that, could somebody of the programmers of codechef.com please tell me, which kind of technology you use to communicate between your main (frontend) server and the backend, which compiles the contributed programs? That information could be very useful to me, because I’m about to develop a platform for programming contests as well, but the contributed programs should be evaluated automatically and not by a human being (because it’s fair against all participants).

Thanks and greetings from Germany

Well its pretty easy to compile and execute the programs submitted by users on the server. I can tell you how to do this on linux servers.

First of all you should have the compilers of all the languages you want to support on the server i.e if you want to give support for C, C++, Java programs then the server should have gcc, g++, jdk installed on the server.

After that you just have to write a program in your sites backend that could execute the system commands for compiling/executing the programs.

For eg. Following is the code, if you want to write your backend in php then to compile and execute a C program

/* here $code_file_name contains the program user has submitted. If this gcc gives some errors/warnings in the program then these errors/warnings would be written to $compile_output_file_name*/

        exec("gcc $code_file_name -o sample 2> $compile_output_file_name"); 
        exec("./sample < input_file > output_file);

Here the input file would have the inputs you would want to give to the program. The generated output by the program would be written to output_file. Then you could diff the generated output with your tested output file to see whether the output produced by user is correct or not.

p.s. This is a very basic idea