Cody

Solution 2192717

Submitted on 4 Apr 2020 by William
  • Size: 65
  • This is the leading solution.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
marks = [ 60,100, 20, 40, 20, 10] deadline = [ 2, 1, 3, 2, 1, 3] assert(isequal(greedy_01(marks,deadline),[2,1,3]))

marks = 60 100 20 40 20 10 deadline = 2 1 3 2 1 3

2   Pass
marks = [10,10,50,40,30,100,20,10] deadline = [1,2,3,3,5,5,1,3] assert(isequal(greedy_01(marks,deadline),[7,4,3,5,6]))

marks = 10 10 50 40 30 100 20 10 deadline = 1 2 3 3 5 5 1 3

3   Pass
marks = [50,100,40,80,200,220,10] deadline = [2,1,2,1,1,1,4] assert(isequal(greedy_01(marks,deadline),[6,1,7]))

marks = 50 100 40 80 200 220 10 deadline = 2 1 2 1 1 1 4

4   Pass
marks = [50,100,40,80,200,220,10,150] deadline = [2,1,3,6,2,2,6,7] assert(isequal(greedy_01(marks,deadline),[5 6 3 7 4 8]))

marks = 50 100 40 80 200 220 10 150 deadline = 2 1 3 6 2 2 6 7

Suggested Problems

More from this Author145