This problem may have multiple answers.
One of the answers for each input data is provided in *.ans file.
The C++ source code of a judge program is also provided.

Usage of the judge program:

output_checker <input-file> <output-file> <answer-file>

<input-file> is the input file (C1 - C4 file in this directory), and
<answer-file> is its corresponding answer file (C1.ans - C4.ans).
<output-file> is the file storing the output of your program for the
input data <input-file>.

The exit code is 0 when the answer is correct and non-zero
when it is not correct.

Example:

If your program is "solve" and execute it with input C1,

> ./solve < C1 > C1.out
> ./output_checker C1 C1.out C1.ans
ok correct
> echo $?      ; display exit code
0

