The next step is the key! Consider E. At this time, E has three choices, but whether E and C are the same color directly affects how many choices D has, so we should discuss it in different situations at this time:
1, e If the color is the same as C, the last D has three choices, and the total number of choices is 5*4*3*3= 180.
2.E If the color is different from C (E has two choices), finally D has two choices, and the total number of choices is 5*4*3*2*2=240.
When the two situations add up, 420 is the final answer.
This kind of topic usually starts with the one that has the most contact with other grids or feels the most special shape. If you don't start from a, the algorithm is either complicated or wrong, and it is likely to be omitted or repeated in the calculation process.