随笔分类 -  算法

摘要:1、心得 字典树理解了半天,总算是大概弄懂了,感觉自己没有刚学算法的时候那么智力低下了(哭~),上题吧还是。 2、代码及其应用题 1、基础模版 代码: #include <iostream> #include <cstring> #include <algorithm> using namespac 阅读全文
posted @ 2022-01-17 12:17 Medjay 阅读(39) 评论(0) 推荐(1)
摘要:1、心得 自己感受到了自己的进步,没想到一个月前怎么都看不懂的kmp这次两小时就搞定了。再接再厉! 2、代码 #include <iostream> #include <cstring> #include <algorithm> using namespace std; const int N = 阅读全文
posted @ 2022-01-16 14:04 Medjay 阅读(53) 评论(0) 推荐(1)
摘要:1、单调栈一般是求数列某个数最左侧第一个大于或小于这个数的数 题目如下: 代码如下: #include <iostream> #include <cstring> #include <algorithm> using namespace std; const int N = 1e5 + 10; in 阅读全文
posted @ 2022-01-14 21:12 Medjay 阅读(53) 评论(0) 推荐(1)
摘要:1、今天重温了数组模拟的经典线性数据结构,来记录一下。 2、题目如图: 1、单链表: 代码如下: #include <iostream> #include <cstring> #include <algorithm> using namespace std; const int N = 1e5 + 阅读全文
posted @ 2022-01-14 20:41 Medjay 阅读(70) 评论(0) 推荐(0)
摘要:1、题目如图 2、算法代码 #include <iostream> #include <cstring> #include <algorithm> #include <vector> using namespace std; typedef pair<int, int> PII; vector<PI 阅读全文
posted @ 2022-01-11 23:51 Medjay 阅读(67) 评论(0) 推荐(0)