I almost did it (without looking at any hint) but still getting WA on 1 test and TLE on 2 for my JAVA implementation. Can anyone please read my code and tell me where am I wrong.
Results included as comments at the bottom of the file.
Any help is appreciated.
Please do not consider the repository in which it is kept. Only code matters.