Hi, I'm attempting this problem with string hashing.
It works well for small inputs but gives wrong answer on very large inputs.
Any help on what could be wrong?
Problem : https://mirror.codeforces.com/contest/271/problem/D
Submission: https://mirror.codeforces.com/contest/271/submission/46239564