Google Code Jam 2014, Qualification Round, B-CookieClickerAlpha small and large, AC. (The code will be submited after the contest ;) )