3104: Find Longest Self-Contained Substring

Problem Statement