Cody

# Problem 1630. ~~~~~~~ WAVE ~~~~~~~~~

Solution 1771490

Submitted on 3 Apr 2019
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   Fail
stone = 2; waves =[1 1; 1 2]; assert(isequal( WAVE(stone),waves))

waves = 0 0 0 1 waves = 1 1 1 2 waves = 0 0 0 0 1 1 0 1 2

Assertion failed.

2   Pass
stone = 3; waves = [1 1 1; 1 2 2; 1 2 3]; assert(isequal( WAVE(stone),waves))

waves = 0 0 0 1 waves = 1 1 1 2 waves = 2 2 2 3 waves = 1 1 1 1 2 2 1 2 3

3   Fail
stone = 4; waves = [ 1 1 1 1; 1 2 2 2; 1 2 3 3; 1 2 3 4;]; assert(isequal( WAVE(stone),waves))

waves = 0 0 0 1 waves = 1 1 1 2 waves = 2 2 2 3 waves = 3 3 3 4 waves = 2 2 2 2 3 3 2 3 4

Assertion failed.

4   Fail
stone = 6; waves = [ 1 1 1 1 1 1; 1 2 2 2 2 2; 1 2 3 3 3 3; 1 2 3 4 4 4; 1 2 3 4 5 5; 1 2 3 4 5 6]; assert(isequal( WAVE(stone),waves))

waves = 0 0 0 1 waves = 1 1 1 2 waves = 2 2 2 3 waves = 3 3 3 4 waves = 4 4 4 5 waves = 5 5 5 6 waves = 4 4 4 4 5 5 4 5 6

Assertion failed.

5   Fail
stone = 10; waves = [ 1 1 1 1 1 1 1 1 1 1; 1 2 2 2 2 2 2 2 2 2; 1 2 3 3 3 3 3 3 3 3; 1 2 3 4 4 4 4 4 4 4; 1 2 3 4 5 5 5 5 5 5; 1 2 3 4 5 6 6 6 6 6; 1 2 3 4 5 6 7 7 7 7; 1 2 3 4 5 6 7 8 8 8; 1 2 3 4 5 6 7 8 9 9; 1 2 3 4 5 6 7 8 9 10]; assert(isequal( WAVE(stone),waves))

waves = 0 0 0 1 waves = 1 1 1 2 waves = 2 2 2 3 waves = 3 3 3 4 waves = 4 4 4 5 waves = 5 5 5 6 waves = 6 6 6 7 waves = 7 7 7 8 waves = 8 8 8 9 waves = 9 9 9 10 waves = 8 8 8 8 9 9 8 9 10

Assertion failed.