自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

原创 List_rev单链表转置

#include <iostream>#include <cstdio>#define Null 0using namespace std;struct List{ int name; struct List *next;}record; struct List *head, *now, *last...

2018-11-21 15:06:13 124

原创

#include <stdio.h>#define MaxVertices 100#define MaxWeight 32767typedef struct{ int Vertices[MaxVertices]; int Edge[MaxVertices][MaxVertices]; int numV; int numE;}AdjMatrix;void Create...

2018-11-21 15:05:53 106

原创 二叉树相关代码

#include <iostream>using namespace std;int n = 0; int sum = 0;struct Bnode{ int data; Bnode *lch; Bnode *rch; };Bnode*creat(){ Bnode *p; int x; cin >> x; if(x == 0) p = NULL;...

2018-11-16 10:23:05 133

原创 栈(链表)

#include <iostream>using namespace std;#define null 0typedef struct Stack{ int a; struct Stack *next ; }Node;Stack * top;void push(Stack *top); //压栈 void pop(Stack *top); //弹栈 void...

2018-10-19 12:12:38 85

原创 最大整数

 题目描述设有n个正整数(n≤20),将它们联接成一排,组成一个最大的多位整数。 例如:n=3时,3个整数13,312,343联接成的最大整数为:34331213 又如:n=4时,4个整数7,13,4,246联接成的最大整数为:7424613输入输入格式如下: 第一行为正整数n,第2行为n个正整数,2个正整数之间用空格间隔。输出输出n个数连接起来的最大整数样例输入...

2018-08-19 16:28:06 1324

原创 S树

这一题虽然涉及二叉树但是至少 根据二叉树的特性来做题,不用建树,只需知道左边的是2k右边是2k+1即可#include <iostream>#include <string>#include <stack>#include <cstdio>#include <queue>#include <cstring>#...

2018-08-13 08:47:06 559

原创 对称轴

输入N个坐标,判断是否有一条竖直的对称轴.#include <iostream>#include <string>#include <vector>#include <set>#include <map>#include <sstream>#include <fstream>using nam

2018-07-29 22:20:17 460

原创 古老的密码 UVA - 1339

题意: 如 VICTORIOUS 一串密码将其打乱并每个字母加或减一个数为JWPUDJSTVP..解题思路:因为将其打乱后只要将两串密码字母个数统计一下,再排序,如果一样则一定为YES;源代码:#include <stdio.h>#include <stdlib.h>#include <string.h>int cmp(const voi...

2018-07-22 22:32:55 87

空空如也

空空如也

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

TA关注的人

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