• 「POJ1066」Treasure Hunt

    「POJ1066」Treasure Hunt

    DescriptionArcheologistsfromtheAntiquitiesandCuriosMuseum(ACM)haveflowntoEgypttoexaminethegreatpyramidofKey-Ops.Usingstate-of-the-arttechnologytheyareabletodeterminethatthelowerfloorofthepyramidisconstructedfromaseriesofstraightlinewalls,whichintersecttoformnumerousenclosedchambers.Currently,nodoorsexisttoallowaccesstoanychamber.Thisstate-of-the-arttechnologyhasalsopinpointedthelocat...

    02014年4月12日3,250几何
  • 「POJ1556」The Doors

    「POJ1556」The Doors

    DescriptionYouaretofindthelengthoftheshortestpaththroughachambercontainingobstructingwalls.Thechamberwillalwayshavesidesatx=0,x=10,y=0,andy=10.Theinitialandfinalpointsofthepatharealways(0,5)and(10,5).Therewillalsobefrom0to18verticalwallsinsidethechamber,eachwithtwodoorways.Thefigurebelowillustratessuchachamberandalsoshowsthepathofminimallength.InputTheinputdatafortheillustratedchamberwould...

    02014年4月12日4,983spfa,几何
  • 「BZOJ1610」[Usaco2008 Feb] Line连线游戏

    「BZOJ1610」[Usaco2008 Feb] Line连线游戏

    DescriptionFarmerJohn最近发明了一个游戏,来考验自命不凡的贝茜。游戏开始的时候,FJ会给贝茜一块画着N(2<=N<=200)个不重合的点的木板,其中第i个点的横、纵坐标分别为X_i和Y_i(-1,000<=X_i<=1,000;-1,000<=Y_i<=1,000)。贝茜可以选两个点画一条过它们的直线,当且仅当平面上不存在与画出直线平行的直线。游戏结束时贝茜的得分,就是她画出的直线的总条数。为了在游戏中胜出,贝茜找到了你,希望你...

    22014年4月12日4,446几何
  • 「POJ2653」Pick – up sticks

    「POJ2653」Pick - up sticks

    DescriptionStanhasnsticksofvariouslength.Hethrowsthemoneatatimeonthefloorinarandomway.Afterfinishingthrowing,Stantriestofindthetopsticks,thatisthesestickssuchthatthereisnostickontopofthem.Stanhasnoticedthatthelastthrownstickisalwaysontopbuthewantstoknowallthesticksthatareontop.Stansticksarevery,verythinsuchthattheirthicknesscanbeneglected.InputInputconsistsofanumberofcases.Thedataforeach...

    02014年4月10日2,754几何
  • 「POJ1269」Intersecting Lines

    「POJ1269」Intersecting Lines

    DescriptionWeallknowthatapairofdistinctpointsonaplanedefinesalineandthatapairoflinesonaplanewillintersectinoneofthreeways:1)nointersectionbecausetheyareparallel,2)intersectinalinebecausetheyareontopofoneanother(i.e.theyarethesameline),3)intersectinapoint.Inthisproblemyouwilluseyouralgebraicknowledgetocreateaprogramthatdetermineshowandwheretwolinesintersect.Yourprogramwillrepeatedlyreadinfourpo...

    02014年4月10日2,542几何
  • 「POJ3304」Segments

    「POJ3304」Segments

    DescriptionGiven n segmentsinthetwodimensionalspace,writeaprogram,whichdeterminesifthereexistsalinesuchthatafterprojectingthesesegmentsonit,allprojectedsegmentshaveatleastonepointincommon.InputInputbeginswithanumber T showingthenumberoftestcasesandthen, T testcasesfollow.Eachtestcasebeginswithalinecontainingapositiveinteger n ≤100showingthenumberofsegments.Afterthat,n linescontai...

    02014年4月10日2,795几何
  • 「POJ2398」Toy Storage

    「POJ2398」Toy Storage

    DescriptionMomanddadhaveaproblem:theirchild,Reza,neverputshistoysawaywhenheisfinishedplayingwiththem.TheygaveRezaarectangularboxtoputhistoysin.Unfortunately,Rezaisrebelliousandobeyshisparentsbysimplythrowinghistoysintothebox.Allthetoysgetmixedup,anditisimpossibleforRezatofindhisfavoritetoysanymore.Reza'sparentscameupwiththefollowingidea.Theyputcardboardpartitionsintothebox.EvenifRezak...

    02014年4月10日3,255几何
  • 「POJ2318」TOYS

    「POJ2318」TOYS

    DescriptionCalculatethenumberoftoysthatlandineachbinofapartitionedtoybox.Momanddadhaveaproblem-theirchildJohnneverputshistoysawaywhenheisfinishedplayingwiththem.TheygaveJohnarectangularboxtoputhistoysin,butJohnisrebelliousandobeyshisparentsbysimplythrowinghistoysintothebox.Allthetoysgetmixedup,anditisimpossibleforJohntofindhisfavoritetoys. John'sparentscameupwiththefollowingidea.Th...

    02014年4月10日4,103几何
  • 「BZOJ2178」圆的面积并

    「BZOJ2178」圆的面积并

    Description给出N个圆,求其面积并Input先给一个数字N,N<=1000接下来是N行是圆的圆心,半径,其绝对值均为小于1000的整数Output面积并,保留三位小数SampleInput721...SampleOutput12707279.690题解辛普森积分法[crayon-6627eabf26a10378252746/] ...

    62014年3月17日9,150几何
  • 「BZOJ1007」[HNOI2008] 水平可见直线

    「BZOJ1007」[HNOI2008] 水平可见直线

    DescriptionInput第一行为N(0<N<50000),接下来的N行输入Ai,BiOutput从小到大输出可见直线的编号,两两中间用空格隔开,最后一个数字后面也必须有个空格SampleInput3-101000SampleOutput12题解算法比较直观,先按斜率排序,再将最小的两条线入栈,然后依次处理每条线,如果其与栈顶元素的交点在上一个点的左边,则将栈顶元素出栈;这样为什么对呢?因为对如任意一个开口向上的半凸包,从左到右依次观察每条边和每个...

    52014年2月24日7,703几何
  • 「cogs896」圈奶牛

    「cogs896」圈奶牛

    描述农夫约翰想要建造一个围栏用来围住他的奶牛,可是他资金匮乏。他建造的围栏必须包括他的奶牛喜欢吃草的所有地点。对于给出的这些地点的坐标,计算最短的能够围住这些点的围栏的长度。PROGRAMNAME:fcINPUTFORMAT(filefc.in)输入数据的第一行包括一个整数 N。N(0<=N<=10,000)表示农夫约翰想要围住的放牧点的数目。接下来N 行,每行由两个实数组成,Xi 和 Yi,对应平面上的放牧点坐标(-1...

    02014年2月7日4,017凸包
5 / 5 « 上一页 1 ...3 4 5