自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(16)
  • 资源 (4)
  • 收藏
  • 关注

原创 2.27-在2.27的基础上使C中没有相同元素

typedef struct node { int data; struct node *next; }Linklist; Linklist* same(Linklist&A,Linklist&B) { int temp; Linklist*pa=A.next,*pb=B.next; Linklist*pc=(Linklist*)malloc(sizeof(L

2012-05-06 20:43:55 1057

原创 2.26-用链表表示2.25的算法;

typedef struct node { int data; struct node *next; }Linklist; Linklist* same(Linklist&A,Linklist&B) { Linklist*pa=A.next,*pb=B.next; Linklist*pc=(Linklist*)malloc(sizeof(Linklist));

2012-05-06 20:36:14 1090

原创 HDU 1372 knight moves

Problem Description A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square of a given set of

2012-05-06 20:13:04 677

原创 HDU 1495 非常可乐

Problem Description 大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N 毫升和M 毫升 可乐的体积为S (S   Input 三个整数 : S 可乐的体积 ,

2012-05-06 20:06:49 1926

原创 2.25-将顺序表A,B的交集用C存储

#define max 10 typedef struct { int elem[max]; int length; }Seqlist; void Same(Seqlist&A,Seqlist&B,Seqlist&C) { int i,j,k=0,lena=A.length,lenb=B.length; for(i=0;i<lena;i++) {

2012-05-06 20:01:52 1767

原创 2.24-将单增序列A,B按单减合并(有问题)

#include #include typedef struct node {     int data;     struct node *next; }Linklist; Linklist *create() {     int i;     Linklist *head=(Linklist*)malloc(sizeof(Linklist));     Linklist

2012-05-06 19:25:56 1616

原创 2.23-将A,B链表合并成C

typedef struct node { int data; struct node*next; }Linklist; Linklist* Merge(Linklist &A,Linklist &B) {     Linklist*pa=A.next,*pb=B.next,*temp;     while(pb)     {         if(pa->next==NU

2012-05-06 09:17:55 1025

原创 2.21-顺序表就地逆转

#define max 100typedef struct { int elem[max]; int length; }Seqlist; void Reverse(Seqlist &S) { int ave=S.length>>1,temp,i; for(i=0;i<ave;i++) { temp=S.length-1-i; S.elem[i]^=S.e

2012-05-06 08:28:31 1751

原创 2.22-单链表就地逆转

typedef struct node { int data; struct node*next; }Linklist; void Reverse(Linklist&L) { Linklist *q=L.next,*p=L.next->next,*temp; q->next=NULL; while(p) { temp=p; p=p

2012-05-05 23:45:15 864

原创 2.19-删除链表中大于mink且小于maxk的值;

typedef struct node { int data; struct node*next; }Linklist; void Delete(Linklist &L,int mink,int maxk) { Linklist*p=&L,*q=NULL; while(p->next) { q=p; while(p->next->data

2012-05-05 22:52:07 4542 1

原创 2.17-比较有头节点的单链表与无头节点插入元素的区别;

无头节点的链表插入元素而要判断当前节点是否为头节点。

2012-05-05 20:05:27 2006

原创 2.16-从la中删除从i开始len个元素后,把删除的元素放到lb中的j位之前

Status DeleteAndInsertSub(LinkedList la,LinkedList lb,int i,int j,int len) { if(i<0||j<0||len<0)return INFEASIBLE; p=la;k=1; while(knext;k++;} q=p; while(knext;k++;} s=lb;k=1; while(knext;k++}

2012-05-05 20:00:05 1000

原创 2.15--连接链表ha和hb,用hc接收;

typedef struct node { int data; struct node*next; }Linklist; Linklist* connect(Linklist&ha,Linklist&hb) { Linklist*p=&ha; while(p->next)p=p->next; p->next=hb.next; return &ha; }

2012-05-05 19:14:33 795

原创 2.14-实现Length(L)返回链表L的长度

typedef struct { int elem[max]; int length; }Seqlist; int Length(Linklist &L) { int count=0; Linklist*p=L.next; while(p){count++;p=p->next;}; return count; }

2012-05-05 18:58:48 1775

原创 2.13 -实现Locate(L,x)返回x在链表中的位置

typedef struct node { int data; struct node*next; }Linklist; typedef struct { int elem[max]; int length; }Seqlist; int Locate(Linklist &L,int x) { int count=0; Linklist*p=&L; while(p) { if(p

2012-05-05 18:36:43 1857

原创 2.11-在顺序表va中插入x使仍然有序

typedef struct { int elem[max]; int length; }Seqlist; void insert(Seqlist &va,int x) { int flag,i,j; if(va.elem[va.length-1]-va.elem[0]>=0)flag=1; else flag=-1; for(i=0;i<va.length;i++) { if(

2012-05-05 18:22:59 940

SneakyJoystick-Cocos2d-x 3.0rc0

之前无良的上传者上传的不好用,坑爹。。。这个才是正版

2014-08-03

SneakyJoystick for cocos2d-x 2.21

之前无良的上传者上传的不好用,坑爹。。。这个才是正版

2014-08-03

消灭星星 Qt 源代码

Qt 4.7的工程 和 android 手机 上消灭星星原理一样。QT 代码简短 易懂。

2013-11-03

最短路模板(详细注解)

可以做刷题的模板哦!!!可以好好理解哦

2012-07-26

空空如也

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

TA关注的人

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