Please read the new rule regarding the restriction on the use of AI tools. ×

Faster code than editorial giving TLE

Revision en2, by unt311, 2021-04-27 21:53:09

For this div3 problem (D),

I precalculate prefix frequencies of characters (editorial code does not), and I'm still getting TLE

My solve function's parameters are - 1. int c (character 0 is 'a', 25 is 'z') 2. int i (starting point of substring in consideration) 3. int j (length of the substring in consideration) [ using (1<<j) ]

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English unt311 2021-04-27 21:53:09 7
en1 English unt311 2021-04-27 21:52:12 489 Initial revision (published)