P27253 [AtCoder] Inversion of a String
普及+
题目描述

Problem Description

Given a string \( S \) of length \( N \).

Reverse the order of characters from the \( A \)-th character to the \( B \)-th character in \( S \), while keeping the other characters unchanged. The first character of \( S \) is the 1st character, and the last character is the \( N \)-th character.

Write a program that, given the string \( S \) and two integers \( A \) and \( B \), outputs the string obtained by reversing the order of characters from the \( A \)-th character to the \( B \)-th character in \( S \).

Input Format

The input is given from the standard input in the following format:

\( N \) \( A \) \( B \) \( S \)

Output Format

Output the string obtained by reversing the order of characters from the \( A \)-th character to the \( B \)-th character in \( S \) in one line.

Sample Input and Output

Sample Input #1

10 3 7
JOIjoiJoIj

Sample Output #1

JOJiojIoIj

Sample Input #2

9 6 6
abcdefghi

Sample Output #2

abcdefghi

Notes/Hints

Constraints

  • \( 1 \leq A \leq B \leq N \leq 200 \).
  • \( S \) is a string of length \( N \).
  • Each character in \( S \) is either an uppercase or lowercase English letter.

Sample Explanation 2

\( A \) might be equal to \( B \).

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
10 3 7 JOIjoiJoIj
样例输出
JOJiojIoIj