I believe the time complexity of my code is O ( T*(N + 3K + N/2K ) ) ,
where T<=100 and K<=N <=1000 . I believe it should run within 1 sec . Please help me find out my mistake !
Edit - I commented the same thing on the main editorial of this problem but no one replied, so had to create this thread