上一页 1 ··· 5 6 7 8 9 10 下一页
  2024年9月12日
摘要: 遗传算法有五个基本要素:编码和解码;种群初始化方法;适应度函数;遗传算子(主要包括选择、交叉、变异等);遗传参数设置(种群规模、遗传算子的概率等)等。 阅读全文
posted @ 2024-09-12 23:09 axuu 阅读(21) 评论(0) 推荐(0)
摘要: 1.size_t `size_t` 是一种在C/C++编程中非常常用的数据类型,它定义在`<stddef.h>`或者`<cstdlib>`等头文件中,通常用来表示**大小**或**长度**。 ### 关键特性: 1. **无符号类型**:`size_t` 是无符号整数类型,表示它只能存储非负整数。因 阅读全文
posted @ 2024-09-12 14:53 axuu 阅读(162) 评论(0) 推荐(0)
摘要: 动态规划法,时间和空间复杂度均为O(n) 此方法超出时间限制。 用滚动数组思想,把空间复杂度优化成O(1) 70. 爬楼梯 - 力扣(LeetCode) 官方题解的方法2,3没看。 67. 二进制求和 - 力扣(LeetCode) class Solution { public: string ad 阅读全文
posted @ 2024-09-12 13:30 axuu 阅读(14) 评论(0) 推荐(0)
  2024年9月11日
摘要: 题目链接: https://leetcode.cn/problems/pascals-triangle/description/?envType=problem-list-v2&envId=dynamic-programming 本题要注意索引问题。 阅读全文
posted @ 2024-09-11 23:35 axuu 阅读(14) 评论(0) 推荐(0)
摘要: 1.C++中的字符串数组: 2. C++中的常量数组 这个const pair<int, string> valueSymbols[]定义了一个常量数组,数组中的每个元素都是一个pair<int, string>类型的对象。pair是C++标准模板库(STL)中的一个模板类,用于将两个值组合成一个单 阅读全文
posted @ 2024-09-11 20:30 axuu 阅读(144) 评论(0) 推荐(0)
  2024年9月10日
摘要: 1.Redis 阅读全文
posted @ 2024-09-10 23:21 axuu 阅读(28) 评论(0) 推荐(0)
摘要: 1.CPLEX是什么? 2.an apparent-tardiness-cost-with-setup (ATCS)是什么? a basic simulated annealing (SA)基本模拟退火算法 the threshold-accepting (TA) method 阈值接收算法 阅读全文
posted @ 2024-09-10 21:48 axuu 阅读(33) 评论(0) 推荐(0)
  2024年9月9日
摘要: 在Python和C++中,许多运算符是相似的,因为它们都遵循许多基础的编程概念,比如算术运算、逻辑运算、位运算等。然而,也存在一些差异,尤其是在一些高级特性上,比如Python的动态类型和C++的静态类型。以下是一些常见的运算符在两个语言中的对应情况: 算术运算符 PythonC++描述 + + 加 阅读全文
posted @ 2024-09-09 23:05 axuu 阅读(139) 评论(2) 推荐(0)
  2024年9月2日
摘要: 知识点: 解题方法:回溯+剪枝 新接触的数据类型: #include <unordered_map>#include <unordered_set> 1.#include <unordered_map> #include <unordered_set> #include <climits>分别是什么 阅读全文
posted @ 2024-09-02 01:27 axuu 阅读(73) 评论(0) 推荐(0)
  2024年8月29日
摘要: int solve(deque<int> machines, const vector<int>& tasks){ for(int task : tasks){ int cnt = 0; //首件不匹配 while(cnt < machines.size() && task != machines. 阅读全文
posted @ 2024-08-29 23:42 axuu 阅读(39) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 下一页