Ultraviolet A Problem 10209 is this integration? (Do you need points ?)

Source: Internet
Author: User
Tags dot net
// Is this integration? (Do you need points ?) // PC/ultraviolet A IDs: 111307/10209, popularity: A, success rate: high level: 3 // verdict: accepted // submission date: 2011-11-01 // UV Run Time: 0.120 S // copyright (c) 2011, Qiu. Metaphysis # Yeah dot net // [solution] // set the area of the diagonal line to X, the area of the hitting part to Y, and the area of the grid part to Z, there are the following equations: /// x + 3 * Y/4 + z/2 = pI * a * A/4 // X + Y + z = A * A // the equation to be solved, there must be another unique Cube This can be obtained by calculating the area of the overlapping parts of the two 1/4 circles in the lower left and lower right corner. // This overlapping area is easy to calculate and can be obtained after careful observation. /// X + Y/2 + z/4 = pI * a * A/3-SQRT (3) * A/4 // three equations can be obtained: // X = A * a * (1-SQRT (3) + PI/3) // y = a * (2 * SQRT (3)-4 + PI/3) // z = A * a * (4-SQRT (3) -2 * PI/3) # include <iostream> # include <iomanip> # include <cmath> using namespace STD; # define PI 3.141592653589793int main (int ac, char * AV []) {double A, x, y, z; while (CIN> A) {x = A * a * (1-SQRT (3) + PI/3); y = a * (2 * SQRT (3)-4 + PI/3); Z = A * a * (4-SQRT (3) -2 * PI/3); cout. precision (3); cout. SETF (IOs: Fixed | IOs: showpoint); cout <x <"" <Y <"" <z <Endl;} return 0 ;}

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.