I though someone already had a test-function that handles your solution exactly in the way the checker on codeforces does. It would be nice if you can simply drop the input and output as multi-line string in a test-file and it checks it against your code.
Let me have a look at all the answers you got in the thread...
Additionally, I had the hope that the codeforces API allows to access problems and lets you submit solutions. Then, everything like testing, submitting and getting the result could be automated.