Getting TLE on test 45 using same logic as mentioned in editorial.

Revision en2, by AnestheticCoder, 2022-07-28 12:25:00

Hello everyone, I was solving problem C of a div 3 contest 1702C - Train and Queries and I just used 2 hash maps to stores the first and last occurence of each station, but on test case 45 its saying TLE.

165981690

Then i read the editorial and tried to using just one hashmap but still it says TLE.

165982877

Please Help.

Tags hashmap, tle

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English AnestheticCoder 2022-07-28 12:25:00 223 (published)
en1 English AnestheticCoder 2022-07-28 12:24:02 640 Initial revision (saved to drafts)