10403: D.山区修路 Time Limit: 2 Sec  Memory Limit: 128 MB Submit: 69  Solved: 23 [Submit][Status][Web Board] Description 某山区的孩子们上学必须经过一条凹凸不平的土路,每当下雨天,孩子们非常艰难.现在村里走出来的Dr. Kong决定募捐资金重新修建着条路.由于资金有限,为了降低成本,对修好后的路面高度只能做到单调上升或单调下降. 为了便于修路,我们将整个土路分成了N段,每段路面的高度分…
10402: C.机器人 Time Limit: 2 Sec  Memory Limit: 128 MB Submit: 53  Solved: 19 [Submit][Status][Web Board] Description Dr. Kong 设计的机器人卡尔非常活泼,既能原地蹦,又能跳远.由于受软硬件设计所限,机器人卡尔只能定点跳远.若机器人站在(X,Y)位置,它可以原地蹦,但只可以在(X,Y),(X,-Y),(-X,Y),(-X,-Y),(Y,X),(Y,-X),(-Y,X),(-Y,…
G.Code the Tree Time Limit: 2 Sec  Memory Limit: 128 MB Submit: 35  Solved: 18 [Submit][Status][Web Board] Description A tree (i.e. a connected graph without cycles) with vertices numbered by the integers 1, 2, ..., n is given. The "Prufer" code…
B.海岛争霸 Time Limit: 2 Sec  Memory Limit: 128 MB Submit: 130  Solved: 48 [Submit][Status][Web Board] Description 神秘的海洋,惊险的探险之路,打捞海底宝藏,激烈的海战,海盗劫富等等.加勒比海盗,你知道吧?杰克船长驾驶着自己的的战船黑珍珠1号要征服各个海岛的海盜,最后成为海盗王. 这是一个由海洋.岛屿和海盗组成的危险世界.杰克船长准备从自己所占领的岛屿A开始征程,逐个去占领每一个岛屿.面对危…
10401: A.物资调度 Time Limit: 2 Sec  Memory Limit: 128 MB Submit: 95  Solved: 54 [Submit][Status][Web Board] Description 某地区发生了地震,灾区已经非常困难,灾民急需一些帐篷.衣物.食品和血浆等物资.可通往灾区的道路到处都是塌方,70%以上的路面损坏,桥梁全部被毁.国家立即启动应急预案,展开史上最大强度非作战空运行动,准备向灾区空投急需物资. 一方有难,八方支援.现在已知有N个地方分别…
10396: H.Rectangles Time Limit: 2 Sec  Memory Limit: 128 MB Submit: 229  Solved: 33 [Submit][Status][Web Board] Description Given N (4 <= N <= 100)  rectangles and the lengths of their sides ( integers in the range 1..1,000), write a program that fi…
10399: F.Turing equation Time Limit: 1 Sec  Memory Limit: 128 MB Submit: 151  Solved: 84 [Submit][Status][Web Board] Description The fight goes on, whether to store  numbers starting with their most significant digit or their least  significant digit…
题目大意: 给定一个序列,以最小代价将其变成单调不增或单调不减序列,求最小的变动价值:需要用到离散化dp 状态转移方程: dp[i][j]=abs(j-w[i])+min(dp[i-1][k]);(k<=j)这里的k无需从1遍历到j. 只要在对j进行for循环的时候不断更新一个dp[i-1][j]的最小值mn=min(mn,dp[i-1][j]), 然后对dp[i][j]=abs(j-w[i])+mn即可; #include<algorithm> #include<iostream…
G.Interference Signal Time Limit: 2 Sec  Memory Limit: 128 MB Submit: 35  Solved: 17 [Submit][Status][Web Board] Description Dr.Kong’s laboratory monitor some interference signals. The interference signals can be digitized into a series of positive i…
Description A Swiss-system tournament is a tournament which uses a non-elimination format. The first tournament of this type was a chess tournament in Zurich in 1895, hence the name "Swiss system". The tournament will be held based on following…