Problem 2511. BLOCK x3 (Version 4)
Always in this series ( 2451, 2484, and 2478 ).
Now we are in color (1 for red and 2 for white). Your task is always to count the minimum number of movements required to align the 3 blocks in each colors (vertically or horizontally).
![](http://4.bp.blogspot.com/-iveYgRwOmLs/Udk9ZctxnUI/AAAAAAAA3Uw/Z9XNHw6f-f4/s400/pack+2+level+2-1.png)
- [0 0 0 0 0 0 0;
- 0 0 1 2 0 0 0;
- 0 0 0 0 0 0 0;
- 0 0 1 2 0 0 0;
- 0 0 1 2 0 0 0;
- 0 0 0 0 0 0 0;
- 0 0 0 0 0 0 0]
In this example you can move down the first two blocks ( in two moves ).
Note that blocks can be swapped .
In this second example :
![](http://1.bp.blogspot.com/-XJP6Mn4X9Ws/Udk9bHEKx_I/AAAAAAAA3Vo/V_Ar3oF9gYw/s400/pack+2+level+2-7.png)
- [0 0 0 0 0 0 0;
- 0 0 0 0 0 0 0;
- 0 0 1 2 0 0 0;
- 0 0 2 1 0 0 0;
- 0 0 1 2 0 0 0;
- 0 0 0 0 0 0 0;
- 0 0 0 0 0 0 0]
Here you win in only one move by swapping the two central blocks.
Good luck !
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers5
Suggested Problems
-
4672 Solvers
-
Find the maximum number of decimal places in a set of numbers
2978 Solvers
-
Rotate input square matrix 90 degrees CCW without rot90
629 Solvers
-
Create logical matrix with a specific row and column sums
311 Solvers
-
Cell Counting: How Many Draws?
2118 Solvers
More from this Author43
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!