#AT2022. B - A Reverse
B - A Reverse
当前没有测试数据。
B - A Reverse
Score : $200$ points
Problem Statement
You are given integers $L$, $R$, and a string $S$ consisting of lowercase English letters.
Print this string after reversing (the order of) the $L$-th through $R$-th characters.
Constraints
- $S$ consists of lowercase English letters.
- $1 \le |S| \le 10^5$ ($|S|$ is the length of $S$.)
- $L$ and $R$ are integers.
- $1 \le L \le R \le |S|$
Input
Input is given from Standard Input in the following format:
Output
Print the specified string.
3 7
abcdefgh
abgfedch
After reversing the $3$-rd through $7$-th characters of abcdefgh
, we have abgfedch
.
1 7
reviver
reviver
The operation may result in the same string as the original.
4 13
merrychristmas
meramtsirhcyrs