数列极差
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
【题目描述】
在黑板上写了个正整数作成的一个数列,进行如下操作:每一次擦去其中的两个数和,然后在数列中加入一个数,如此下去直至黑板上剩下一个数,在所有按这种操作方式最后得到的数中,最大的,最小的为,则该数列的极差定义为。
【输入】
第一行,一个数为;
第二行,个数。
【输出】
输出极差。
【输入样例】
3
1 2 3
【输出样例】
2
【来源】
一本通在线评测
1108
- Status
- Done
- Rule
- ACM/ICPC
- Problem
- 8
- Start at
- 2025-11-8 14:00
- End at
- 2025-11-8 17:30
- Duration
- 3.5 hour(s)
- Host
- Partic.
- 64