Solution similar to editorial got TLE verdict ("Queries for Number of Palindromes" problem)

Revision en2, by sigma_g, 2019-02-14 18:10:12

Problem: https://codeforces.com/contest/245/problem/H

My solution: https://codeforces.com/contest/245/submission/49911945
Editorial solution: https://codeforces.com/contest/245/submission/2622404

Both of the codes look exactly the same, and have the same logic. Yet mine is TLE. Could anyone please help me understand why that is the case?

Tags string, tle, palindrome

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English sigma_g 2019-02-14 18:10:12 2 line break fixed
en1 English sigma_g 2019-02-14 18:09:32 437 Initial revision (published)