Solution for problems found in various programming competitions