10320 cow trouble help please n.
Download
Skip this Video
Download Presentation
10320 Cow Trouble! Help Please!!

Loading in 2 Seconds...

play fullscreen
1 / 5

10320 Cow Trouble! Help Please!! - PowerPoint PPT Presentation


  • 159 Views
  • Uploaded on

10320 Cow Trouble! Help Please!!. ★★★☆☆ 題組: Contest Archive with Online Judge 題號: 10320 Cow Trouble! Help Please!! 解題者: 郭真爾 解題日期: 20 13 年 4 月 25 日 題意: 有一頭牛被一根長度 R 的繩子拴在一棟建築物 ABCD 的 B 點上 , 草地的範圍為無限大,求牛可以吃到的草的範圍。 Input 會給 l, w  和 R  表示建築物長寬和繩長; l,w,R< 10000 。 Output 要輸到小數點第 10 位。. 題意範例:

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about '10320 Cow Trouble! Help Please!!' - ayala


Download Now An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
10320 cow trouble help please
10320 Cow Trouble! Help Please!!
  • ★★★☆☆
  • 題組:Contest Archive with Online Judge
  • 題號:10320 Cow Trouble! Help Please!!
  • 解題者:郭真爾
  • 解題日期:2013年4月25日
  • 題意:有一頭牛被一根長度R的繩子拴在一棟建築物ABCD的B點上,草地的範圍為無限大,求牛可以吃到的草的範圍。Input會給l, w 和R 表示建築物長寬和繩長;l,w,R< 10000。Output要輸到小數點第10位。
slide2
題意範例:

10 5 5 → l=10 , w=5 , R=5

10 4 8 → l=10 , w=4 , R=8

  • 解法:用繩長R來分各種情況利用暴力法去計算面積
  • 解法範例:

(1) R<=w

l=10 , w=5 , R=5

PI*R*R*3/4=58.9048622548

slide3

(2) w<R<=l

l=10 , w=4 , R=8

PI*R*R*3/4 + PI*(R-w)*(R-w)*1/4

= 163.3628179867

(3) l<R<=l+w

Ans = PI*R*R*3/4

+ PI*(R-w)*(R-w)*1/4

+ PI*(R-l)*(R-l)*1/4

slide4

(4) l+w<R

Ans= PI*R*R*3/4

+ PI*(R-w)*(R-w)*1/4

+ PI*(R-l)*(R-l)*1/4

-扇形DMK

-扇形AKN

+多邊形ACDK

ad