I am using an approach that will work within the time limit and even the same approach is accepted in C++ but gives TLE in java I have also used Fast IO but still TLE. Can anyone help me with this. Problem Link : https://codeforces.com/contest/986/problem/A Submission : https://codeforces.com/contest/986/submission/132535284