Prison Mike and his Distinct Substrings

Problem Name:
Prison Mike and his Distinct Substrings
Site:HackerEarth
Links:
Tags:
Problem setters: