- 博客(4)
- 收藏
- 关注
原创 大数加法(测试数据不完全,可能会有出错个例)
#include<stdio.h>#include<string.h>void add(char *a1,char *a2){ int length1=0,length2=0,temp1=0,temp2=0;//第一个和第二个数得长度,对应位结果 int jinwei=0;//初始化进位0 int i,j,k=0; int n1[100],n2[100],n3[150];//n1,n2为源操作数,n3为结果数; length1=strlen(a1); length
2022-02-06 15:19:20
644
原创 病毒检测(C语言):关于字符串的模式匹配
头文件#include<stdio.h>#include<malloc.h>#include<string.h>#include<stdlib.h>#define OVERFLOW 0#define OK 1#define ERROR 0typedef int Status;typedef struct{ char *ch; int length;}HString;//生成一个串Status StrAssign(HString
2022-01-04 21:27:27
1259
2
原创 哈夫曼编码
#include<malloc.h>#include<stdio.h>#include<string.h>#define MAX 100typedef struct{ int weight; int parent,lchild,rchild; char c1;//用于接收来自链表的字符 }HTNode,*HuffmanCode;typedef struct{ char cd[MAX]; int start;}HCode;typedef str
2021-12-31 18:29:58
675
原创 六度空间,统计一个图中所有顶点附近六步以内顶点占所有顶点的比例
#include<malloc.h>#include<stdlib.h>#include<stdio.h>#define MAX_VERTEX 100 //最大顶点数 typedef struct QNode{ int data; struct QNode *next;}QNode,*Queueptr;typedef struct{ Queueptr front; Queueptr rear;}LinkQueue;typedef struct
2021-12-26 19:54:43
586
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人