Cody

Solution 1318997

Submitted on 29 Oct 2017 by Shawn Mengel
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
assessFunctionAbsence({'regexp','regexpi','regexprep','str2num','assert'},'FileName','fivesteps.m') assert(isempty(regexp(fileread('fivesteps.m'),'assert')));

freepass granted, CONGRATULATIONS!

2   Fail
% X,Y X<Y between 2 and 100 [x,y]=find(triu(ones(100),1)); z=[x y]; valid=all(z>1,2); assert(fivesteps(z(valid,:))==true);

freepass granted, CONGRATULATIONS!

exit

3   Fail
% X,Y X<Y between 2 and 60 [x,y]=find(triu(ones(60),1)); z=[x y]; valid=all(z>1,2); assert(fivesteps(z(valid,:))==false);

freepass granted, CONGRATULATIONS!

exit

4   Fail
% X,Y X<Y between 2 and 1680 [x,y]=find(triu(ones(1680),1)); z=[x y]; valid=all(z>1,2); assert(fivesteps(z(valid,:))==true);

freepass granted, CONGRATULATIONS!

exit

5   Fail
% X,Y X<Y between 2 and 1700 [x,y]=find(triu(ones(1700),1)); z=[x y]; valid=all(z>1,2); assert(fivesteps(z(valid,:))==false);

freepass granted, CONGRATULATIONS!

exit

6   Fail
% X,Y X<Y between 1 and 20 [x,y]=find(triu(ones(20),1)); z=[x y]; valid=all(z>=1,2); assert(fivesteps(z(valid,:))==false);

freepass granted, CONGRATULATIONS!

exit

7   Fail
% X,Y X<Y between 1 and 30 [x,y]=find(triu(ones(30),1)); z=[x y]; valid=all(z>=1,2); assert(fivesteps(z(valid,:))==true);

freepass granted, CONGRATULATIONS!

exit

8   Fail
% X,Y X<Y between 1 and 40 [x,y]=find(triu(ones(40),1)); z=[x y]; valid=all(z>=1,2); assert(fivesteps(z(valid,:))==false);

freepass granted, CONGRATULATIONS!

exit

9   Fail
% X,Y X<Y between 3 and 5000 [x,y]=find(triu(ones(3000),1)); z=[x y]; valid=all(z>=3,2); assert(fivesteps(z(valid,:))==true);

freepass granted, CONGRATULATIONS!

exit

10   Fail
% X,Y X<Y between 3 and 100 [x,y]=find(triu(ones(100),1)); z=[x y]; valid=all(z>=3,2); assert(fivesteps(z(valid,:))==false);

freepass granted, CONGRATULATIONS!

exit

11   Fail
% X,Y X<Y even between 2 and 40 [x,y]=meshgrid(2:2:40); z=[x(:) y(:)]; valid=y>x; assert(fivesteps(z(valid,:))==false);

freepass granted, CONGRATULATIONS!

exit

12   Fail
% X,Y X<Y odd between 1 and 1000 [x,y]=meshgrid(1:2:1000); z=[x(:) y(:)]; valid=y>x; assert(fivesteps(z(valid,:))==true);

freepass granted, CONGRATULATIONS!

exit

13   Fail
% X,Y X<Y non-primes between 1 and 50 [x,y]=meshgrid(setdiff(1:50,primes(50))); z=[x(:) y(:)]; valid=y>x; assert(fivesteps(z(valid,:))==true);

freepass granted, CONGRATULATIONS!

exit

14   Fail
% X,Y X<Y primes between 1 and 50 [x,y]=meshgrid(primes(50)); z=[x(:) y(:)]; valid=y>x; assert(fivesteps(z(valid,:))==false);

freepass granted, CONGRATULATIONS!

exit

15   Fail
% X,Y X<Y random subset [x,y]=meshgrid([3 5 12 18 20 28 30]); z=[x(:) y(:)]; valid=y>x; assert(fivesteps(z(valid,:))==true);

freepass granted, CONGRATULATIONS!

exit

16   Fail
% X,Y X<Y random subset [x,y]=meshgrid([3 5 12 15 28 30]); z=[x(:) y(:)]; valid=y>x; assert(fivesteps(z(valid,:))==false);

freepass granted, CONGRATULATIONS!

exit

17   Fail
% X,Y X<Y random subset [x,y]=meshgrid([2 4 6 8 12 16 18]); z=[x(:) y(:)]; valid=y>x; assert(fivesteps(z(valid,:))==false);

freepass granted, CONGRATULATIONS!

exit

18   Fail
% X,Y X<Y random subset [x,y]=meshgrid([4 6 8 12 16 18]); z=[x(:) y(:)]; valid=y>x; assert(fivesteps(z(valid,:))==true);

freepass granted, CONGRATULATIONS!

exit

19   Fail
% X,Y X<Y random subset [x,y]=meshgrid([2 3 10 14 15 20 21]); z=[x(:) y(:)]; valid=y>x; assert(fivesteps(z(valid,:))==true);

freepass granted, CONGRATULATIONS!

exit

20   Fail
% X,Y X<Y random subset [x,y]=meshgrid([2 3 5 8 10 14 15 20 21]); z=[x(:) y(:)]; valid=y>x; assert(fivesteps(z(valid,:))==false);

freepass granted, CONGRATULATIONS!

exit