1013: 湖南省第十七届大学生计算机程序设计竞赛(HNCPC2021) - Semilive

开始 Start
0000-00-0000:00:00UTC+0
结束 End
0000-00-0000:00:00UTC+0
当前 Now
0000-00-0000:00:00UTC+0
状态 Status
加载中Loading
类型 Type
开放Public
榜单 Rank
加载中Loading
公告 Announcement
暂无公告No announcement

H : Circle Intersection

时间限制Time Limit
1 秒Sec
内存限制Memory Limit
128 兆MB
提交次数Submitted
4 次Times
通过次数Solved
0 次Times

题目描述Description

Calculate the length of the intersection of two circles in 3D space.

输入格式Input

There are no more than 10000 test cases. For each test case two lines of integer numbers are given, describing the two circles in 3D space respectively.

A circle in 3D space is described by 7 integer numbers – its radius r and two 3D coordinates. The first coordinate (x1, y1, z1) is its center, while the second (x2, y2, z2) represents the normal vector of the plane where the circle lies.

It is guaranteed that the two circles given are not parallel or coplanar.

1 ≤ r ≤ 10000, all the other input integers are in range [−10000,10000].

输出格式Output

Each case one line, the lengh of the intersection. The error between the result and the answer should not exceed 10−5.

样例Sample