A trick for getting an extended time (and memory) limit on competitive-programming environments