I Hate It Time Limit: 9000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 66267    Accepted Submission(s): 25776 Problem Description 很多学校流行一种比较的习惯.老师们很喜欢询问,从某某到某某当中,分数最高的是多少. 这让很多学生很反感. 不管你喜不喜欢,现在需要你做的是,就是按照老师…
huffman coding, greedy algorithm. std::priority_queue, std::partition, when i use the three commented lines, excution time increase to 15ms from 0ms, due to worse locality? thanks to http://acm.hdu.edu.cn/discuss/problem/post/reply.php?action=support…
thanks to http://acm.hdu.edu.cn/discuss/problem/post/reply.php?action=support&postid=19638&messageid=1&deep=0 for the test case provided. below is an excerpt data 8 11 9 8 8 8 4 3 2 11 8 8 8 8 4 3 2 answer 800 #include <cstdio> #include…
thanks to http://stackoverflow.com/questions/2144459/using-scanf-to-accept-user-input and http://stackoverflow.com/questions/456303/how-to-validate-input-using-scanf for the i/o part. thanks to http://www.haodaima.net/art/137347 for the rounding part…
reference: 6.4 knapsack in Algorithms(算法概论), Sanjoy Dasgupta University of California, San Diego Christos Papadimitriou University of California at Berkeley Umesh Vazirani University of California at Berkeley the unbounded knapsack and 0-1 knapsack a…
Let the Balloon Rise Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 87647    Accepted Submission(s): 33130 Problem Description Contest time again! How excited it is to see balloons floating ar…
Largest Rectangle in a Histogram Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 11706    Accepted Submission(s): 3219 Problem Description A histogram is a polygon composed of a sequence of rec…
胜利大逃亡(续) Time Limit : 4000/2000ms (Java/Other)   Memory Limit : 65536/32768K (Java/Other) Total Submission(s) : 22   Accepted Submission(s) : 10 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description Ignatius再次被魔王抓走了(搞不懂他咋这么讨魔王喜…
今天和昨天都没有做题,昨天是因为复习太累后面忘了,今天也是上午考毛概,下午又忙着复习计算机图形学,晚上也是忘了结果打了暗黑3,把暗黑3 打通关了,以后都不会玩太多游戏了,争取明天做3题把题目补上,拖越久越难补的道理我是知道的. 亲和数 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 26484    Accepted Submissio…
人见人爱A-B Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 53836    Accepted Submission(s): 15147 Problem Description 参加过上个月月赛的同学一定还记得其中的一个最简单的题目,就是{A}+{B},那个题目求的是两个集合的并集,今天我们这个A-B求的是两个集合的差,就是做集合的…