摘要: 将一系列给定数字插入一个初始为空的小顶堆H[]。随后对任意给定的下标i,打印从H[i]到根结点的路径。 输入格式: 每组测试第1行包含2个正整数N和M(≤),分别是插入元素的个数、以及需要打印的路径条数。下一行给出区间[-10000, 10000]内的N个要被插入一个初始为空的小顶堆的整数。最后一行 阅读全文
posted @ 2019-04-17 15:30 Acoccus 阅读(132) 评论(0) 推荐(0) 编辑
摘要: We have a network of computers and a list of bi-directional connections. Each of these connections allows a file transfer from one computer to another 阅读全文
posted @ 2019-04-17 15:21 Acoccus 阅读(282) 评论(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 @ 2019-04-17 15:19 Acoccus 阅读(218) 评论(0) 推荐(0) 编辑
摘要: #define MaxVertexNum 120 #include "stdio.h" #include #include using namespace std; typedef int WeightType; typedef int DataType; typedef int Vertex; typedef struct GNode* PtrToGNode; struct GNo... 阅读全文
posted @ 2019-04-17 15:13 Acoccus 阅读(171) 评论(0) 推荐(0) 编辑
摘要: #include #include const int diameter = 15; const int maxn = 100; int D, Ncro; int Visted[maxn] = {0}; struct coordinates { int x, y; } cro_pos[maxn]; coordinates O; void init(int Ncro); boo... 阅读全文
posted @ 2019-04-17 15:12 Acoccus 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 小白专场里说的很清楚,前面代码的拼凑。 阅读全文
posted @ 2019-04-17 15:11 Acoccus 阅读(199) 评论(0) 推荐(0) 编辑