#include#includeint insertion_sort(){ const int max =10000; int a[max],i,j; srand((unsigned int)time(NULL)); for(i=0;i=0&&tmp<a[j]) ...
分类:
编程语言 时间:
2015-08-12 08:56:59
阅读次数:
139
// _DataStructure_C_Impl:Dijkstra
#include
#include
#include
typedef char VertexType[4];
typedef char InfoPtr;
typedef int VRType;
#define INFINITY 100000 //定义一个无限大的值
#define MaxSize 50 //最大顶点个数
typ...
分类:
编程语言 时间:
2015-08-12 06:46:12
阅读次数:
164
#include
#include
#include
typedef char VertexType[4];
typedef char InfoPtr;
typedef int VRType;
#define MaxSize 50 //最大顶点个数
typedef enum{DG,DN,UG,UN}GraphKind;
//边结点的类型定义
typedef struct ArcNode{
in...
分类:
其他好文 时间:
2015-08-12 06:46:02
阅读次数:
233
#include "/home/lhy/my_json/include/json/json.h"
#include
#include
using namespace std;class JSON
{
public:
void To_str(string &_s,Json::Value &value)
{
Json::...
分类:
Web程序 时间:
2015-08-12 06:45:58
阅读次数:
143
#include#pragma once
#include
#include
#define StackSize 100
typedef int DataType; //栈元素类型定义
typedef struct{
DataType stack[StackSize];
int top;
}SeqStack;
//将栈初始化为空栈只需要把栈顶指针top置为
void InitStack(Seq...
分类:
其他好文 时间:
2015-08-12 06:45:08
阅读次数:
136
#include
#include
#include
typedef char VertexType[4];
typedef char InfoPtr;
typedef int VRType;
#define INFINITY 100000 //定义一个无限大的值
#define MaxSize 50 //最大顶点个数
typedef int PathMatrix[MaxSize][MaxSi...
分类:
编程语言 时间:
2015-08-12 06:44:01
阅读次数:
188
是在features.h中用于特性控制的一个功能测试宏 /user/include/features.h /* If _GNU_SOURCE was defined by the user, turn on all the other features. */ #ifdef _GNU_SOURCE ...
分类:
其他好文 时间:
2015-08-12 06:41:49
阅读次数:
220
题意:有长度为n的序列,序列的数字是0~n-1组成,然后这个序列可以看做环,那么就有n个长度为n的序列,问n个序列里最小逆序数是多少。
题解:先把初始序列的逆序数算出来,然后移动每一个开头数字a到后面,逆序数变化的是比a大的数字逆序数加一,比a小的逆序数减一,所以按这个规律再循环一次找最小值就可以了。#include
#include
#include <al...
分类:
其他好文 时间:
2015-08-12 01:30:41
阅读次数:
145
//_DataStructure_C_Impl:CriticalPath
#include
#include
#include
#include"SeqStack.h"
//图的邻接表类型定义
typedef char VertexType[4];
typedef int InfoPtr; //定义为整型,为了存放权值
typedef int VRType;
#define MaxSize 50...
分类:
其他好文 时间:
2015-08-12 01:29:23
阅读次数:
205
//ser.cpp
#include
#include
#include
#include
#include
#include
#include #include
#define IP "127.0....
分类:
系统相关 时间:
2015-08-12 01:23:43
阅读次数:
217