In the movie "Die Hard 3", Bruce Willis and Samuel L. Jackson were confronted with the following puzzle. They were given a 3-gallon jug and a 5-gallon jug and were asked to fill the 5-gallon jug with exactly 4 gallons. This problem generalizes that puz...
Suppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a street or a piece of wall.
A blockhouse is a small castle that has four openings through whi...
题目概述：Anagrams by Stack
How can anagrams result from sequences of stack operations? There are two sequences of stack operators which can convert TROT to TORT:
i i i i o o o o
i o i i o o i o
On every June 1st, the Children's Day, there will be a game named "crashing balloon" on TV. The rule is very simple.
On the ground there are 100 labeled balloons, with the numbers 1 to 100.
After the referee s...