Help me in solving MINSIM problem

My issue

I’m having difficulty understanding this question.

My code

#include <bits/stdc++.h>
using namespace std;

int main() {
	// your code goes here

}

Learning course: Two pointers
Problem Link: Minimum Similar Substring Practice Problem in - CodeChef