随笔分类 -  算法

摘要:近来的将leetcode上的一些题目整理在这里 按照算法分类,还有按照数据的结构分类 https://www.w3cschool.cn/lcodeproblems/ 阅读全文
posted @ 2020-06-18 16:58 阢Lana 阅读(157) 评论(0) 推荐(0)
摘要:用蚁群算法解决01背包问题。 我本以为就是完全的蛮力法,但百度后觉得应该是这个 (4)分支限界-优先队列(STL) // # 分支限界优先队列法 // 队列中的节点类型 struct NodeType {// 分支限界节点 int no; // 节点编号 int i; // 当前节点在搜索空间的层次 阅读全文
posted @ 2019-12-23 21:41 阢Lana 阅读(638) 评论(0) 推荐(0)
摘要:#include<iostream> using namespace std; int** path; int** result; int** square; int dirx[8] = { 0,0,1,1,1,-1,-1,-1 };//8个方向变量 int diry[8] = { 1,-1,-1, 阅读全文
posted @ 2019-11-26 11:51 阢Lana 阅读(279) 评论(0) 推荐(0)
摘要:恢复内容开始 关于动态规划法,我怎么觉得就是蛮力法,有时候比蛮力法看起来还复杂 1.0/1背包问题 目前存在的问题,可能可以忽视? #include<iostream>#include<algorithm>using namespace std;int KnapSack(int w[], int v 阅读全文
posted @ 2019-11-08 15:12 阢Lana 阅读(251) 评论(0) 推荐(0)

/*别去做新时代教化的奴隶,别轻易去向别人看齐——*/
正在加载今日诗词....
© options->title(); ?>. Typecho 强力驱动'); ?>.