![]() Now imagine we have millions of units and resources: the previous greedy strategy is likely to completely miss the optimal solution. ![]() But this "guess and check" solution might not even be optimal. We could simply find the unit with the best power/cost ratio, take as many of them as possible, and repeat the process with the other two units. How should we maximize the power of our army considering these resources? The following table provides the cost and power of each unit: Unit Horsemen are stronger than bowmen, who are in turn stronger than swordsmen.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |