QOJ.ac

QOJ

Time Limit: 2 s Memory Limit: 1024 MB Total points: 100

#23873. Viðsnúningur strengs

Statistics

Gefinn er strengur $S$ af lengd $N$.

Hvaða strengur myndast ef við snúum við röð stafanna frá $A$-ta staf til $B$-ta stafs í $S$, en látum aðra stafi halda sér óbreyttum? Hér er fyrsti stafurinn í $S$ talinn $1$. stafurinn og síðasti stafurinn er $N$-ti stafurinn.

Þegar gefinn er strengurinn $S$ og $2$ heiltölur $A, B$, skrifið forrit sem prentar út strenginn sem myndast þegar röð stafanna frá $A$-ta staf til $B$-ta stafs í $S$ er snúið við.

Inntak

Inntakið er gefið úr staðalinntaki á eftirfarandi sniði:

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

Úttak

Prentið í $1$ línu strenginn sem myndast þegar röð stafanna frá $A$-ta staf til $B$-ta stafs í $S$ er snúið við.

Takmarkanir

  • $1 \le A \le B \le N \le 200$.
  • $S$ er strengur af lengd $N$.
  • Hvert tákn í $S$ er enskur hástafur eða lágstafur.

Dæmi

Inntak 1

10 3 7
JOIjoiJoIj

Úttak 1

JOJiojIoIj

Inntak 2

9 6 6
abcdefghi

Úttak 2

abcdefghi

Athugasemd 2

  • Það getur verið að $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.