Vamsi the Magician
CodeChefOpen on judge ↗
Vamsi likes the digits 1 and 9 as he found every number formed out of only these two digits magical for him. One day he got a list of numbers, he was trying to find out the number of magical numbers present in the list. But he finds this task very simple. Then he starts finding such pairs of non-overlapping sub-arrays such that no magical number is present in both the subarrays simultaneously. As
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