2023年8月4日

matlab笔记二

摘要: # Note2 ## 特殊矩阵 ``` zeros(3,4) % 零矩阵 ones(4,5) %一矩阵 eye(3) %单位矩阵 eye(3,4) rand(2) % 元素大小0~1的随机矩阵 randn(2,3) % 均值为0,方差为1的随机矩阵 exA=20+30*rand(5) % [20 阅读全文

posted @ 2023-08-04 21:21 dolires 阅读(29) 评论(0) 推荐(0) 编辑

matlab笔记一

摘要: # Note1 ## 基本数据类型 ``` 1.16 32 64 bit int float double(默认) signed unsigned 2.complex(real+image) 3.format long/short ``` ## 矩阵 ``` % 空格/逗号分隔同一行之间的数 A 阅读全文

posted @ 2023-08-04 21:12 dolires 阅读(31) 评论(0) 推荐(0) 编辑

2023年8月3日

字符串

摘要: # 复健Day9 ## 字符串相关算法 ### 1.最小表示法 最小表示法就是找出字符串s的循环同构串中字典序最小的那一个 时间复杂度为O(n) ``` char s[maxn]; int n; int get_min(char *s) { n=strlen(s+1); for(in 阅读全文

posted @ 2023-08-03 15:03 dolires 阅读(11) 评论(0) 推荐(0) 编辑

图论提高

摘要: # 复健Day7 ## 图论一 DGA:有向无环图 SCC:强连通 BCC:双连通 强联通:有向图中,两个顶点至少存在一条路径(两个顶点可以互相到达) 强连通图:每两个顶点都强连通的有向图 强连通分量:有向图的极大强连通子图 ### 1.有向图的强连通分量 #### 问题模型: 阅读全文

posted @ 2023-08-03 15:01 dolires 阅读(14) 评论(0) 推荐(0) 编辑

图论四

摘要: # 复健Day7 ## 图论四 如果一张无向图的N个节点可以分成A,B两个不相交的非空集合,并且同一集合内的点之间没有边相连,那么称改无向图为**二分图** > 二分图不存在奇环(长度为奇数的环) > > 因为每一条边都是从一个集合走到另一个集合,只有走偶数次才能回到出发点 ### $1 阅读全文

posted @ 2023-08-03 15:00 dolires 阅读(10) 评论(0) 推荐(0) 编辑

图论三

摘要: # 复健Day7 ## 图论三 ### 1.网络流最大流问题 平均来看Dinic算法效率强于EK算法,所以我这里只学习了Dinic算法 网络流是指有一个源点和一个汇点的图,然后每条边有流量限制,我们通过这个算法可以求出源点最大流量 时间复杂度为O(nm2) https:// 阅读全文

posted @ 2023-08-03 14:59 dolires 阅读(6) 评论(0) 推荐(0) 编辑

图论二

摘要: # 复健Day7 ## 图论二 ### 1.拓扑排序 ``` #include #include #include #include #include #define maxn 10010 using namespace std; int head[maxn],tot,n; struct E 阅读全文

posted @ 2023-08-03 14:59 dolires 阅读(5) 评论(0) 推荐(0) 编辑

图论一

摘要: # 复健Day7(图论一) ## 1.单源最短路的建图方式 ### 1.香甜的黄油 https://www.acwing.com/problem/content/description/1129/ ``` #include #include #include #include #incl 阅读全文

posted @ 2023-08-03 14:58 dolires 阅读(4) 评论(0) 推荐(0) 编辑

搜索二

摘要: # 复健Day6 注:这一篇笔记里的搜索题都非常简单 ## 搜索二 ### 1.迷宫 https://www.luogu.com.cn/problem/P1605 不要忘了回溯 ``` #include #include #include #define maxn 10 using name 阅读全文

posted @ 2023-08-03 14:57 dolires 阅读(182) 评论(0) 推荐(0) 编辑

搜索一

摘要: # 复健Day6 ## 搜索一 ### 一.基础的DFSBFS 宽搜我不是很常写,这里给出模板 ``` void BFS() { queue q; int vis[maxn]; q.push(s); while(!q.empty()) { int x=q.front();q.pop( 阅读全文

posted @ 2023-08-03 14:56 dolires 阅读(102) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示