自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 线段树hdu1754 I Hate It

#include #define LL(a) ((a)<<1)#define RR(a) ((a)<<1|1)#define N 600001#define MAX(a,b) (((a) > (b)) ? (a):(b))//inline int MAX(int a, int b){return ((a > b) ? a:b);}typedef struct NodeTag {

2012-05-11 11:56:17 522

原创 链表归并排序

#include #include #include #include //#include //using namespace std;typedef int TYPE;typedef struct NODETAG{ struct NODETAG* pNext; TYPE value;}NODE;NODE* build(TYPE A[], int n)

2012-05-08 11:49:51 607

原创 逆序数Sicily 5142. Inversion Number

//// main.cpp// algorithm//// Created by Calvin Zang on 12-5-5.// Copyright (c) 2012年 SYSU. All rights reserved.//#include #include #include #include typedef int TYPE;#define N 10000

2012-05-07 20:23:18 774

原创 计算两个字符串的距离(相似度)

#define min(a,b) (((a)<(b)) ? (a) : (b))int stringDistance(char strA[], int pABegin, int pAEnd, char strB[], int pBBegin, int pBEnd){ if(pABegin > pAEnd){ if(pBBegin > pBEnd) return 0;

2012-05-07 20:19:05 746

原创 线段树2 POJ2777 Count Color

http://poj.org/problem?id=2777#include #include #define LCH(a) ((a)<<1)#define RCH(a) (((a)<<1)+1)#define NO_COLOR 0typedef struct nodetag{int st, ed, value;} node;node valtree[400000];in

2012-05-06 16:25:44 417

原创 第一道线段树hdu1166

#include #define LL(a) ((a)<<1)#define RR(a) ((a)<<1|1)typedef struct nodetag{int st, ed, value;} node;node valtree[200002];void init(int place, int st, int ed){ int mid = (st+ed)/2;

2012-05-06 16:22:16 390

原创 冒泡排序bubbleSort

#include #include #include typedef int TYPE;#define N 100void exchange(TYPE A[], int i, int j){TYPE tmp = A[i]; A[i]=A[j];A[j]=tmp;}void bubbleSort(TYPE A[], int n){ int i, j; for(i =

2012-05-05 21:45:20 395

空空如也

空空如也

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

TA关注的人

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