自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 资源 (2)
  • 收藏
  • 关注

原创 07-图4 哈利·波特的考试

哈利·波特要考试了,他需要你的帮助。这门课学的是用魔咒将一种动物变成另一种动物的本事。例如将猫变成老鼠的魔咒是haha,将老鼠变成鱼的魔咒是hehe等等。反方向变化的魔咒就是简单地将原来的魔咒倒过来念,例如ahah可以将老鼠变成猫。另外,如果想把猫变成鱼,可以通过念一个直接魔咒lalala,也可以将猫变老鼠、老鼠变鱼的魔咒连起来念:hahahehe。 现在哈利·波特的手里有一本教材,里面列出了所有

2016-06-02 21:04:55 572

原创 06-图2 Saving James Bond - Easy Version

This time let us consider the situation in the movie “Live and Let Die” in which James Bond, the world’s most famous spy, was captured by a group of drug dealers. He was sent to a small piece of land a

2016-06-02 20:20:02 444

原创 06-图3 六度空间

给定一个有NN个顶点和EE条边的无向图,请用DFS和BFS分别列出其所有的连通集。假设顶点从0到N-1N−1编号。进行搜索时,假设我们总是从编号最小的顶点出发,按编号递增的顺序访问邻接点。 输入格式:输入第1行给出2个整数NN(0#include <iostream>#include <queue>#include <vector>using namespace std;int vectexn

2016-06-02 20:01:41 428

原创 05-树9 Huffman Codes

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 of computer science. As a professor who gives the fi

2016-06-02 17:37:01 371

原创 05-树8 File Transfer

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. Is it possible to send a file from any computer o

2016-06-02 17:19:51 351

原创 05-树7 堆中的路径

将一系列给定数字插入一个初始为空的小顶堆H[]。随后对任意给定的下标i,打印从H[i]到根结点的路径。 输入格式:每组测试第1行包含2个正整数NN和MM(\le 1000≤1000),分别是插入元素的个数、以及需要打印的路径条数。下一行给出区间[-10000, 10000]内的NN个要被插入一个初始为空的小顶堆的整数。最后一行给出MM个下标。 输出格式:对输入中给出的每个下标i,在一行中输出从H

2016-06-02 16:28:03 346

原创 04-树6 Complete Binary Search Tree

A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The left subtree of a node contains only nodes with keys less than the node’s key. The right sub

2016-06-02 15:56:53 242

原创 04-树4 是否同一棵二叉搜索树

04-树5 Root of AVL Tree (25分) An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they differ b

2016-06-02 15:19:44 440

原创 03-树3 Tree Traversals Again

An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with the keys numbered from 1 to 6) is traversed, the stack

2016-06-02 11:12:04 336

原创 03-树2 List Leaves

Given a tree, you are supposed to list all the leaves in the order of top down, and left to right. Input Specification:Each input file contains one test case. For each case, the first line gives a pos

2016-06-02 10:54:20 356

QT+数据库(商品管理系统)

基于QT和数据库完成的商品管理系统,有详细解释,非常简单的例子,请放心使用,请放心使用,请放心使用!

2016-07-25

电脑端的串口使用例程

电脑端的串口使用例程

2016-06-04

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除