自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(28)
  • 问答 (1)
  • 收藏
  • 关注

原创 华为交换机/华三交换机 查看光口模块信息

华三 ------------------display transceiver manuinfo interface 加端口号华为------------------对于光模块,display transceiver或者是display elabel,能通过命令行看到的是光模块生产序列号,例如ESN:A0914XXXXXX

2021-09-28 08:16:40 5767

原创 从配置中查看设备的SN号

1.dis elabel

2021-01-28 13:31:57 1425

原创 OSPF

*OSPF报文装在IP报文中*广播型链路和NBMA型链路需要选举DR和BDR   DR及BDR用组播地址 224.0.0.6 来 接收 报文,用 224.0.0.5 来 发送 报文。*五种类型的报文:   Hello 报文点到点链路和广播链路—10S发一次----老化时间未周期时间的4倍40S   DD报文只有数据库的目录信息   LSR报文里面只包含需要的目标路由的目录   LSU报文包含目标路由的详细信息   LSACK报文因为IP协议不可靠,传递收到目标路由的目录*OSPF

2020-12-19 16:52:09 210 1

原创 window 10系统 快捷修改用户名

win+R输入 netplwiz打开后改用户名

2020-12-13 16:48:53 248

原创 三层与二层转发时 IP地址和MAC地址的封装

1、三层转发时 原IP地址和目的IP地址不变,原MAC地址和目的MAC地址在变化。2、二层转发时(在同一网段) 原MAC地址和目的MAC地址不变。

2020-12-12 20:09:16 1797

原创 C++ 例题(不一样的运算符重载)

#include <iostream>#include <string>using namespace std;template <class T>class CMyistream_iterator{ public: T n; CMyistream_iterator(istream& in);

2018-06-25 21:36:00 354

转载 C++ 强制类型转换运算符的重载 (例题while(m >> n1 >> n2))

样例输入 12 44 344 555 -1 2 3 样例输出 12 44 344 555#include <iostream>using namespace std;class MyCin{ public: ...

2018-06-25 20:49:54 403

原创 C++ 西安交通大学 Mooc 期末考试题

.题目内容: 输入若干学生的成绩,统计各班的成绩的平均值,并按班级名称的机内码从小到大排序输出。 学生成绩信息包括:班级,学号和成绩。班级名称是”000”’时表示成绩输入结束。 班级名称不超过20字符,学号不超过10个字符,成绩为整数,平均成绩为双精度实数,保留三位小数。班级数不超过10个,总人数不超过100个。输入格式: 若干行,每行信息包括班级,学号和成绩,用空格隔开, ...

2018-06-25 17:37:18 3748

转载 C++ 继承自string的MyString

#include <cstdlib>#include <iostream>#include <string>#include <algorithm>using namespace std;class MyString:public string{ public: MyString():string(){} ...

2018-06-22 17:33:16 3597 1

转载 C++中 排序函数sort()的用法

对数组进行排序,在c++中有库函数帮我们实现,这们就不需要我们自己来编程进行排序了。(一)为什么要用c++标准库里的排序函数Sort()函数是c++一种排序方法之一,学会了这种方法也打消我学习c++以来使用的冒泡排序和选择排序所带来的执行效率不高的问题!因为它使用的排序方法是类似于快排的方法,时间复杂度为n*log2(n),执行效率较高!(二)c++标准库里的排序函数的使用方法I)...

2018-06-22 17:24:45 585

原创 C++中 静态成员的应用及虚析构函数的使用

#include <iostream>using namespace std;class Animal{ public: static int number; Animal(){ number++; } virtual ~Animal()//注释1 : 如果不加virtual,删除c2...

2018-06-21 21:01:34 338

原创 C++ 不解的对象调用私有成员

#include <iostream>#include <cstring>using namespace std;class Array2 { int** ptr; int _x, _y; public: Array2() :ptr(NULL),_x(0),_y(0) {} Array2(int...

2018-06-21 16:25:55 227

转载 关于C++ 运算符重载(总结)

1、运算符重载是为了对用户自定义数据类型的数据的操作与内定义的数据类型的数据的操作形式一致。不能重载的5个运算符:*成员指针访问运算符;::域运算符;sizeof长度运算符;?:条件运算符;.成员访问符。运算重载的三种方式:普通函数,友元函数,类成员函数。当重载为成员函数时,双目运算符仅有一个参数。对单目运算符,重载为成员函数时,不能再显式说明参数。重载为成员函数时,总时隐含了一个参数,该...

2018-06-21 13:44:03 326

原创 C++ 易错点 类的友元函数

#include <iostream> using namespace std;class Point { private: int x; int y; public: Point() { }; friend istream& operator>>(istream&...

2018-06-20 17:48:41 341

原创 C++ 中复制构造函数错点分析

#include <iostream>using namespace std;class Sample {public: int v;Sample(const Sample& a) { v = a.v+2; } Sample(int a=0) ...

2018-06-19 18:53:57 276

原创 计算机网络的统计多路复用

出现在分组交换中,多个源主机向同一段链路发送分组,此时用统计多路复用,每个源主机得到的带宽取决于每个源主机的发送量,发的越多,得到的带宽越大,发送一样多的数据则平分该链路的带宽...

2018-04-28 13:20:23 2853

原创 数据结构 树 例题 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 f

2018-01-26 18:30:13 381

原创 数据结构 树 例题 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 su

2018-01-23 15:02:37 742

原创 Tree Traversals Again

树3 Tree Traversals Again(25 分) 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 fro

2018-01-22 22:05:47 120

原创 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

2018-01-19 11:36:30 173

原创 列出连通集

给定一个有N个顶点和E条边的无向图,请用DFS和BFS分别列出其所有的连通集。假设顶点从0到N−1编号。进行搜索时,假设我们总是从编号最小的顶点出发,按编号递增的顺序访问邻接点。输入格式:输入第1行给出2个整数N(0#include #include #include #define MAXVERTEXNUM 100//最大顶点数typedef int vertex;typ

2018-01-17 21:21:02 492

原创 树8 File Transfer

树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

2018-01-15 14:34:12 249

原创 Root of AVL Tree

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 by

2018-01-12 15:39:36 184

原创 层序创建二叉树

#define NoInfo 0/*结点本身信息为NoInfo,则表示该结点不存在*/BinTree CreateBinTree(){ int data; BinTree BT, T; Queue Q = CreatQueue(); scanf("%d", &data); if(data != NoInfo){ BT = (BinTr

2018-01-08 18:10:38 3170

原创 树2 List Leaves

树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 fir

2018-01-08 16:58:56 246

原创 树的同构

给定两棵树T1和T2。如果T1可以通过若干次左右孩子互换就变成T2,则我们称两棵树是“同构”的。例如图1给出的两棵树就是同构的,因为我们把其中一棵树的结点A、B、G的左右孩子互换后,就得到另外一棵树。而图2就不是同构的。输入格式:输入给出2棵二叉树树的信息。对于每棵树,首先在一行中给出一个非负整数N (≤10),即该树的结点数(此时假设结点从0到N−1编号);随后N行,第i行对应编号第i个

2018-01-06 16:10:20 389

原创 一元多项式的乘法与加法运算

设计函数分别求两个一元多项式的乘积与和。输入格式:输入分2行,每行分别先给出多项式非零项的个数,再以指数递降方式输入一个多项式非零项系数和指数(绝对值均为不超过1000的整数)。数字间以空格分隔。输出格式:输出分2行,分别以指数递降方式输出乘积多项式以及和多项式非零项的系数和指数。数字间以空格分隔,但结尾不能有多余空格。零多项式应输出0 0。输入样例:4 3 4 -5 2

2018-01-04 17:19:42 257

原创 两个有序链表序列的合并

两个有序链表序列的合并/原创2018.1.2 林一木/已知两个非降序链表序列S1与S2,设计函数构造出S1与S2的并集新非降序链表S3。输入格式: 输入分两行,分别在每行给出由若干个正整数构成的非降序序列,用−1表示序列的结尾(−1不属于这个序列)。数字用空格间隔。输出格式: 在一行中输出合并后新的非降序链表,数字间用空格分开,结尾不能有多余空格;若新链表为空,输出NULL。输入样例

2018-01-02 11:51:37 649

空空如也

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

TA关注的人

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