编程介的小学生 2019-03-11 13:21 采纳率: 20.5%
浏览 190

圆圈上的点集的绝对值的差的计算,使用C语言求解这个算法

Problem Description
There is a cycle with its center on the origin.
Now give you a point on the cycle, you are to find out the other two points on it, to maximize the sum of the distance between each other
you may assume that the radius of the cycle will not exceed 1000.

Input
There are T test cases, in each case there are 2 decimal number representing the coordinate of the given point.

Output
For each testcase you are supposed to output the coordinates of both of the unknow points by 3 decimal places of precision
Alway output the lower one first(with a smaller Y-coordinate value), if they have the same Y value output the one with a smaller X.

NOTE
when output, if the absolute difference between the coordinate values X1 and X2 is smaller than 0.0005, we assume they are equal.

Sample Input
2
1.500 2.000
563.585 1.251

Sample Output
0.982 -2.299 -2.482 0.299
-280.709 -488.704 -282.876 487.453

  • 写回答

0条回答

    报告相同问题?

    悬赏问题

    • ¥20 搭建pt1000三线制高精度测温电路
    • ¥15 使用Jdk8自带的算法,和Jdk11自带的加密结果会一样吗,不一样的话有什么解决方案,Jdk不能升级的情况
    • ¥15 画两个图 python或R
    • ¥15 在线请求openmv与pixhawk 实现实时目标跟踪的具体通讯方法
    • ¥15 八路抢答器设计出现故障
    • ¥15 opencv 无法读取视频
    • ¥15 按键修改电子时钟,C51单片机
    • ¥60 Java中实现如何实现张量类,并用于图像处理(不运用其他科学计算库和图像处理库))
    • ¥20 5037端口被adb自己占了
    • ¥15 python:excel数据写入多个对应word文档