该类问题可以使用贪心策略可以设计出较好的近似算法(并不是最优解)
#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<algorithm>
using namespace std;
typedef struct Node
{
int hour;//记录该作业的所需要完成的时间
int number;//记录该作业在原来的序列的顺序
}node;
bool cmp(node x,node y)
{
if(x.hour>y.hour)
return true;
else
return false;
}
void MultiMachine(Node node[], int machine_number, int *machine_operation, int *machine_time[

本文探讨了如何运用贪心策略解决多机调度问题,虽然得出的方案可能不是最优解,但能实现较好的近似效果。
最低0.47元/天 解锁文章
2377

被折叠的 条评论
为什么被折叠?



