压缩存储值存储极少数的有效数据。使用{row,col,value}三元组存储每一个有效数据,三元组按原矩阵中的位置,以行优先级先后顺序依次存放。
#define_CRT_SECURE_NO_WARNINGS1
#include<vector>
#include<iostream>
usingnamespacestd;
//三元组的定义
template<..
分类:
其他好文 时间:
2016-04-19 00:33:44
阅读次数:
176
//函数声明:#include"cirtwowaylinklist.h"
#define_CRT_SECURE_NO_WARNINGS1
#include<stdio.h>
#include<stdlib.h>
typedefintElemType;
typedefstructCirDulNode
{
structCirDulNode*prior;
ElemTypedata;
structCirDulNode*next;
}DulNode;
voidjudgem..
分类:
其他好文 时间:
2016-04-16 19:42:48
阅读次数:
237
//函数声明部分:#include"twowaylinklist.h"
#define_CRT_SECURE_NO_WARNINGS1
#include<stdio.h>
#include<stdlib.h>
typedefintElemType;
typedefstructDulNode
{
structDulNode*prior;
ElemTypedata;
structDulNode*next;
}DulNode;
voidjudgement_NULL(D..
分类:
其他好文 时间:
2016-04-15 23:12:35
阅读次数:
258
//函数声明部分:#include"CirLinkList.h"
#define_CRT_SECURE_NO_WARNINGS1
#include<stdio.h>
#include<stdlib.h>
typedefintElemType;
typedefstructlinknode
{
ElemTypedata;
structlinknode*next;
}node;
voidjudgement_NULL(node*p);
node*creat_orde..
分类:
其他好文 时间:
2016-04-15 23:10:27
阅读次数:
199
口袋中有5种颜色的小球,每次从口袋中任意取3个,问得到3种不同颜色的小球的可能取法?#define_CRT_SECURE_NO_WARNINGS1#include<iostream>#include<iomanip>usingnamespacestd;intmain(){ enumcolor{red,yellow,blue,white,black};//声明枚举类型color colorpri;/..
分类:
其他好文 时间:
2016-04-14 22:38:14
阅读次数:
227
在新版编程器的编译过程中我们常常会遇到一些过时或者不安全的函数 举一个简单的例子: 很多带"_s"后缀的函数是为了让原版函数更安全,传入一个和参数有关的大小值,避免引用到不存在的元素,因为有时候黑客可以利用原版的不安全性黑掉系统。 而往往大家会觉得麻烦,如果不想用新的安全函数,这里提供两种简单的方法 ...
分类:
其他好文 时间:
2016-04-14 09:26:31
阅读次数:
116
#define_CRT_SECURE_NO_WARNINGS1
#pragmaonce
#include<iostream>
#include<assert.h>
usingnamespacestd;
#defineN10
#include<stack>
structPos//定义一个结构体,该结构体用来表示坐标
{
int_row;
int_col;
};
voidGetMaze(int*a,intn)
{
FILE*fout..
分类:
其他好文 时间:
2016-04-14 07:06:46
阅读次数:
198
#define_CRT_SECURE_NO_WARNINGS1
#include<iostream>
usingnamespacestd;
#include<assert.h>
#pragmaonce
template<classT>
classStack
{
public:
Stack()
:_a(0)
,_capacity(0)
,_top(0)
{}
Stack(constStack<T>&s)
:_a(newT[s._t..
分类:
其他好文 时间:
2016-04-14 07:05:56
阅读次数:
178
#define_CRT_SECURE_NO_WARNINGS1
#include<string>
#include<iostream>
usingnamespacestd;
structStudent
{
intnum;
stringname;
charsex;
floatscore;
};
intmain()
{
Studentstu;
Student*p=&stu;
stu.num=10301;
stu.name="WangFang";
stu.sex=..
分类:
其他好文 时间:
2016-04-14 07:05:03
阅读次数:
136
有4个人,丁比丙大4岁,丙比乙大4岁,乙比甲大4岁,甲说他的年龄是16岁,求丙的年龄?#define_CRT_SECURE_NO_WARNINGS1#include<iostream>usingnamespacestd;intGet_age(intn);constintinterval=4;voidmain(){ intage=Get_age(4); cout<<"丁的年龄:"<<age&l..
分类:
其他好文 时间:
2016-04-14 07:00:55
阅读次数:
95