#abc356a. A - Subsegment Reverse
A - Subsegment Reverse
Score : points
问题陈述
给定正整数 , 和 。 对于长度为 的序列 ,执行了一次反转第 个到第 个元素的操作。 打印出执行此操作后的序列。
以上为大语言模型 kimi 翻译,仅供参考。
Problem Statement
You are given positive integers , , and .
For a sequence of length , an operation of reversing the -th through -th elements was performed once.
Print the sequence after this operation.
Constraints
- All input values are integers.
Input
The input is given from Standard Input in the following format:
Output
Let be the sequence after the operation. Print it in the following format:
Sample Input 1
5 2 3
Sample Output 1
1 3 2 4 5
Initially, .
After reversing the second through third elements, the sequence becomes , which should be printed.
Sample Input 2
7 1 1
Sample Output 2
1 2 3 4 5 6 7
It is possible that .
Sample Input 3
10 1 10
Sample Output 3
10 9 8 7 6 5 4 3 2 1
It is possible that or .