Mike and Task Packages

could someone please post mike and tasks algorithm.http://www.codechef.com/problems/MIKE2.thank you.