The time to complete all questions is 120 minutes. The allowed programming languages are C, C++, Java.

Input/Output format rules

All programs will be re-compiled prior to testing with the judges' data. Non-standard libraries cannot be used in your solutions. The Standard Template Library (STL) and C++ string libraries are allowed. Programming style is not considered in this contest. You are free to code in whatever style you prefer. Documentation is not required. Each solution is given limited CPU time and memory to run for each input file.

Submitting solutions

Your solution must be coded in a single source file. In order to submit:

The judge's response should appear a few moments later.