ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1635. Mnemonics and Palindromes

my program
O(N*N) java solution
:(
Anisimov Dmitry (Novosibirsk STU) Re: Time Limit Excedent test 32 wow [1] // Problem 1635. Mnemonics and Palindromes 15 Oct 2008 20:53
I think you solution is really O(N^3), because comparing strings takes O(N) time, not O(1), and true O(N^2) is extremely unlikely to get TL.

Edited by author 15.10.2008 20:54
is true, my solution is O(N^3)
:( slow
The problems has good DP structure:
array of sentres of possible first pallindrom, each such
center is renewed for O(1) when i:=i+1