A framework for a certain kind of programming contests