求和
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.
Description
给出个数,求两个数相加的绝对值的最小值,即求 的最小值,其中不等于。
Input Format
第1行1个正整数 。接下来1行n个整数,表示,每两个数之间用一个空格隔开。
Output Format
一行一个整数,表示答案。
5
-2 6 7 7 -8
1
Hint
【数据规模】
对于40%的数据满足:$n≤10^3,-10^6 ≤a_i≤10^6$。
对于80%的数据满足:$n≤10^5,-10^6≤a_i≤10^6$。
对于100%的数据满足:$n≤10^6,-10^6≤a_i≤10^6$。
2024吉利学院ACM暑假实践周训练5
- Status
- Done
- Rule
- XCPC
- Problem
- 4
- Start at
- 2024-7-5 13:30
- End at
- 2024-7-5 16:30
- Duration
- 3 hour(s)
- Host
- Partic.
- 33