java贪婪算法问题
问题描述:
java贪婪算法问题
Consider the single machine scheduling problem where we are given a set T of tasks specified by their start times and finish times,as in the task scheduling problem,except we now have only one machine and we wish to maximize the number of tasks that this single machine performs.Design and implement a greedy algorithm for this single machine scheduling problem and show that it is correct.What is the running time of this algorithm.
请给出正确的可执行的java程序
请看清问题在回答.贪婪算法公式就不用写了.耐心等待正确答案中..
答
..贪心法.给你拿C写一下.
思想都是一样的
一块钱找成五分.二分,一分共有多少种分法
#include
int main(int argc, char *argv[])
{
int i, j, k, n, m;
n=100;
k=0;
for(i=0;i