Solutions for different programming competition problems