Problem 42875. Assignment Problem
Solution Stats
Problem Comments
-
6 Comments
In test #1 answer could be [1 4 2 3], couldn't it? It gives tt = 10, same as proposed [1 2 4 3].
You're correct, Jan. Both options give you a minimum time of 10.
Additional test cases have been added.
I think that ones(4) in Test #3 should be eye(4), instead. Also, #1 has to be fixed as Jan pointed out.
The corrections mentioned by Yuichi (and Jan) have been made.
Good problem.
How to proceed with larger matrix (where permutations are too expensive) ?
Solution Comments
-
1 Comment
Should not need the '=' in the 'if j<=t' statement to get the "correct" answer, but that makes the code match the solution in the test suite.
Problem Recent Solvers40
Suggested Problems
-
3536 Solvers
-
Find the peak 3n+1 sequence value
1556 Solvers
-
Project Euler: Problem 6, Natural numbers, squares and sums.
1557 Solvers
-
201 Solvers
-
Area of an equilateral triangle
4299 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!