Jesse Pinkman
CodeChefOpen on judge ↗
Jesse Pinkman is caught by the cops when he is trying to sell some meth. But the cops will release him if he can help them with this problem. The cops gave Jesse a string S and an integer N, along with another integer K. Jesse has to find the number of strings X such that X is of exactly N length and contains S as a substring atleast K times. Note: that while counting the number of times S occur
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start