Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
board=zeros(50);
board([1,end],:)=-3;
board(:,[1,end])=-3;
board(2,2) = 1;
board(49,49)=2;
y_correct = true;
assert(isequal(onSameSide(board),y_correct))
|
2 | Pass |
%%
board=zeros(50);
board([1,end],:)=-3;
board(:,[1,end])=-3;
board(5,25) = 1;
board(46,25)=2;
board(25,2:49)=-2;
y_correct = false;
assert(isequal(onSameSide(board),y_correct))
|
3 | Pass |
%%
board=zeros(50);
board([1,end],:)=-3;
board(:,[1,end])=-3;
board(5,25) = 1;
board(46,25)=2;
board(28,2:48)=-2;
board(23,3:49)=-1;
y_correct = true;
assert(isequal(onSameSide(board),y_correct))
|
707 Solvers
Getting the absolute index from a matrix
211 Solvers
How long is the longest prime diagonal?
338 Solvers
309 Solvers
2455 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!