|
|
вернуться в форум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 Got AC...small error in code: basically typo :D It's just bruteforce task. 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. |
|
|