Can anybody explain why my this code giving WA for large datasets. link - CodeChef: Practical coding for everyone