CNOTE Problem

Problem link- https://www.codechef.com/problems/CNOTE
My solution link- https://ideone.com/3UZtbX
Please tell me where I’m going wrong with this solution.

Note the order.