数据结构 分支界限法程序.docVIP

  • 3
  • 0
  • 约2.8千字
  • 约 4页
  • 2019-09-12 发布于江西
  • 举报
#include stdafx.h #include iostream.h #includestdio.h #includemalloc.h #includestring.h #define MaxSize 100 //最多结点数 typedef struct aa { int weight; int Value; int ceng; struct aa *parent; //Boolean leftChild; bool leftChild; }QNode; //存放每个结点 typedef struct { QNode A[MaxSize]; int front,rear; }SqQueue; //存放结点的队列 SqQueue sq; int n; //实际物品数 int bestx[MaxSize]; // 存放最优解 int bestv; // int EnQueue(QNode *b) {if(sq.rear==MaxSize) return 0; /*sq.A[sq.rear].weight=b.weight sq.A[sq.rear].value=b.value; s

文档评论(0)

1亿VIP精品文档

相关文档