Thankfully, one of the cutlasses you grab is serviceable, and you manage to put in a decent show of flailing it around to avoid getting riddled with holes, up until the moment she forgets the other three ponies (Scarlet, Pearl and Rarity) sneaking up behind her, whereupon she promptly gets knocked out with a coconut. Bad one there.
With the villain safely trussed up, you call for help with a Royal Emergency Beacon you stashed away, and on cue, two Royal guards escort you back to Canterlot Castle, where Rarity can officially receive her prize, and the crazy pirate pony can await a trial in the dungeons.
At the award ceremony, Princess Celestia recognises Rarity as the officially dubbed winner, but recognising your part in keeping Rarity safe and for being the sharp pencil for solving the puzzles with her, she proposes you split the prize...but the distribution will be decided by (what else) a battle of wits. Because it always is, nowadays.
She then sits both you and Rarity down, facing each other at a table, with a partition blocking the sight of both of you. She then reaches into the treasure chest you brought back, hands you one hundred of the precious gems inside, and explains the rules of the game.
The gems will be used to play a game of war, where you, the defender, must defend ten towers, with the gems representing soldiers. Each of the ten towers is worth a certain number of points, from 1, 2, 3...9, and 10. Both you and Rarity will then send soldiers (or gems, which make for very shiny soldiers) to a tower, and whoever has the most soldiers wins the points that tower is worth. In the event of a draw, the points are split. Whoever has the most points once all ten towers have engaged in battle wins, and receives two gem for every point earned, and any leftovers fall under the crown's ownership, as restitution for the public.
It sounds like this could go either way, but Princess Celestia then announces a twist: YOU will arrange your one hundred soldiers as you see fit, whereas Rarity can win the game (and the ENTIRE stock of gems) by using the fewest number of gem-soldiers possible: if she's forced to use all one-hundred, however, all the gems will fall under YOUR possession. Sounds harsh, but it'll motivate Rarity to try her best, at least. On the other hand, if she can successfully identify the fewest number of soldiers she needs before your distributions are revealed, she will win the whole game and thus all the gems.
Imagine you are Rarity. Taking into account you are playing a perfectly logical ex-partner, what is the fewest number of gem-soldiers you need to take home the entire prize? You could do it the old fashioned way, but that would involve taking home a smaller prize...and before Rarity's sense of generosity kicks in, it's pointed out that if she wins all of them, she can just freely give them out as she wishes afterwards, so it's in her best interest to win. So what to do?
Help Rarity defeat...well, yourself, and take home the long-coveted prize!
I suppose it is either 56 or 77 depending on how "we" arrange his 100 soldiers
ok so there is 55 gems in total
We will put soldiers equal to the % one tower gives
So we put: 18 on the 10
16 on the 9
15 on the 8
13 on the 7
11 on the 6
9 on the 5
7 on the 4
5 on the 3
4 on the 2
And 2 on the 1
For rarity to win she needs 28 points and the best way for that is get the 9,8,6&5
17+16+12+10=55
Rarity only needs 55 soldiers
I can improve on that:
As a quick note before I get started, ties do not affect things. If Rarity's got more than one tie, she can just take all the soldiers off the tie for the lower tower, add one soldier to the higher tower, and suddenly she has more points while using the same or fewer soldiers, while having fewer ties. So at most she'll have one tie, but even that is avoidable. A tie on tower 1 is pointless if it's the only tie because a half-point will never give her victory - at most it will give her a 27.5-27.5 draw. Any other tie, look at the tower of half the value (rounded down for odd towers since the half-point makes no difference). If it's not being attacked, then abandon the tie and attack that tower instead. If it's already being attacked, abandon that attack and flip the tie to a win. Either way, she wins without a tie while using just as many soldiers, if not fewer. This in mind, we can safely ignore ties.
Of the 55 points, Rarity needs 28 to win, while spending as few soldiers as possible. We can force Rarity to spend 2 soldiers per point by putting on each tower twice its point value minus 1 (1 for tower 1, 3 for tower 2, 5 for tower 3, and so on). Adding all of these numbers together gives us exactly 100 soldiers. (To check, we have 1+19, 3+17, 5+15, 7+13, and 9+11, giving five 20s, which add to 100.) In this way, no matter which towers are chosen, Rarity will need to use 2 soldiers for each point, meaning for all 28 points she needs 56 soldiers.
Can we do better? Intuitively it seems like this answer is best, because to increase the number of soldiers on one tower means decreasing the number of soldiers on another tower, making the decreased tower more cost-effective, so since Rarity will aim for the most cost-effective towers to use the fewest soldiers, we are best off making all of them have equal cost-effectiveness. While this is the key insight to this puzzle, it isn't exactly a rigorous proof, so I'll aim to provide one of those too, even though the above will probably suffice.
First of all, if Rarity takes towers 10, 9, and 8, then taking any single other tower will be sufficient for Rarity to win, so in order for us to force Rarity to use at least 57 soldiers, we must use at least 53 soldiers on those four towers, leaving only 47 soldiers for the remaining six towers. We can do this for any of the seven lower towers, so any six of the seven lower towers must sum to at most 47 soldiers. (Doing the math, the seven lower towers together must sum to at most 54, but we don't actually use this fact.) On the other hand, taking all seven lower towers will also cause Rarity to win, so the seven lower towers together sum to at least 50 (so that she is forced to use 57 soldiers), meaning the three highest towers sum to at most 50, which also means each of the lower towers must have at least 3 soldiers.
Now, if Rarity takes towers 7 and 4, she will be at 11 points, and if she then takes any two of the three highest towers, her total will be at least 28. The most soldiers she can be forced to spend on the higher two towers is 35 (with a split of 17/17/16 she will ignore one of the 17s), so we would need to force her to spend at least 22 soldiers on the remaining two towers of 7 and 4. Therefore, we must spend at least 20 soldiers on these two towers. The same logic proves we need to spend at least 20 soldiers on towers 6 and 5. Since any six the the seven lower towers must sum to at most 47, this means that any two of the lowest three towers must sum to at most 7. Doing the math, the lowest three towers must sum to at most 10 soldiers.
Now, let's revisit the 6/5 pair. If we replace tower 5 with towers 2 and 3, the sum is the same, so by the same logic all three towers must sum to at least 19 soldiers (not 20 anymore because there is one extra tower, meaning one extra victory is required). But since the lower towers sum to at most 7 soldiers, tower 6 must have at least 12 soldiers. Similarly, tower 5 must have at least 8 soldiers from 3/2/1 replacing 6. Now, since each tower 1-7 has at least 3 soldiers, and two of those towers (in particular, any two of towers 1-3) must have at least 6 soldiers. Now, if all of towers 1-3 have ONLY 3 soldiers each, that would increase tower 6's total to at least 13 (since 3/2 have only 6 soldiers) and tower 5's to 9 (since 3/2/1 have only 9 soldiers), but that would push the total of 6/5 to 22, and the total of towers 2-7 to 48, which is too much. Therefore, towers 1-3 sum to exactly 10 soldiers, split 3/3/4, meaning the sum of towers 4/7 and towers 5/6 is exactly 20 soldiers in each case. It also means that no two of towers 8-10 sum to less than 33, meaning none of those towers have more than 17 soldiers.
But now, consider towers 10, 3, and any three of towers 4-7 - all four sets of this kind have at least 28 points. At least 52 soldiers are assigned to each of these sets of five, so that at least 57 soldiers will be required to defeat all 5 towers. But tower 3 has at most 4 soldiers and tower 4 has at most 17 soldiers, meaning the remaining 3 towers must have at least 31 soldiers between them. However, since towers 4-7 combined have exactly 40 soldiers, choosing whichever three of them have the fewest soldiers will result in at most 30 soldiers. This means for at least one of the sets, the number of soldiers is at most 51, which is impossible. Therefore, it is impossible to require 57 or more soldiers, so the solution I presented - that requires 56 soldiers - is best.