in case of tle use scanf instead of cin and the problem is solved
getting TLE for task# 4 . Used counting sort but still it gives TLE. Here’s the link : link