Solutions to Timus Online Judge problems