QOJ.ac

QOJ

Time Limit: 2 s Memory Limit: 1024 MB

#23941. Eins bókstafir

Statistics

Gefinn er strengur $S$ af lengd $N$. Hvert tákn í $S$ er enskur lágstafur.

Prentið Yes ef $S$ samanstendur eingöngu af sama stafnum, en annars No.

Inntak

Inntakið er gefið á eftirfarandi sniði:

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

Úttak

Prentið Yes ef $S$ samanstendur eingöngu af sama stafnum, en annars No.

Prentið ekkert annað en svarið. (Prentið ekki setningar sem biðja um inntak o.s.frv.)

Varðandi svarsniðið má styðjast við æfingadæmin og sýnilausnir þeirra.

Takmarkanir

  • $2 \le N \le 100$.
  • $S$ er strengur af lengd $N$.
  • Hvert tákn í $S$ er enskur lágstafur.
  • $N$ er heiltala.

Dæmi

Inntak 1

4
bbbb

Úttak 1

Yes

Athugasemd 1

  • Þar sem strengurinn bbbb samanstendur eingöngu af sama stafnum b, er prentað Yes.

Inntak 2

7
pppdppp

Úttak 2

No

Athugasemd 2

  • Þar sem strengurinn pppdppp inniheldur p og d og samanstendur ekki eingöngu af sama stafnum, er prentað No.

Inntak 3

2
xx

Úttak 3

Yes

Athugasemd 3

  • Þar sem strengurinn xx samanstendur eingöngu af sama stafnum x, er prentað Yes.

Inntak 4

9
joijoijoi

Úttak 4

No

Athugasemd 4

  • Þar sem strengurinn joijoijoi samanstendur ekki eingöngu af sama stafnum, er prentað 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.