We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Algorithms
- Strings
- Maximum Palindromes
- Discussions
Maximum Palindromes
Maximum Palindromes
Sort by
recency
|
89 Discussions
|
Please Login in order to post a comment
Dont understand why this result is 16, not 2
Input "wldsfubcsxrryqpqyqqxrlffumtuwymbybnpemdiwyqz" 1 15 26
Take it from test case 12.
Can someone help me, describe this?
I pre-computed all FactorialsModuloM and all (FactorialsModuloM)ToPower(M_Minus_2) - for all N in [2, 100000]. Using these everywhere but: Still geting time-out for test cases 22 - 31.
One additional step that I will try is remembering the results from each query for N, K1, K2, ..., Kr - so for any other query with these same numbers we can immediately provide the remembered result.
Few tips to solve this challenge for full score:
C++ is difficult to resolve this problem. Needing to implement BigInt.