![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
backtracking method
文章平均质量分 52
zhuxin
just for you
展开
-
装载问题之一
#include #include #define MAXSIZE 100int n; //集装箱的个数int c; //集装箱的容量int w[MAXSIZE]; //集装箱的重量int cw; //当前重量int bestw;原创 2012-06-18 15:13:43 · 510 阅读 · 0 评论 -
装载问题之二
/* 上界函数*/#include #include #define MAXSIZE 100//全局变量int n; //集装箱个数int c; //容量int r; //剩余容量int w[MAXSIZE]; //集装箱重量int cw;原创 2012-06-18 15:36:56 · 431 阅读 · 0 评论 -
装载问题之三
/* 构造最优解*/#include #include #define MAXSIZE 100int n; //集装箱个数int c; //容量int w[MAXSIZE]; //集装箱重量int r; //剩余重量int原创 2012-06-18 15:51:25 · 411 阅读 · 0 评论 -
批处理作业调度
/* 批处理作业调度 输入: 3 2 1 3 1 2 3 输出:18 1 3 2*/#include #include #include #define MAXSIZE 100int n; //作业的个数int m1[MAXSIZE];原创 2012-06-21 10:19:46 · 805 阅读 · 1 评论 -
n后问题之一
/* n后问题*/#include #include typedef int bool;#define true 1#define false 0#define MAXSIZE 50//皇后个数int n;//总数int sum;//解int x[MAXSIZE];//输入void input();//初始化void原创 2012-06-23 18:01:05 · 400 阅读 · 0 评论 -
n后问题之二
#include #include #define MAXSIZE 50typedef int bool;#define true 1#define false 0int n;int sum;int x[MAXSIZE];//输入void input();//初始化void init();//判断是否可放bool canPlace(i原创 2012-06-23 18:34:41 · 421 阅读 · 0 评论