Cody

Solution 345881

Submitted on 6 Nov 2013 by Alfonso Nieto-Castanon
  • Size: 51
  • This is the leading solution.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
%Block Still 1 m=[0 0 0 0;0 1 1 0;0 1 1 0;0 0 0 0]; n=Life_Period(m); assert(n==1)
2   Pass
%% %Beehive Still 1 m=[0 0 0 0 0 0;0 0 1 1 0 0;0 1 0 0 1 0;0 0 1 1 0 0;0 0 0 0 0 0]; n=Life_Period(m); assert(n==1)
3   Pass
%% %Loaf Still 1 m=[0 0 0 0 0 0;0 0 1 1 0 0;0 1 0 0 1 0;0 0 1 0 1 0;0 0 0 1 0 0;0 0 0 0 0 0]; n=Life_Period(m); assert(n==1)
4   Pass
%% %Boat Still 1 m=[0 0 0 0 0;0 1 1 0 0;0 1 0 1 0;0 0 1 0 0;0 0 0 0 0]; n=Life_Period(m); assert(n==1)
5   Pass
%% %Table Still 1 m=[0 0 0 0 0 0 0;0 1 1 0 1 1 0;0 0 1 0 1 0 0;0 0 1 0 1 0 0;0 1 1 0 1 1 0;0 0 0 0 0 0 0]; n=Life_Period(m); assert(n==1)
6   Pass
%% %Blinker Osc 2 m=[0 0 0 0 0;0 0 0 0 0;0 1 1 1 0;0 0 0 0 0;0 0 0 0 0]; n=Life_Period(m); assert(n==2)
7   Pass
%% %Toad Osc 2 m=[0 0 0 0 0 0;0 0 0 0 0 0;0 0 1 1 1 0;0 1 1 1 0 0;0 0 0 0 0 0;0 0 0 0 0 0]; n=Life_Period(m); assert(n==2)
8   Pass
%% %Beacon Osc 2 m=[0 0 0 0 0 0;0 1 1 0 0 0;0 1 1 0 0 0;0 0 0 1 1 0;0 0 0 1 1 0;0 0 0 0 0 0]; n=Life_Period(m); assert(n==2)
9   Pass
%% %Caterer Osc 3 m=[0 0 0 0 0 0 0 0 0 0;0 0 0 1 0 0 0 0 0 0;0 1 0 0 0 1 1 1 1 0;0 1 0 0 0 1 0 0 0 0;0 1 0 0 0 0 0 0 0 0;0 0 0 0 1 0 0 0 0 0;0 0 1 1 0 0 0 0 0 0;0 0 0 0 0 0 0 0 0 0;]; n=Life_Period(m); assert(n==3)