Description: In modern day magic shows, passing through walls is very popular in which a magician performer passes through several walls in a predesigned stage show. The wall-passer (Pass-Muraille) has a limited wall-passing energy to pass through at most k walls in each wall-passing show. The walls are placed on a grid-like area. An example is shown in Figure 1, where the land is viewed from above. All the walls have unit widths, but different lengths. You may assume that no grid cell belongs to two or more walls. A spectator chooses a column of the grid. Our wall-passer starts from the upper side of the grid and walks along the entire column, passing through every wall in his way to get to the lower side of the grid. If he faces more than k walls when he tries to walk along a column, he would fail presenting a good show. For example, in the wall configuration shown in Figure 1, a wall-passer with k = 3 can pass from the upper side to the lower side choosing any column except column 6.
To Search:
File list (Check if you may need any files):
pass-muraille\Debug\pass-muraille.exe
.............\.....\pass-muraille.ilk
.............\.....\pass-muraille.pdb
.............\pass-muraille\Debug\BuildLog.htm
.............\.............\.....\mt.dep
.............\.............\.....\pass-muraille.exe.embed.manifest
.............\.............\.....\pass-muraille.exe.embed.manifest.res
.............\.............\.....\pass-muraille.exe.intermediate.manifest
.............\.............\.....\pass-muraille.obj
.............\.............\.....\vc90.idb
.............\.............\.....\vc90.pdb
.............\.............\pass-muraille.cpp
.............\.............\pass-muraille.vcproj
.............\.............\pass-muraille.vcproj.PC-20111006IXRQ.Administrator.user
.............\pass-muraille.ncb
.............\pass-muraille.sln
.............\pass-muraille.suo
.............\.............\Debug
.............\Debug
.............\pass-muraille
pass-muraille