Solutions for codechef problems