C++
青青小陌
天命孤星,独望苍穹
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
货郎担问题(分支限界法)
#include<iostream> #include<fstream> using namespace std; typedef int Type; #define N 5 #define ZERO_VALUE_OF_TYPE 0 #define MAX_VALUE_OF_TYPE 2147483647 typedef struct node_data{ Type c[N][N]; //费用矩阵 int row_init[N]; //费用矩阵的当前行映射为原创 2021-06-26 14:06:03 · 2506 阅读 · 0 评论 -
分支限界法解作业分配问题的实现(C++)
#include<iostream> using namespace std; #define MAX_FLOAT_NUM 10000.0 #define N 4 struct ass_node{ int x[N]; //分配给操作员的作业 int k; //搜索深度 float t; //当前搜索深度下,已分配的作业所需时间 float b; //本结点所需的时间下界 struct ass_node *next; }; typedef struct a原创 2021-06-16 21:05:25 · 1726 阅读 · 0 评论 -
c++双向循环链表实现基数排序
c++双向循环链表实现基数排序 #include<iostream> using namespace std; #include<math.h> typedef struct node { int key; struct node *prior; struct node *next; }LNode; /*双循环链表是环形的,首尾相连的*/ //取下并删去双循环链表的第一个元素 template<class Type> Type *del_entry(Type原创 2021-05-15 22:49:47 · 323 阅读 · 0 评论
分享