about elimination

content

One, the rules of the game

2. Definition of terms

3. Greedy strategy

4. Violent Tactics


One, the rules of the game

In fact, the essence of this game is that there are some boxes, and each box contains a number of balls of various colors. Choose 2 boxes at a time, remove the balls of the same color among them, and finally take them all.

2. Definition of terms

Correct state: The state that can be completely reduced after a series of operations.

3. Greedy strategy

(1) Greedy strategy 1. Every time you take the largest number, is there a number that can be mutually contracted with this number, so that it is still in the correct state after the mutual contract?

The answer is no, we can easily find such an example in level 7, 4 6 6 3 3

  

 This example is not violated, because 6 can be mutually contracted with 4, and then it is still the correct state.

But what this example gives us is that, where the power of 2 is 4 2 2 1 1, we find that the largest number in the two sets of data is different, so that we can design the intersection use case:

60, 150, 10, 9

In this example, 9 and other numbers must be mutually contracted first, so the greedy strategy one does not hold.

(2) Greedy strategy 2, every time you take the number with the most prime factors (repeated weighting), is there a number that can be mutually contracted with this number, so that it is still in the correct state after the mutual contract?

Repeated weighting means that, for example, 12 has 3 prime factors, which are 2 2 3

4. Violent Tactics

If the data is relatively weak, you can choose any 2 numbers to make a mutual agreement, that is to say, you can just keep messing around.

The 26th level test, as long as you roughly remember the grid position and don't look at the numbers, it only takes 18 seconds to complete the frenzy with your eyes closed.

Because the data is too watery and boring, so I didn't continue to play.

 

Guess you like

Origin blog.csdn.net/nameofcsdn/article/details/123029418