McDull's favorite food is pancakes, and every time he sees a pancake stand on the street, he stops there for a few minutes. The most attractive thing about McDull is the skill of the pancake master. There are a bunch of pancakes, and the chef only needs to flip a few times with a shovel to make the pancakes neatly stacked together. On this day, in order to celebrate McDull being sent to graduate school, he bought some pancakes from the pancake master to treat him. But the pancakes McDull bought were different in size. McDull wanted to eat pancakes too much. He wanted to eat the biggest one among them. McDull also knew that his classmates also liked pancakes. In order to show his sincerity, he wanted the students to eat first and McDull last. Therefore, McDull wanted to stack the pancakes in order from small to large, with the bigger ones at the bottom. . This way McDull can get the biggest pancake at the end. Now, please help McDull to stack the pancakes McDull bought from small to large with the method of the pancake master turning the pancakes. The method of the pancake master is to insert a spatula between two pancakes, and then turn the pancake on the spatula, so that the first pancake on the spatula is turned to the top, and the pancake on the top is turned to the top that was just inserted. shovel place. McDull wants to turn the pancakes this way as little as possible.
flipping pancake problem
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=324977271&siteId=291194637
Recommended
Ranking