上一页 1 ··· 72 73 74 75 76 77 78 79 80 ··· 90 下一页
摘要: 哈利·波特要考试了,他需要你的帮助。这门课学的是用魔咒将一种动物变成另一种动物的本事。例如将猫变成老鼠的魔咒是haha,将老鼠变成鱼的魔咒是hehe等等。反方向变化的魔咒就是简单地将原来的魔咒倒过来念,例如ahah可以将老鼠变成猫。另外,如果想把猫变成鱼,可以通过念一个直接魔咒lalala,也可以将 阅读全文
posted @ 2018-11-17 12:48 王清河 阅读(539) 评论(0) 推荐(0)
摘要: 给定一个有N个顶点和E条边的无向图,请用DFS和BFS分别列出其所有的连通集。假设顶点从0到N−1编号。进行搜索时,假设我们总是从编号最小的顶点出发,按编号递增的顺序访问邻接点。 输入格式: 输入第1行给出2个整数N(0)和E,分别是图的顶点数和边数。随后E行,每行给出一条边的两个端点。每行中的数字 阅读全文
posted @ 2018-11-16 18:25 王清河 阅读(253) 评论(0) 推荐(0)
摘要: In 1953, David A. Huffman published his paper "A Method for the Construction of Minimum-Redundancy Codes", and hence printed his name in the history o 阅读全文
posted @ 2018-11-16 14:04 王清河 阅读(336) 评论(0) 推荐(0)
摘要: This time your job is to fill a sequence of N positive integers into a spiral matrix in non-increasing order. A spiral matrix is filled in from the fi 阅读全文
posted @ 2018-09-02 16:44 王清河 阅读(819) 评论(0) 推荐(0)
摘要: Given a sequence of positive numbers, a segment is defined to be a consecutive subsequence. For example, given the sequence { 0.1, 0.2, 0.3, 0.4 }, we 阅读全文
posted @ 2018-09-02 11:13 王清河 阅读(799) 评论(0) 推荐(0)
摘要: There is a classical process named partition in the famous quick sort algorithm. In this process we typically choose one element as the pivot. Then th 阅读全文
posted @ 2018-09-02 11:09 王清河 阅读(458) 评论(0) 推荐(0)
摘要: People on Mars count their numbers with base 13: Zero on Earth is called "tret" on Mars. The numbers 1 to 12 on Earch is called "jan, feb, mar, apr, m 阅读全文
posted @ 2018-09-01 19:29 王清河 阅读(204) 评论(0) 推荐(0)
摘要: Zhejiang University has 8 campuses and a lot of gates. From each gate we can collect the in/out times and the plate numbers of the cars crossing the g 阅读全文
posted @ 2018-09-01 16:33 王清河 阅读(682) 评论(0) 推荐(0)
摘要: The string APPAPT contains two PAT's as substrings. The first one is formed by the 2nd, the 4th, and the 6th characters, and the second one is formed 阅读全文
posted @ 2018-09-01 10:56 王清河 阅读(179) 评论(0) 推荐(0)
摘要: According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insert 阅读全文
posted @ 2018-09-01 10:47 王清河 阅读(169) 评论(0) 推荐(0)
上一页 1 ··· 72 73 74 75 76 77 78 79 80 ··· 90 下一页