自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 图的DFS实现

#include#include "malloc.h"using namespace std;#define Max 100//邻接表实现图的DFS//邻接表每一个链表节点的结构,有一个指向下一个节点的指针,一个存放权值的结构,一个存放节点的信息typedef struct node{ int data; struct node* next; int info; }li

2015-09-12 16:03:06 359

原创 C++实现图的邻接表

#include#include "malloc.h"using namespace std;#define Max 100//邻接表实现图的DFS//邻接表每一个链表节点的结构,有一个指向下一个节点的指针,一个存放权值的结构,一个存放节点的信息typedef struct node{ int data; struct node* next; int info; }li

2015-09-11 21:17:31 1476

原创 c++实现顺序存储的队列

#include#include "malloc.h"using namespace std;#define MaxSize 100typedef struct queuenode{ int data[MaxSize]; int front,rear;}queue;void InitQueue(queue * &q){ q = (queue*)malloc(sizeof(qu

2015-09-11 16:27:15 447

原创 CCF 窗口

按照题意完成了功能,仅供参考#includeusing namespace std;struct window{ int x1,x2,y1,y2;};int compareTop(int num[],int n,int flag[]){ int max = 0; int level = 0; for(int t = 0;t<n;t++) {

2015-09-11 14:42:29 754

原创 CCF 相反数

自己写的实现,未采用用空间换时间的方案,采用了排序的方式,效率不高,仅供参考#include#include#include#include "math.h"using namespace std; int main(){ int N; cin>>N; int i = 0; map > groups; for(;i<N;i++) { int tempt

2015-09-11 14:38:59 447

原创 c++ 顺序存储和链表存储 栈的实现代码

#include#include "malloc.h"using namespace std;#define Order#ifdef Order#define Max 100typedef struct linknode{ int top; int data[Max];}Stack;void InitStack(Stack * &s){ cout<<"数

2015-09-11 14:36:59 444

空空如也

空空如也

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

TA关注的人

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