Solutions and test data (gzipped tar)

In each problem folder there is a judge's solution entitled "solution.cc". Also, there are multiple test cases, where each test has an associated x.in (the input file) and x.out (the output file, or in some cases, a hint for the checker program). For problem folders without a checker.cc file, the output of a correct solution on x.in should exactly match the contents of x.out; you can check this in Unix via diff. When there is a checker, you should compile the checker, e.g.:

g++ checker.cc -o checker

Now to check correctness of your program on a particular input, e.g. x.in, you should do the following:

$ g++ my_solution.cc -o sol
$ ./sol < x.in > x.ans
$ ./checker x.in x.ans x.out

The checker will output "OK" if your solution passed on x.in. If you are not testing solutions on athena, you will probably need to change the first line of the checker for the "edit" problem to point to the correct path to python on your machine.