Lucifer and Magical Substrings

Problem Name:
Lucifer and Magical Substrings
Site:Spoj
Links:
Tags:
Problem setters: