QOJ.ac

QOJ

Time Limit: 2 s Memory Limit: 1024 MB

#23941. Matched Letters

Statistics

You are given a string $S$ of length $N$. Each character of $S$ is a lowercase English letter.

Output Yes if $S$ consists of all the same characters, and No otherwise.

Input

The input is given in the following format:

$$ \begin{aligned} &N \\ &S \end{aligned} $$

Output

Output Yes if $S$ consists of all the same characters, and No otherwise.

Do not output anything other than the answer. (Do not output sentences prompting for input, etc.)

For the answer format, you may refer to the practice problems and their sample solutions.

Constraints

  • $2 \le N \le 100$.
  • $S$ is a string of length $N$.
  • Each character of $S$ is a lowercase English letter.
  • $N$ is an integer.

Examples

Input 1

4
bbbb

Output 1

Yes

Note 1

  • Since the string bbbb consists of all the same character b, output Yes.

Input 2

7
pppdppp

Output 2

No

Note 2

  • Since the string pppdppp contains p and d and does not consist of all the same characters, output No.

Input 3

2
xx

Output 3

Yes

Note 3

  • Since the string xx consists of all the same character x, output Yes.

Input 4

9
joijoijoi

Output 4

No

Note 4

  • Since the string joijoijoi does not consist of all the same characters, output No.

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.