上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页
摘要: 找出一堆点的最小生成树题目:Problem A: FrecklesIn an episode of the Dick Van Dyke show, little Richie connects the freckles on his Dad's back to form a picture of the Liberty Bell. Alas, one of the freckles turns out to be a scar, so his Ripley's engagement falls through.Consider Dick's back to be a p 阅读全文
posted @ 2014-01-07 13:10 doubleshik 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 感觉就是求1~ n 然后家在中间的k位置,求1~ k-1 的和等于k+1~n题目:Street NumbersA computer programmer lives in a street with houses numbered consecutively (from 1) down one side of the street. Every evening she walks her dog by leaving her house and randomly turning left or right and walking to the end of the street and bac 阅读全文
posted @ 2014-01-02 22:34 doubleshik 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 一道典型树状数组的两个基本操作主要学习了一下题目:敌兵布阵Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 33840Accepted Submission(s): 14446Problem Description C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个 阅读全文
posted @ 2014-01-01 23:57 doubleshik 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 给出一个tape的最大时常,再给出一些CD的长度, 问最多能copy多少到tape上,要求打印哪些cd要打印路径就在计算的时候记录一下前一个是什么, 然后递归打印 。。 注意tape最大时间设置大一点,一开始1000wa了题目:CDYou have a long drive by car ahead. You have a tape recorder, but unfortunately your best music is on CDs. You need to have it on tapes so the problem to solve is: you have a tape N mi 阅读全文
posted @ 2014-01-01 18:45 doubleshik 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 题目大意是一家人去超市抢购, 每个人的能力有限,问全家一共能搬走多少价值最大的东西就是对每个人做一次01背包。累加总和。。 注意给数组初始化只需要 0 那一行题目:SuperSaleThere is a SuperSale in a SuperHiperMarket. Every person can take only one object of each kind, i.e. one TV, one carrot, but for extra low price. We are going with a whole family to that SuperHiperMarket. Ever 阅读全文
posted @ 2014-01-01 17:21 doubleshik 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 同时满足爸妈要求的城市题目:Problem E: VacationThe ProblemYou are planning to take some rest and to go out on vacation, but you really don't know which cities you should visit. So, you ask your parents for help. Your mother says "My son, you MUST visit Paris, Madrid, Lisboa and London. But it's only 阅读全文
posted @ 2013-12-29 21:02 doubleshik 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 题目大意是给出 大象的体重和智商,要求选出最多的大象能组成 体重严格增大,智商严格减小是《入门经典》上的DAG 嵌套矩形d[i] = max ( d[j] +1 ) i,j 为相连的边题目:Question 1: Is Bigger Smarter?The ProblemSome people think that the bigger an elephant is, the smarter it is. To disprove this, you want to take the data on a collection of elephants and put as large a su. 阅读全文
posted @ 2013-12-29 20:40 doubleshik 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 大意就是给出两排数字, 求最大公共子序列。题目:Problem BThe Twin TowersInput: standard inputOutput: standard outputOnce upon a time, in an ancient Empire, there were two towers of dissimilar shapes in two different cities. The towers were built by putting circular tiles one upon another. Each of the tiles was of the same 阅读全文
posted @ 2013-12-29 19:05 doubleshik 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 这道题目类似 矩阵乘法的 类型。一根木快长 N , 切一下 代价为 N , 然后分别求 继续往下切的代价。。 题目中给出要切的点。d[ i ][ j ] = j-i + min ( d[i][k] + d[k] [j] ) k属于(i,j) 打一张表也是类似书上的倒三角样子题目:Cutting SticksYou have to cut a wood stick into pieces. The most affordable company, The Analog Cutting Machinery, Inc. (ACM), charges money according to the le 阅读全文
posted @ 2013-12-29 18:44 doubleshik 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 题目大意是用 1,5,10,25,50 五种钱组成一个给定的N ,求有多少种组发。。dp[i]为 价值I 的个数, 那么dp[i] += dp[i-k] (k为上面五种钱币 。。 )题目:Coin ChangeSuppose there are 5 types of coins: 50-cent, 25-cent, 10-cent, 5-cent, and 1-cent. We want to make changes with these coins for a given amount of money. For example, if we have 11 cents, then we 阅读全文
posted @ 2013-12-28 19:32 doubleshik 阅读(298) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页