Ramesh And Suresh
CodeChefOpen on judge ↗
Ramesh and Suresh are playing a game. Ramesh will give Suresh a question to solve and vice versa. So, Ramesh gave Suresh a string consisting of digits from (1 to 9). He also gave him two integers A and B and told him to cut the string S minimum number of times such that every part lies in the range [A,B]. Since, Suresh is weak in programming, he has asked for your help in finding the answer. In
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