QOJ.ac

QOJ

حد الوقت: 2 s حد الذاكرة: 1024 MB مجموع النقاط: 100

#23873. عكس سلسلة نصية

الإحصائيات

تُعطى سلسلة نصية $S$ طولها $N$.

ما هي السلسلة النصية الناتجة إذا عكسنا ترتيب الأحرف من الحرف رقم $A$ إلى الحرف رقم $B$ في $S$، مع إبقاء الأحرف الأخرى كما هي؟ علمًا بأن الحرف الأول في $S$ هو الحرف رقم $1$، والحرف الأخير هو الحرف رقم $N$.

بمعلومية السلسلة النصية $S$ وعددين ($2$) صحيحين $A, B$، اكتب برنامجًا يطبع السلسلة النصية الناتجة عن عكس ترتيب الأحرف من الحرف رقم $A$ إلى الحرف رقم $B$ في $S$.

الإدخال

يُعطى الإدخال من الإدخال القياسي بالتنسيق التالي:

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

الإخراج

اطبع في سطر واحد ($1$) السلسلة النصية الناتجة عن عكس ترتيب الأحرف من الحرف رقم $A$ إلى الحرف رقم $B$ في $S$.

القيود

  • $1 \le A \le B \le N \le 200$.
  • $S$ سلسلة نصية طولها $N$.
  • كل حرف من $S$ هو حرف إنجليزي كبير أو صغير.

أمثلة

الإدخال 1

10 3 7
JOIjoiJoIj

الإخراج 1

JOJiojIoIj

الإدخال 2

9 6 6
abcdefghi

الإخراج 2

abcdefghi

ملاحظة 2

  • من الممكن أن يكون $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.