A. 连线问题
连线问题
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
在二维平面上,直线 上有 个点,坐标为 直线上有m个点,坐标为; 任意两点之间连线的代价为它们的欧几里得距离 现在你想把这 {n+m}l联通(任意两点间有路径),求最小总代价
Format
输入格式
第一行四个整数 第二行个整数,为的差分数组(即距离上一个点的距离) 第二行个整数,为的差分数组
输出格式
输出一个小数,代表最小总代价,保留小数点后2位
样例
2 3 1 3
1 2
2 2
7.24
10 10 10 1000
1 2000000 10 10 10 10 10 10 10 1
1000006 1000000 10 10 10 10 10 10 10 10
2001141.99
7 6 1 3
1 2 1 3 3 9 2
8 5 1 2 5 4
29.28
7 6 6 3
1 2 1 3 3 9 2
1 5 1 8 5 4
35.99
数据范围
对于 10% 的数据, 对于 40% 的数据, 对于 70% 的数据, 对于 100% 的数据,,,
test
- Status
- Done
- Rule
- OI
- Problem
- 1
- Start at
- 2025-8-4 21:00
- End at
- 2025-8-4 23:00
- Duration
- 2 hour(s)
- Host
- Partic.
- 0