ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1550. Dean's Pyramid 3

Caesar_KZ HELP [5] // Problem 1550. Dean's Pyramid 3 21 Apr 2007 13:59
The task is to find a volume of Piramid - volume of cylindr ? CAn you tell me the FORMULA?
Kollekcioner2007 Re: HELP [4] // Problem 1550. Dean's Pyramid 3 21 Jun 2007 02:29
It is very easy)))
    double res = sqr(w)*h/3-h*pi*sqr(r)*(w-2*fabs((((y >= x && y >= -x) || (y < x && y < -x)) ? y : x)))/w;
Neizvestnii Re: HELP [1] // Problem 1550. Dean's Pyramid 3 21 Jun 2007 14:54
What procedure fabs does?
Paul Diac Re: HELP // Problem 1550. Dean's Pyramid 3 7 Sep 2007 22:38
abs (absolute value) for float.
Paul Diac Re: HELP // Problem 1550. Dean's Pyramid 3 7 Sep 2007 23:27
How can you solve it so easy?
ArcSin Re: HELP // Problem 1550. Dean's Pyramid 3 16 Oct 2007 21:56
Kollekcioner2007 wrote 21 June 2007 02:29
It is very easy)))
    double res = sqr(w)*h/3-h*pi*sqr(r)*(w-2*fabs((((y >= x && y >= -x) || (y < x && y < -x)) ? y : x)))/w;
Why is minus?   ..w-2*fabs..