B - Small and Large Integers
Editorial
/


Time Limit: 2 sec / Memory Limit: 256 MB
配点 : 点
問題文
以下を満たす整数をすべて昇順に出力してください。
- 以上 以下の整数の中で、小さい方から 番目以内であるか、大きい方から 番目以内である
制約
- 入力はすべて整数である
入力
入力は以下の形式で標準入力から与えられる。
出力
上の条件を満たす整数をすべて昇順に出力せよ。
入力例 1Copy
Copy
3 8 2
出力例 1Copy
Copy
3 4 7 8
- は 以上 以下の整数の中で小さい方から 番目です。
- は 以上 以下の整数の中で小さい方から 番目です。
- は 以上 以下の整数の中で大さい方から 番目です。
- は 以上 以下の整数の中で大さい方から 番目です。
入力例 2Copy
Copy
4 8 3
出力例 2Copy
Copy
4 5 6 7 8
入力例 3Copy
Copy
2 9 100
出力例 3Copy
Copy
2 3 4 5 6 7 8 9
Score : points
Problem Statement
Print all the integers that satisfies the following in ascending order:
- Among the integers between and (inclusive), it is either within the smallest integers or within the largest integers.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print all the integers that satisfies the condition above in ascending order.
Sample Input 1Copy
Copy
3 8 2
Sample Output 1Copy
Copy
3 4 7 8
- is the first smallest integer among the integers between and .
- is the second smallest integer among the integers between and .
- is the second largest integer among the integers between and .
- is the first largest integer among the integers between and .
Sample Input 2Copy
Copy
4 8 3
Sample Output 2Copy
Copy
4 5 6 7 8
Sample Input 3Copy
Copy
2 9 100
Sample Output 3Copy
Copy
2 3 4 5 6 7 8 9