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
阅读全文
摘要:(这是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
阅读全文
摘要:这篇随笔是The C++ Programming Language Fourth Edition, by Bjarne Stroustrup 第33章STL Iterators的摘录。 1 Introduction This chapter presents the STL interators a
阅读全文
摘要:传送门POUR1 - Pouring water#gcd#recursionGiven two vessels, one of which can accommodatealitres of water and the other -blitres of water, determine the n...
阅读全文
摘要:Problem 给出一个不带边权(即边权为1)的有向无环图(unweighted DAG)以及DAG上两点s, t,求s到t的最短距离,如果无法从s走到t,则输出-1。 Solution DFS,BFS都可,对于unweighted DAG, BFS更合适,下面给出DFS解法。 对于weighted
阅读全文
摘要:传送门 You are given numbers . You can perform at most operations. For each operation, you can multiply one of the numbers
阅读全文
摘要:传送门WORDS1 - Play on Words#graph-theory#euler-circuitSome of the secret doors contain avery interesting word puzzle. The team of archaeologists has to ...
阅读全文
摘要:传送门 确定比赛名次 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 17915 Accepted Submission(s): 7169 Pro
阅读全文