2012年3月14日

HDU 1011 Starship Troopers(树形DP)

摘要: Starship TroopersTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4118Accepted Submission(s): 1076Problem DescriptionYou, the leader of Starship Troopers, are sent to destroy a base of the bugs. The base is built underground. It is actually a huge 阅读全文

posted @ 2012-03-14 19:00 kuangbin 阅读(3705) 评论(3) 推荐(0) 编辑

HrbustOJ 1176 小陈老师、雪人 (STL map 和优先队列)

摘要: http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=1176水了一道比较有意思的题目。其实就是给了很多的数。问最多可以搭配出多少种三个不同的数的组合,并且输出。第1行,包含一个整数n(1≤n≤100000) — 雪球的数量。第2行,包含n个整数 — 雪球的半径r1, r2, ..., rn (1≤ri≤1000000000)给的数比较多,也比较大,所以用map 来存。map 来记录个数。然后用优先队列。把各个数的个数入队列。先取个数最多的三个数,个数减一后要再入队。直到队列为空。map 阅读全文

posted @ 2012-03-14 15:52 kuangbin 阅读(540) 评论(0) 推荐(0) 编辑

导航

JAVASCRIPT: