Script for algorithmic contests.