Secret Garden】人物记事


人物:[color=#FF0000]supertitan001[/color] [img=][/img]rnrn[img=][/img]rnrn[color=#FF0000]您永远是我们的老大,还记得带我们开黑吗?[/color]rnrn人物:[color=#FF0000]bojiansky[/color] [img=][/img]rnrn[img=][/img]rnrn[img=][/img]rn[color=#FF0000] 还记得我们一起砍SF么?[/color]rnrn人物: [color=#FF0000]baoshiqiang[/color] [img=][/img]rnrn[img=][/img]rn[img=][/img]rn[img=][/img]rn[color=#FF0000]还记得我们一起给MM催生么?[/color]rnrn人物: [color=#FF0000]piaolankeke[/color] [img=][/img]rnrn[img=][/img]rnrn[color=#FF0000]话说可儿姐是里面唯一一位女生,还是大姐头rn 在这给大家爆个料,可儿姐有恐婚症[/color]rn[img=][/img]rn[img=][/img]rnrn人物: [color=#FF0000]IvoryTower[/color] [img=][/img]rnrn[img=][/img]rnrn [color=#FF0000]话说娜娜的十二宫圣斗士很牛X[/color]rnrn人物:[color=#FF0000]xyylove520 [/color] [img=][/img]rnrn[img=][/img]rnrn [color=#FF0000]小哀很低调,但你别以为小哀好欺负!话说小哀真三的实力在CSDN是名列前茅的![/color]rnrn人物:[color=#FF0000]lthyxy[/color] [img=][/img]rnrn [img=][/img]rnrn [color=#FF0000] 飞哥就是有点贪,不然我们的第一次尝试也不会赚的那么少![/color] [img=][/img]rnrn人物:[color=#FF0000]yetaodiao[/color] [img=][/img]rnrn[img=][/img]rnrn [color=#FF0000]V5大人真好[/color][img=][/img]

Bee Garden


DescriptionnnGeorge’s father Ben is fond of bee breeding. He has got a bee garden near his country house and he likes to walk around the garden and gather honey from the hives.nnBen has n hives, located at various points of his garden. Some of them are connected to each other or Ben’s house by straight roads. Ben always walks along the roads, and he never moves from one road to another anywhere except at hives. Neither Ben’s house nor any hive is located on a road.nnThe roads are organized in such a way, that Ben has exactly one way to get from his house to any hive.nnEach week Ben makes a roundtrip. He starts from his house and walks by the roads in such a way that he visits each hive at least once. George once came to see his father and noticed that his father takes the shortest path that allows him to visit each hive and return to his house.nnHe thought that his father is getting older, so Ben must be getting really tired with all that walking. He decided to build another straight road that would help his father to visit all the hives faster. That road must connect two hives or a hive and Ben’s house. Help George to build the road in such a way that his father needs to walk as short a path as possible to visit all the hives and return home.nnNote that neither Ben’s house nor any hive must be located on the new road.nnInputnnThe first line of the input file contains n — the number of the hives (1 ≤ n ≤ 200).nnLet us consider Ben’s garden located on a Cartesian plane in such a way that his house occupied the point (0, 0). The following n lines contain two integer numbers each — the coordinates of the hives. The coordinates do not exceed 10 000 by their absolute values, no two hives coincide, no hive is located at (0, 0). Let the hives be numbered from 1 to n.nnThe following n lines describe roads — each road is described by the numbers of hives it connects, Ben’s house is denoted by 0.nnOutputnnOutput two numbers — the numbers of the hives to be connected by the road. Output 0 instead of hive’s number for Ben’s house.nnIf there is no straight road that shortens Ben’s roundtrip output “-1”.nnSample Inputnn3n1 0n1 1n0 1n0 2n1 2n1 3nSample Outputnn0 3


  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他