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.
My algorithm works with case 1 and simple cases found here in the discussion, where we can check by hand, but it fails with the test cases.
For case 2, the solutions are:
67529287
67529287
441870358
916664717
834126565
mine are:
239514543
239514543
865533985
125267162
652571787
Besides reading the editorial, is there another way to check?
Example, these are some results for my algorithm:
aaaaaaaaaabbbbbbbbbb 184755
aaaaaaaaaabbbbbbbbbbcd 369511
aaaaaaaaaabbbbbbbbbbccccccccccdddddddddd 134779297 (this also uses the mod)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Counting Perfect Subsequences
You are viewing a single comment's thread. Return to all comments →
My algorithm works with case 1 and simple cases found here in the discussion, where we can check by hand, but it fails with the test cases. For case 2, the solutions are: 67529287 67529287 441870358 916664717 834126565
mine are: 239514543 239514543 865533985 125267162 652571787 Besides reading the editorial, is there another way to check?
Example, these are some results for my algorithm: