Need help with Codeforces #751 Div 2 — Problem D

Revision en1, by DarthClasher, 2021-10-26 20:28:23

Hi all, I need help to figure out why my submission for Codeforces #751 Div 2 — Problem D — Frog Traveler, is giving TLE. Here is my submission link — https://codeforces.com/contest/1602/submission/133185501 ... I use Java. Tried the approach with a TreeSet and without it, but there seems to be a fundamental flaw in my code.

I would be grateful for any help. Thanks.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English DarthClasher 2021-10-26 20:28:23 491 Initial revision (published)