Cody

Solution 1610815

Submitted on 16 Aug 2018 by Vivek Singh
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

ans = 35 ans = 29 ans = 32 ans = 65 ans = 36 ans = 39 ans = 95 ans = 53 ans = 72 ans = 45 ans = 69 ans = 47 ans = 23 ans = 86 ans = 48 ans = 13 ans = 98 ans = 24 ans = 92 ans = 54 ans = 25 ans = 96 ans = 14 ans = 74 ans = 70 ans = 37 ans = 75 ans = 5 ans = 49 ans = 50 ans = 100 ans = 56 ans = 57 ans = 18 ans = 76 ans = 79 ans = 77 ans = 3 ans = 15 ans = 58 ans = 60 ans = 61 ans = 80 ans = 81 ans = 83