Cody

Solution 2394194

Submitted on 27 May 2020 by Nikolaos Nikolaou
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
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

t = 99 96 y = 99 t = 1×0 empty double row vector t = 3 y = 3 t = 91 96 y = 91 t = Columns 1 through 30 39 75 53 57 60 46 40 56 79 89 62 65 68 42 58 67 72 64 59 84 77 96 45 76 74 82 86 41 43 44 Column 31 78 y = 39 t = 1×0 empty double row vector t = 5 y = 5 t = 75 79 89 84 77 96 76 74 82 86 78 y = 75 t = Columns 1 through 30 53 57 60 37 46 40 56 79 89 62 65 68 42 36 58 67 72 64 32 33 59 84 77 96 45 76 74 30 82 86 Columns 31 through 34 41 43 44 78 y = 53 t = 89 84 96 82 86 y = 89 t = 96 y = 96 t = Columns 1 through 30 57 60 37 46 40 56 79 62 65 68 42 36 58 67 72 64 32 33 59 84 77 45 76 74 30 82 86 41 43 44 Column 31 78 y = 57 t = 60 37 46 40 56 79 62 65 68 42 36 58 67 72 64 59 84 77 45 76 74 82 86 41 43 44 78 y = 60 t = 79 68 67 72 84 77 76 74 82 86 78 y = 79 t = 56 62 65 68 58 67 72 64 59 84 77 76 74 82 86 78 y = 56 t = 62 65 68 58 67 72 64 59 84 77 76 74 82 86 78 y = 62 t = 65 68 58 67 72 64 59 84 77 76 74 82 86 78 y = 65 t = 37 46 40 68 42 36 58 67 72 64 59 84 77 45 76 74 82 86 41 43 44 78 y = 37 t = 72 84 77 76 74 82 86 78 y = 72 t = 68 58 67 64 59 84 77 76 74 82 86 78 y = 68 t = 58 67 64 59 84 77 76 74 82 86 78 y = 58 t = 67 64 84 77 76 74 82 86 78 y = 67 t = 86 y = 86 t = 1×0 empty double row vector t = 8 y = 8 t = 84 77 76 74 82 78 y = 84 t = 1×0 empty double row vector t = 9 y = 9 t = 46 40 42 36 64 32 33 59 21 22 77 45 76 74 30 82 41 43 44 78 y = 46 t = 40 42 36 64 32 33 59 77 45 76 74 30 82 41 43 44 78 y = 40 t = 42 36 64 32 33 59 77 45 76 74 30 82 41 43 44 78 y = 42 t = 77 76 74 82 78 y = 77 t = 64 59 76 74 82 78 y = 64 t = 13 14 15 36 32 33 59 11 21 22 45 17 76 74 30 82 41 43 12 44 78 y = 13 t = 36 32 33 59 45 76 74 30 82 41 43 44 78 y = 36 t = 14 15 32 33 59 11 21 22 45 17 76 74 30 82 41 43 12 44 78 y = 14 t = 32 33 59 45 76 74 82 41 43 44 78 y = 32 t = 15 33 59 11 21 22 45 17 76 74 30 82 41 43 12 44 78 y = 15 t = 33 59 11 21 22 45 17 76 74 30 82 41 43 12 44 78 y = 33 t = 59 45 76 74 30 82 41 43 44 78 y = 59 t = 1×0 empty double row vector t = 11 y = 11 t = 76 74 82 78 y = 76 t = 21 22 45 17 74 30 82 41 43 12 44 78 y = 21 t = 74 82 78 y = 74 t = 22 45 17 30 82 41 43 44 78 y = 22 t = 1×0 empty double row vector t = 12 y = 12 t = 82 78 y = 82 t = 45 30 41 43 44 78 y = 45 t = 1×0 empty double row vector t = 17 y = 17 t = 1×0 empty double row vector t = 30 y = 30 t = 1×0 empty double row vector t = 41 y = 41 t = 43 44 78 y = 43 t = 44 78 y = 44 t = 78 y = 78