Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
for i=1:randi(1000)
vec = randperm(100);
end
vec = randperm(100);
a = vec(1:50); % given to bot
b = vec(51:100); % given to player
you = 0;
bot = 0;
for i = 1:50
c = call(a(1),b);
if ~ismember(c,b)
while(1)
end
end
if c>a(1)
you = you + 1;
else
bot = bot + 1;
end
b(b==c)=[];
a(1)=[];
end
if you<floor(50*0.75)
while(1)
disp('not enough wins');
end
end
|
Determine whether a vector is monotonically increasing
11914 Solvers
Read a column of numbers and interpolate missing data
1235 Solvers
831 Solvers
Find the sum of the elements in the "second" diagonal
994 Solvers
Return the first and last character of a string
3447 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!