Running Median | TLE in 2 test cases

why am I getting TLE? How to optimize my code further. currently, I am maintaining two heaps, max and min

hello @Avi-Kasliwal-315786729062203
use fast io in your code.
i.e
add these two lines in the very first line of main function.
ios_base::sync_with_stdio(false);
cin.tie(NULL);

why we are adding this?