Faster code than editorial giving TLE

Revision en1, by unt311, 2021-04-27 21:52:12

For this div3 problem (D), I precalculate prefix frequencies of characters (editorial code does not), and I'm still getting [TLE] ((https://mirror.codeforces.com/contest/1385/submission/114392389).

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)