Let's talk about No.4 and No.3 first: No.4 must unconditionally support No.3 when there are only three people left, even if he doesn't give himself any gold coins, so the plan of No.3 is (100,0,0), No.3 will vote for himself, and No.4 will vote for himself, even if No.5 opposes it, it will not help.
Let's start with No.2: Since No.3 can keep 100 gold for himself, he definitely wants No.2 to die. In other words, no matter what Plan 2 comes up with, he will oppose it. In this case, he won't give any gold coins at all, but if he wants to live, it must be 3 to 1. For this reason, he wants to please number four and number five. How can he please them? One gold coin is enough for each person. Why? Because if he dies, as I just said, No.4 and No.5 don't even have a gold coin, so the plan for No.2 is (98,0, 1, 1).
The most difficult thing to analyze is the number one: first of all, he must give up the number two, because to meet the number two, he must pay 99 gold coins, which obviously cannot meet the requirement of maximizing interests. Of the remaining three people, number 3 is the easiest to buy off. Just now, I said that if No.2 has the right to distribute, No.3 will have nothing, then a gold coin can definitely be exchanged for the yes of No.3, and then it is enough to buy another one on No.4 and No.5, and the remaining one will be given up. Just now, I said that the scheme of No.2 is (98,0, 1, 1), so it takes two gold coins to win the support of one of them. The voting situation is as follows: 1 has one vote for itself, one vote for itself on the 3rd, and one vote for each on the 4th and 5th, 3 to 2. The allocation scheme is (97,0, 1, 2,0) or (97,0, 1, 0,2).