有7个独立的作业(1,2,3,4,5,6,7),由3台机器(1,2,3)加工处理,各作业所需的处理时间分别为,2,14,4,16,6,5,3;
//
// Created by xzw12 on 2021/12/17.
#include <stdio.h>
#include <algorithm>
#include <stdio.h>
#include <vector>
#include <queue>
#define MAX 1001
using namespace std;
#define N 100
int n=7;
int m = 3;
struct NodeType { //优先队列节点类型
int no; //作业序号
int t; //执行时间
int mono; //机器序号
bool operator<(const NodeType &s)const
{
return t>s.t; //按t越小越优先出队
}
};
void solve();
NodeType A[] ={
{1, 2}, {2, 14}, {3, 4}, {4, 16}, {5, 6}, {6, 5}, {7, 3}};
int main(){
printf("多机调度方案\n");
solve();
}
void solve() {