10 2015 档案
摘要:说一下BFS和DFS,这是个比较重要的概念,是很多很多算法的基础。 不过在说这个之前需要先说一下图和树,当然这里的图不是自拍的图片了,树也不是能结苹果的树了。这里要说的是图论和数学里面的概念。 以上概念来自百度百科。 数学里面的图就是许多的点和许多的边把这些点连了起来,具体每个点放在那...
阅读全文
摘要:二分: 二分不是二分,是二分。就是一分为二的二分。 先来一个例子: 现在有一个递增的序列 a(1), a(2)...a(n),然后让你查找 x 在不在这个序列里面? 显然最简单的做法就是一个for循环,从1到n,看看有没和x相等的。。。 这样确实不错,但是太慢了。。...
阅读全文
摘要:这一篇文章主要说说一些基础算法,这些算是很多其他算法的基石。 主要包括 模拟,暴力,枚举,递归,贪心,分治。 1,模拟: 顾名思义,模拟就是。。。饿,模拟,有一些题目就是给你一些步骤,然后你写代码一步步去模拟那些步骤就行。这类题目主要属于基础题,但是当然如果需要模拟的步骤足够恶心的话,...
阅读全文
摘要:In the game Lizard Era: Beginning the protagonist will travel with three companions: Lynn, Meliana and Worrigan. Overall the game hasnmandatory ques...
阅读全文
摘要:The mobile application store has a new game called "Subway Roller".The protagonist of the game Philip is located in one end of the tunnel and wants ...
阅读全文
摘要:Alice and Bob decided to eat some fruit. In the kitchen they found a large bag of oranges and apples. Alice immediately took an orange for herself, ...
阅读全文
摘要:Andrewid the Android is a galaxy-known detective. Now he is preparing a defense against a possible attack by hackers on a major computer network.In ...
阅读全文
摘要:一个算法的复杂度可以说也就是一个算法的效率,一般来说分为时间复杂度和空间复杂度。。。 注意接下来说的均是比较YY的,适用与ACM等不需严格分析只需要大致范围的地方,至于严格的算法复杂度分析的那些数学证明,主定理什么的在《算法导论》这本书上有十分详细的讲解,网上应该也会有人写过,这里就不多说了(...
阅读全文
摘要:In a far away galaxy there areninhabited planets, numbered with numbers from1ton. They are located at large distances from each other, that's why th...
阅读全文
摘要:Zxr960115 is owner of a large farm. He feedsmcute cats and employspfeeders. There's a straight road across the farm andnhills along the road, number...
阅读全文
摘要:接下来说说一些ACM里面的常识和错误。。。(可能会比较乱) —— 首先ACM里面的代码都是要提交上去,然后让计算机自动判题的,所以。。。千万不要把 system("pause"); 加上去,不管自己怎么搞,提交之前千万记得不要有这句话,不然怎么死的都不知道。 —— 然后就是提交上去之后是立马...
阅读全文
摘要:—— 简单介绍一下ACM里面的输入输出。。。 —— 主要说C++的输入输出(其实其他的我不会。。。)。 —— C++里面有输入输出流,也就是cin和cout,用起来也算是比较方便吧。。。 —— 但是,ACMer好像不怎么用这个,大都用scanf,printf这两个不是很方便的C语言遗留输入...
阅读全文
摘要:In the country there are exactlyncities numbered with positive integers from1ton. In each city there is an airport is located.Also, there is the onl...
阅读全文
摘要:"Couple Trees" are two trees, a husband tree and a wife tree. They are named because they look like a couple leaning on each other. They share a sam...
阅读全文

浙公网安备 33010602011771号