← All problemsSign in

Ghosh Birthday Party

Ghosh had shortlisted names of friends to invite for his nephew's birthday. However, when he was away, his nephew messed up and saved all the names in a single string S (1Note: If name A happens to be a sub-string of name B, and name B is present in S, both names will be counted in the total. Input: First line contains the string S. Second line contains number of test cases T(1 Output: Output i

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start