摘要: 转自:http://blog.sina.com.cn/s/blog_8b5a0d0001011779.html 三角函数:(所有参数必须为弧度) 1.acos 函数申明:acos (double x); 用途:用来返回给定的 X 的反余弦函数。 2.asin 函数申明:asin (double x) 阅读全文
posted @ 2016-06-18 09:05 konjak魔芋 阅读(1794) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10504 Accepted Submission(s): 3701 Problem Descri 阅读全文
posted @ 2016-06-17 13:44 konjak魔芋 阅读(193) 评论(0) 推荐(0) 编辑
摘要: Description 阿狸喜欢收藏各种稀奇古怪的东西,最近他淘到一台老式的打字机。打字机上只有28个按键,分别印有26个小写英文字母和'B'、'P'两个字母。经阿狸研究发现,这个打字机是这样工作的:l 输入小写字母,打字机的一个凹槽中会加入这个字母(这个字母加在凹槽的最后)。l 按一下印有'B'的 阅读全文
posted @ 2016-06-16 16:39 konjak魔芋 阅读(249) 评论(0) 推荐(0) 编辑
摘要: Problem Description In the modern time, Search engine came into the life of everybody like Google, Baidu, etc.Wiskey also wants to bring this feature 阅读全文
posted @ 2016-06-14 16:59 konjak魔芋 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 2016-06-13 13:13:42 阅读全文
posted @ 2016-06-13 13:11 konjak魔芋 阅读(121) 评论(0) 推荐(0) 编辑
摘要: Description You’ve just built a circuit board for your new robot, and now you need to power it. Your robot circuit consists of a number of electrical 阅读全文
posted @ 2016-06-11 17:21 konjak魔芋 阅读(228) 评论(0) 推荐(0) 编辑
摘要: Description In a country there are n cities connected by m one way roads. You can paint any of these roads. To paint a road it costs d unit of money w 阅读全文
posted @ 2016-06-10 14:57 konjak魔芋 阅读(325) 评论(0) 推荐(0) 编辑
摘要: Description A tournament can be represented by a complete graph in which each vertex denotes a player and a directed edge is from vertex x to vertex y 阅读全文
posted @ 2016-06-05 09:59 konjak魔芋 阅读(248) 评论(0) 推荐(0) 编辑
摘要: Description A prominent microprocessor company has enlisted your help to lay out some interchangeable components(widgets) on some of their computer ch 阅读全文
posted @ 2016-06-04 13:25 konjak魔芋 阅读(539) 评论(0) 推荐(0) 编辑
摘要: Description Presumably, you all have known the question of stable marriage match. A girl will choose a boy; it is similar as the game of playing house 阅读全文
posted @ 2016-05-29 15:07 konjak魔芋 阅读(258) 评论(0) 推荐(0) 编辑
摘要: Description The mobile network market in country XYZ used to be dominated by two large corporations, XYZTelecom and XYZ Mobile. The central government 阅读全文
posted @ 2016-05-27 13:20 konjak魔芋 阅读(340) 评论(0) 推荐(0) 编辑
摘要: Description You are appointed director of a famous concert hall, to save it from bankruptcy. The hall is verypopular, and receives many requests to us 阅读全文
posted @ 2016-05-25 13:25 konjak魔芋 阅读(233) 评论(0) 推荐(0) 编辑
摘要: Description There are N cities, and M directed roads connecting them. Now you want to transport K units ofgoods from city 1 to city N. There are many 阅读全文
posted @ 2016-05-23 13:37 konjak魔芋 阅读(255) 评论(0) 推荐(0) 编辑
摘要: Description We are supposed to make a budget proposal for this multi-site competition. The budget proposal is a matrix where the rows represent differ 阅读全文
posted @ 2016-05-19 16:59 konjak魔芋 阅读(795) 评论(0) 推荐(0) 编辑
摘要: Problem Description 欢迎来到珠海!由于土地资源越来越紧张,使得许多海滨城市都只能依靠填海来扩展市区以求发展。作为Z市的决策人,在仔细观察了Z市地图之后,你准备通过填充某些海域来扩展Z市的海岸线到最长,来吸引更多的游客前来旅游度假。为了简化问题,假设地图为一个N*M的格子,其中一些 阅读全文
posted @ 2016-05-17 16:40 konjak魔芋 阅读(400) 评论(0) 推荐(0) 编辑
摘要: Description 给定一棵有n个节点的无根树和m个操作,操作有2类: 1、将节点a到节点b路径上所有点都染成颜色c; 2、询问节点a到节点b路径上的颜色段数量(连续相同颜色被认为是同一段),如“112221”由3段组成:“11”、“222”和“1”。 请你写一个程序依次完成这m个操作。 给定一 阅读全文
posted @ 2016-05-12 16:32 konjak魔芋 阅读(380) 评论(0) 推荐(0) 编辑
摘要: Description 一棵树上有n个节点,编号分别为1到n,每个节点都有一个权值w。我们将以下面的形式来要求你对这棵树完成一些操作: I. CHANGE u t : 把结点u的权值改为t II. QMAX u v: 询问从点u到点v的路径上的节点的最大权值 III. QSUM u v: 询问从点u 阅读全文
posted @ 2016-05-10 16:52 konjak魔芋 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Description Write a program that takes as input a rooted tree and a list of pairs of vertices. For each pair (u,v) the program determines the closest 阅读全文
posted @ 2016-05-10 13:12 konjak魔芋 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Description A rooted tree is a well-known data structure in computer science and engineering. An example is shown below: In the figure, each node is l 阅读全文
posted @ 2016-05-08 17:11 konjak魔芋 阅读(246) 评论(0) 推荐(0) 编辑
摘要: Description You are given a tree with N nodes. The tree’s nodes are numbered 1 through N and its edges are numbered 1 throughN − 1. Each edge is assoc 阅读全文
posted @ 2016-05-08 14:48 konjak魔芋 阅读(315) 评论(0) 推荐(0) 编辑