会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
七分
浮生瀚海,立马昆仑。
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
3
4
5
6
7
8
下一页
2022年4月28日
kmp
摘要: KMP算法分两步 一:求子字符串(p)的next数组 void getnext(int nextt[],string p) { nextt[0]=-1; for (int i=1;i<p.size();i++) { int j=nextt[i-1]; while ((p[j+1]!=p[i])&&(
阅读全文
posted @ 2022-04-28 08:53 xxj112
阅读(42)
评论(0)
推荐(0)
2022年4月25日
动态链表
摘要: 主要函数 1: malloc:函数原型 void *malloc(unsigned int size); 分配一个长度为size的连续空间,返回首地址。 空间不足时返回HULL; 2: calloc:函数原型 void *calloc(unsigned n,unsigned size) 分配n个长度
阅读全文
posted @ 2022-04-25 16:09 xxj112
阅读(40)
评论(0)
推荐(0)
2022年4月24日
链表结构理解
摘要: #include <stdio.h> #include <malloc.h> struct node { int date; struct node *next; }; int main() { struct node a,b,c,*head,*p; a.date=1; b.date=2; c.da
阅读全文
posted @ 2022-04-24 21:51 xxj112
阅读(20)
评论(0)
推荐(0)
2022年4月21日
逆序对
摘要: #include<iostream> #include<map> #include<queue> using namespace std; typedef long long ll; const int N=10000; int e[N]; int tmp[N]; ll merge_sort(int
阅读全文
posted @ 2022-04-21 23:30 xxj112
阅读(31)
评论(0)
推荐(0)
map迭代器
摘要: #include<iostream>#include<map>#include<queue>using namespace std;queue<int> qu;map<int, int> mp;int sss(int a){for(auto it=mp.begin();it!=mp.end();it
阅读全文
posted @ 2022-04-21 23:13 xxj112
阅读(178)
评论(0)
推荐(0)
快速排序map
摘要: map大数据时会超时 map有自动排序(降序:按first)和查重功能。 #include<iostream> #include<map> using namespace std; map<int, int> mp; void sss() { for(auto it=mp.begin();it!=m
阅读全文
posted @ 2022-04-21 22:49 xxj112
阅读(43)
评论(0)
推荐(0)
向量与空间的解析几何
摘要: 空间直角坐标系Oxyz:卦限 、坐标面xOy 、横、纵、竖坐标; 向量: 自由向量 、逆向量 、零向量 、方向角 、方向余弦 、 a*b:数量积 、向量积不同;平面向量的向量积垂直于平面(遵循右手法则); |c|=|a||b|sinθ; 三角形面积=|ab*ac|/2; 平面的点法式方程; 一般式方
阅读全文
posted @ 2022-04-21 20:34 xxj112
阅读(177)
评论(0)
推荐(0)
归并排序
摘要: 1 #include<stdio.h> 2 #include<iostream> 3 using namespace std; 4 int map[100]; 5 void merge_sort(int q[],int l,int r) 6 { 7 if(l>=r) 8 return; 9 int
阅读全文
posted @ 2022-04-21 12:39 xxj112
阅读(17)
评论(0)
推荐(0)
2022年4月20日
spaf
摘要: #include<bits/stdc++.h> using namespace std;typedef long long ll;#define INF 0x3f3f3f3fconst ll N=610000;ll vis[21900]; //相当于bool函数ll dis[21900],u[N],
阅读全文
posted @ 2022-04-20 18:08 xxj112
阅读(54)
评论(0)
推荐(0)
2022年4月19日
二叉树的构建
摘要: #include<iostream>#include<set>#include<algorithm>using namespace std;int tree[100];int create(int _tree[],int _node[],int len){ int i,max=1; _tree[1]
阅读全文
posted @ 2022-04-19 23:29 xxj112
阅读(45)
评论(0)
推荐(0)
上一页
1
···
3
4
5
6
7
8
下一页
公告