摘要:
The i’th Fibonacci number f(i) is recursively defined in the following way: • f(0) = 0 and f(1) = 1 • f(i + 2) = f(i + 1) + f(i) for every i ≥ 0 Your t 阅读全文
摘要:
Description Tom is the most handsome CCPC contestant in HIT.Tom likes Zero. For a given positive integer n, he wants to know the minimum non_negativei 阅读全文
摘要:
Description Tom is the most handsome CCPC contestant in HIT.Tom has a PE exam. So he must run 2400 meters. As we all know, one circle of runways is400 阅读全文
摘要:
The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of 阅读全文
摘要:
people in USSS love math very much, and there is a famous math problem . give you two integers nn ,aa ,you are required to find 22 integers bb ,cc suc 阅读全文
摘要:
湖中有n块石头,编号从1到n,有两只青蛙,Bob在1号石头上,Alice在2号石头上,Bob想去看望Alice,但由于水很脏,他想避免游泳,于是跳着去找她。但是Alice的石头超出了他的跳跃范围。因此,Bob使用其他石头作为中间站,通过一系列的小跳跃到达她。两块石头之间的青蛙距离被定义为两块石头之间 阅读全文
摘要:
A string is called diverse if it contains consecutive (adjacent) letters of the Latin alphabet and each letter occurs exactly once. For example, the f 阅读全文
摘要:
*Floyd--Warshall 求任意两点间的最短路算法 它的核心算法就只有五行 该算法for循环较多,时间复杂度为0(N^3),数据稍大则会超时,有局限性。 *Dijkstra--单源最短路 指定一个点到其余各顶点的最短路径。 该算法时间复杂度为O(N^2), *Bellman-Ford 解决负 阅读全文
摘要:
Each day in Berland consists of nn hours. Polycarp likes time management. That's why he has a fixed schedule for each day — it is a sequence a1,a2,…,a 阅读全文