Successful solution for Magical Girl and Colored Liquid Potions problem - http://www.codechef.com/OCT14/problems/PRPOTION