题号:NC295139
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
Special Judge, 64bit IO Format: %lld
题目描述
Colin is a huge fan of the Kingdom Rush franchise tower defense games. Last year, KR released the latest generation of Kingdom Rush: Kingdom Rush 5: Alliance. As a formidable evil arises in the new generation, an unexpected alliance is taking shape! It will take the finest warriors of Linirea and the relentless Dark Army together to stop it. Therefore, the most attractive feature of the latest generation of games is that you can use two heroes simultaneously!
To measure the power of the double-hero feature, Colin would like to do some simple experiments: Assume that a hero's attack range is a circle on the 2D plane with its coordinates as the center. The path of enemies is a segment on the 2D plane. Colin would like to ask you how long is the total length of the enemy's path that is covered by at least one hero's attack range?
输入描述:
The first line contains three integers
, representing the coordinate of the first hero is
, and the radius of its attack range is
.
The second line contains three integers
, representing the coordinate of the second hero is
, and the radius of its attack range is
.
The third line contains four integers
, representing the path of enemies is a segment from
to
.
输出描述:
A single line with a number, representing the total length of the enemy's path that is covered by at least one hero's attack range.
Your output will be considered correct if the absolute error to the jury does not exceed

.