CodePudding user response:
Contrast can be applied to the data is greater than 2CodePudding user response:
This topic can use greedy algorithm is to, first of all, we just as much as possible to let tian horse horse than king,At the same time, to ensure the just right tian ma than the king's horse, at the same time to ensure that this horse is tian all the speed is faster than king horse the smallest horse,
So we could start to his king and tian ma is from small to large sorted, the speed of the tian ma traversal, if tian ma king horse, so this horse, then
It is good to both sides of the horse back at the same time,
CodePudding user response:
CodePudding user response:
#include