QOJ.ac

QOJ

Time Limit: 2 s Memory Limit: 1024 MB

#23941. אותיות זהות

Statistics

נתונה מחרוזת $S$ באורך $N$. כל תו ב-$S$ הוא אות אנגלית קטנה.

הדפיסו Yes אם $S$ מורכבת כולה מאותו תו, ואחרת הדפיסו No.

קלט

הקלט ניתן בפורמט הבא:

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

פלט

הדפיסו Yes אם $S$ מורכבת כולה מאותו תו, ואחרת הדפיסו No.

אל תדפיסו דבר מלבד התשובה. (אל תדפיסו משפטים המבקשים קלט וכדומה.)

לגבי פורמט התשובה, ניתן להיעזר בשאלות התרגול ודוגמאות הפתרון שלהן.

מגבלות

  • $2 \le N \le 100$.
  • $S$ היא מחרוזת באורך $N$.
  • כל תו ב-$S$ הוא אות אנגלית קטנה.
  • $N$ הוא מספר שלם.

דוגמאות

קלט 1

4
bbbb

פלט 1

Yes

הערה 1

  • מכיוון שהמחרוזת bbbb מורכבת כולה מאותו תו b, מדפיסים Yes.

קלט 2

7
pppdppp

פלט 2

No

הערה 2

  • מכיוון שהמחרוזת pppdppp מכילה את p ואת d ואינה מורכבת כולה מאותו תו, מדפיסים No.

קלט 3

2
xx

פלט 3

Yes

הערה 3

  • מכיוון שהמחרוזת xx מורכבת כולה מאותו תו x, מדפיסים Yes.

קלט 4

9
joijoijoi

פלט 4

No

הערה 4

  • מכיוון שהמחרוזת joijoijoi אינה מורכבת כולה מאותו תו, מדפיסים 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.