Attention! All code was uploaded on github AFTER the contest deadline.
Code files are the same as in the codeforces database, but slightly refactored.
Branch 'master' contains code for run on codeforces platform. Branch 'for-ide' contains code for straight run in the IDE. Each file in this branch is content of main() in 'master' code.