• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            Brian Warehouse

            Some birds aren`t meant to be caged, their feathers are just too bright... ...
            posts - 40, comments - 16, trackbacks - 0, articles - 1

            POJ 1005 I Think I Need a Houseboat

            Posted on 2010-08-17 14:09 Brian 閱讀(276) 評論(0)  編輯 收藏 引用 所屬分類: POJ

            Description

            Fred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land, he learned that the state of Louisiana is actually shrinking by 50 square miles each year, due to erosion caused by the Mississippi River. Since Fred is hoping to live in this house the rest of his life, he needs to know if his land is going to be lost to erosion.

            After doing more research, Fred has learned that the land that is being lost forms a semicircle. This semicircle is part of a circle centered at (0,0), with the line that bisects the circle being the X axis. Locations below the X axis are in the water. The semicircle has an area of 0 at the beginning of year 1. (Semicircle illustrated in the Figure.)

            POJ 1005 I Think I Need a Houseboat - Icho - Brian Warehouse

            Input

            The first line of input will be a positive integer indicating how many data sets will be included (N). Each of the next N lines will contain the X and Y Cartesian coordinates of the land Fred is considering. These will be floating point numbers measured in miles. The Y coordinate will be non-negative. (0,0) will not be given.

            Output

            For each data set, a single line of output should appear. This line should take the form of: “Property N: This property will begin eroding in year Z.” Where N is the data set (counting from 1), and Z is the first year (start from 1) this property will be within the semicircle AT THE END OF YEAR Z. Z must be an integer. After the last data set, this should print out “END OF OUTPUT.”
             
            把題意弄明白,就知道這道題是水題了,由坐標 (0,0) 開始,以半圓為形狀每年侵蝕50 平方 miles ,問你從 (0,0) 開始到 (x,y) 結束需要多長時間,水題不需要太關注效率,所以變量定義上沒有深究,其他不解釋。
            編譯器 C + + :
            #include <iostream>
            using namespace std;
            #define PI 3.1415926
            int main()
            {
                 int n,i=0,year;
              double x,y,area;     
                 cin>>n;
                 while (i<n)
              {
                     cin>>x>>y;
                     area = 0.5 * PI * (x*x+y*y); // semicircle area equation
                     year = area/50;
                     printf("Property %d: This property will begin eroding in year %d.\n",i+1,year+1);
               i++;
                 }
                 printf("END OF OUTPUT.\n");
              return 0;
            }
            久久久噜噜噜久久| 久久精品夜夜夜夜夜久久| 国产精品久久久久乳精品爆| 久久综合丁香激情久久| 久久综合久久综合九色| 久久久久久久综合综合狠狠| 久久人人爽人人人人片av| 久久国产高潮流白浆免费观看| 欧美777精品久久久久网| 日本精品一区二区久久久| 伊人久久大香线蕉AV色婷婷色 | 国产午夜精品久久久久九九电影 | 大香伊人久久精品一区二区| 亚洲精品无码久久久久久| 久久精品国产一区二区三区不卡 | 久久黄视频| 99久久无色码中文字幕| 久久99精品国产麻豆蜜芽| 久久精品国产亚洲AV麻豆网站| 久久无码一区二区三区少妇| 精品国产91久久久久久久| 狠狠精品久久久无码中文字幕| 国产成人99久久亚洲综合精品| 久久亚洲欧美国产精品| 欧美亚洲国产精品久久久久| 99久久精品久久久久久清纯| 亚洲级αV无码毛片久久精品| 久久97久久97精品免视看| 青青青青久久精品国产| 精品熟女少妇a∨免费久久| 日韩精品无码久久久久久| 精品久久久一二三区| 久久毛片一区二区| 久久综合偷偷噜噜噜色| 伊色综合久久之综合久久| 性欧美大战久久久久久久| 国产精品久久久久久久久久免费| 亚洲精品高清久久| 久久亚洲国产成人精品无码区| 精品国产91久久久久久久a| 久久久久久国产精品美女|