https://www.codechef.com/submit/MINPERM

can anyone tell me why i am getting segmentation error , though my time complexity is big oh of n , plzz help :slight_smile: