Problem E
Block Crusher
You are responsible for testing the compressive strength of various composite materials. You take a rectangular block, crush it from the sides and see where it beaks. This is hard work, and it’s dirty, so you decide to write a simulator to get yourself some help.
![\includegraphics[width=0.35\textwidth ]{block1.png}](/problems/blockcrusher/file/statement/en/img-0001.png)
![\includegraphics[width=0.35\textwidth ]{block2.png}](/problems/blockcrusher/file/statement/en/img-0002.png)
Computationally, you model a block as being composed of a
grid square regions of materials of various strengths. You
model the strength of a square as an integer between
Input
Input consists of up to
Output
For each block, print a copy of the block with the digits along its fracture line replaced by spaces. There will only be one fracture line that has the minimum strength. Print a blank line after each block.
Sample Input 1 | Sample Output 1 |
---|---|
3 7 2281431 2329463 7183839 7 6 517135 935519 731353 375951 575195 579573 359739 0 0 |
228 431 23 9463 7 83839 517 35 9355 9 73135 37595 57519 57957 3597 9 |