Accomplishing various programming olympiad tasks