QOJ.ac

QOJ

Süre Sınırı: 2 s Bellek Sınırı: 1024 MB Toplam puan: 100

#23873. Inversione di una stringa

İstatistikler

È data una stringa $S$ di lunghezza $N$.

Quale stringa si ottiene invertendo l'ordine dei caratteri dal carattere $A$-esimo al carattere $B$-esimo di $S$, lasciando invariati gli altri caratteri? Qui, il primo carattere di $S$ è il $1$° carattere e l'ultimo carattere è l'$N$-esimo carattere.

Data la stringa $S$ e $2$ interi $A, B$, scrivi un programma che stampi la stringa ottenuta invertendo l'ordine dei caratteri dal carattere $A$-esimo al carattere $B$-esimo di $S$.

Input

L'input è fornito dallo standard input nel seguente formato:

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

Output

Stampa su $1$ riga la stringa ottenuta invertendo l'ordine dei caratteri dal carattere $A$-esimo al carattere $B$-esimo di $S$.

Vincoli

  • $1 \le A \le B \le N \le 200$.
  • $S$ è una stringa di lunghezza $N$.
  • Ogni carattere di $S$ è una lettera maiuscola o minuscola dell'alfabeto inglese.

Esempi

Input 1

10 3 7
JOIjoiJoIj

Output 1

JOJiojIoIj

Input 2

9 6 6
abcdefghi

Output 2

abcdefghi

Note 2

  • È possibile che $A = B$.

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.