09 2015 档案

摘要:传送门 A set of n 1-dimensional items have to be packed in identical bins. All bins have exactly the same length l and each item i has length li ≤ l. We 阅读全文
posted @ 2015-09-27 21:45 Pat 阅读(351) 评论(0) 推荐(0) 编辑
摘要:(这是C++系列随笔的第二篇,这一系列是我练习C++而查的资料) extracted from C++ Primer 5th. edition pp. 425 Using a Comparison for the Key Type The type of the operation that a c 阅读全文
posted @ 2015-09-23 00:44 Pat 阅读(253) 评论(0) 推荐(0) 编辑
摘要:这篇随笔是The C++ Programming Language Fourth Edition, by Bjarne Stroustrup 第33章STL Iterators的摘录。 1 Introduction This chapter presents the STL interators a 阅读全文
posted @ 2015-09-23 00:14 Pat 阅读(233) 评论(0) 推荐(0) 编辑
摘要:传送门POUR1 - Pouring water#gcd#recursionGiven two vessels, one of which can accommodatealitres of water and the other -blitres of water, determine the n... 阅读全文
posted @ 2015-09-21 00:30 Pat 阅读(394) 评论(0) 推荐(0) 编辑
摘要:Problem 给出一个不带边权(即边权为1)的有向无环图(unweighted DAG)以及DAG上两点s, t,求s到t的最短距离,如果无法从s走到t,则输出-1。 Solution DFS,BFS都可,对于unweighted DAG, BFS更合适,下面给出DFS解法。 对于weighted 阅读全文
posted @ 2015-09-19 22:47 Pat 阅读(372) 评论(0) 推荐(0) 编辑
摘要:传送门 You are given n numbers a1,a2,,an. You can perform at most k operations. For each operation, you can multiply one of the numbers 阅读全文
posted @ 2015-09-19 08:27 Pat 阅读(360) 评论(0) 推荐(0) 编辑
摘要:传送门WORDS1 - Play on Words#graph-theory#euler-circuitSome of the secret doors contain avery interesting word puzzle. The team of archaeologists has to ... 阅读全文
posted @ 2015-09-18 20:48 Pat 阅读(259) 评论(0) 推荐(0) 编辑
摘要:传送门 确定比赛名次 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 17915 Accepted Submission(s): 7169 Pro 阅读全文
posted @ 2015-09-17 15:09 Pat 阅读(796) 评论(0) 推荐(0) 编辑
摘要:问题 求 [L,R] 之间的素数表。 解法 一个合数 n 的最小素因子不超过 n。因此,在埃氏筛法的过程中,每当“新发现”一个素数 p,可以从 p2 筛起,而不必从 2p 筛起。 先用埃氏筛法求出 [1,R] 阅读全文
posted @ 2015-09-13 17:17 Pat 阅读(752) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示