#c221403. They Are Everywhere
They Are Everywhere
They Are Everywhere
Problem Source
CF 701C
Problem Description
You are given a string of length , consisting of uppercase and lowercase English letters.
You need to find the shortest substring that contains all the characters that appear in the string.
Output the length of the shortest such substring.
Input Format
The first line contains an integer .
The next line contains a string of length .
Output Format
Output one line containing a number: the answer.
Sample Input 1
7
bcAAcbc
Sample Output 1
3
Sample Input 2
6
aaBCCe
Sample Output 2
5
Constraints
For of the data, .