The same set of dragons can be unbeatable in one order and easy in another. Sorting by a property (dragon strength) reveals the winning strategy.
Each dragon is one object with two properties. Vectors of pairs let you sort by one property while keeping the other attached. This pattern appears whenever you have related values.
You learned the greedy approach: at each step, make the locally best choice (fight the weakest dragon). Sometimes greedy works, sometimes it doesn't. Here it works because fighting weaker dragons first never hurts your chances later.