Complex String
InterviewTime limit2sMemory limit1024 MB
Given a string of length N over the letters A through E, decide whether at least 3 distinct characters appear.
- Level
Easy1 of 10
- Topics
- String, Implementation
- Solved
- No attempts yet
Problem
You are given a string S of length N. Each character of S is one of A, B, C, D, E.
If at least 3 distinct characters appear in S, print Yes; otherwise, print No.
Input
Input is given from standard input in the following format.
N
S
Output
If at least 3 distinct characters appear in S, print Yes; otherwise, print No.
Constraints
1 ≤ N ≤ 100.Sis a string of lengthN.- Each character of
Sis one ofA,B,C,D,E. Nis an integer.