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 1297. Palindrome

Getting WA #7
Posted by paarth 7 Oct 2012 04:05
I have used manacher'a algorithm   and tried all the test cases discussed in these discussions and getting correct solution....
I have used manacher for even and odd palindromes separately and found the longest and if longest comes again... as in the same length..take the smaller start..
but now,... I got WA #7 ...I initially faced some problem in compilation too..please suggest some test case

P.S. : m doing while(getline(cin,string))  and also tried while(cin>>string)
is something to be done here...please suggest
Re: Getting WA #7
Posted by paarth 7 Oct 2012 04:27
Got AC...small error in code: basically typo :D
Re: Getting WA #7
Posted by Andrew Sboev [USU] 7 Oct 2012 13:31
It's just bruteforce task.
Re: Getting WA #7
Posted by [TDUweAI] daminus 22 Jul 2013 11:52
this test":

aaaa
Re: Getting WA #7
Posted by runtime_error 26 Jul 2013 12:01
if string is like : abcdef
you can tranform it like: ^#a#b#c#d#e#f#$ so,even and odd palindromes all is transformed like odd palindromes.