After five pirates get 100 gold coins, discuss how to distribute them.

The algorithm is reversed: when voting on the 5th, the formed state is: 1 get 0 gem, die 2 get 0 gem, die 3 get 0 gem, die 4 get 0 gem, die 5 get 100 gem. Reason: Needless to say, it's his turn to vote on the 5th, but it will also violate the topic, because all the pirates before are. The formation state is: 1 get 0 gem, 2 get 0 gem after death, 3 get 0 gem after death, 100 get 0 gem after death, live, agree 5 get 0 gem, live, disagree. Reason: at this time, there is only two to one. As long as you agree, you can reach half and vote. There is no danger to life, but No.3 is not the state you formed when you voted for No.3. If you die 2, you will get 0 gems; if you are alive, you will get 0 gems if you agree with 4; if you are alive, you will not agree with 5 1 gems; if you are alive, you will agree with the turn of No.3. He only needs to give 5 1 gems. The reason is that 5 will realize that once it is 4' s turn, he will get 1 gem. Whether it's his turn or not is just an expectation. Let's take a look at the situation on the 2nd. When voting on the 2nd, the state is: 1 gets 0 gem, 2 gets 99 gem after death, 3 gets 0 gem before death, 4 gets 1 gem before death, and 5 gets 0 gem after consent. If it is the turn of the pirates, he will definitely get 99 gem. Why? The reason is: No.4 has realized that if it is No.3' s turn to vote, he won't get any points, so he has gained a little at this time, although he agreed. At this time, he also considered that No.3 could not curry favor and would lose too much, because if only No.3 was given, he could always disagree and get the right to vote. No.5 can also curry favor with you, but it needs two gems, which is not economical. Because No.5 also knows that even the next round is 1, he has decided on a gem: this pirate is of course smart. As can be seen from the above, since the situation of No.2 is settled, he already knows what the pirates behind him are thinking, that is, in short, they clearly realize that when No.2 turns around, No.3 and No.5 can't get the gems! Then in this case, things will be much better. Give each of them one, and it will be natural! Therefore, the pirates of 1 resolutely decided to give 1 gems to No.3 and No.5 respectively. The final state is: 1 get 98 gems, live, agree 2 get 0 gems, live, disagree 3 get 1 gems, live, agree 4 get 0 gems, live, disagree 5 get 65433.