Topic 1:farthest Point

Source: Internet
Author: User
Time limit: 5000ms single point time limit: 1000ms memory limit: 256MB description

Given a circle on a two-dimentional plane.

Output the integral point in or on the boundary of the circle which have the largest distance from the center.

Input

One line with three floats which is all accurate to three decimal places, indicating the coordinates of the center x, y a nd the radius r.

For 80% of the data: |x|,|y|<=1000, 1<=r<=1000

For 100% of the data: |x|,|y|<=100000, 1<=r<=100000

Output

One line with a integers separated by one space, indicating the answer.

If There is multiple answers, print the one with the largest x-coordinate.

If There is still multiple answers, print the one with the largest y-coordinate.

Sample input
1.000 1.000 5.000
Sample output
6 1

Topic 1:farthest Point

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.