摘要: 一、NFA到DFA #include <stdio.h> #include <fstream> #include <cstring> #include <set> #include <malloc.h> #include <math.h> #include <iostream> #define JI 阅读全文
posted @ 2022-10-09 17:33 逆凌 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 一、生产者消费者 #include <windows.h> #include <stdio.h> //getchar() #include <stdlib.h> //rand() const int SIZE_OF_BUFFER = 10; //缓冲区长度 int ProductID = 0; // 阅读全文
posted @ 2022-10-09 17:21 逆凌 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 一、最大子数组 //求某数组的最大子数组 //最优方法,时间复杂度O(n) //和最大的子序列的第一个元素肯定是正数 //因为元素有正有负,因此子序列的最大和一定大于0 #include <stdio.h> #include <stdlib.h> int main() { int MaxSum(in 阅读全文
posted @ 2022-10-09 17:10 逆凌 阅读(13) 评论(0) 推荐(0) 编辑