Given a string s,we need to return the no. of non-empty distinct substrings such that they can be written in the form a+a,where a is a non-empty string.I can't think anything better than O(n^2),Any efficient way to solve this?