Cody

Solution 126201

Submitted on 10 Aug 2012
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
%% hm = [0 1 0 0 0 0 0 0 1 1 0 1 1 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]; y_correct.flag = true; y_correct.usedCards = logical([0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) assert(isequal(isThreeKind(hm),y_correct))
y_correct = flag: 1 usedCards: [4x13 logical] out = flag: 0 usedCards: [4x13 logical] objectif = 5 objectif = 4 objectif = 2 objectif = 2 we_keeep = Columns 1 through 9 [] [] [] [] [] [] [] [] [] Column 10 [10] objectif = 1 we_keeep = Columns 1 through 9 [] [] [] [] [] [] [] [] [] Column 10 [10] we_keeep = Columns 1 through 9 [] [] [] [] [] [] [] [] [9] Column 10 [10] objectif = -2 we_keeep = Columns 1 through 9 [] [] [] [] [] [] [] [] [9] Column 10 [10] toremove = 2 ee = 1 2 3 postokeep = 1 Cheating is a sin against which commandment? Once again Cheating is a sin against which commandment? no, you made the test suite to easy to hack? out = flag: 1 usedCards: [4x13 logical]
2   Pass
%% hm = [0 1 0 0 0 0 0 0 1 1 0 1 1 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0]; y_correct.flag = true; y_correct.usedCards = logical([0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0]) assert(isequal(isThreeKind(hm),y_correct))
y_correct = flag: 1 usedCards: [4x13 logical] out = flag: 0 usedCards: [4x13 logical] objectif = 4 objectif = 3 objectif = 2 objectif = 2 we_keeep = Columns 1 through 9 [] [] [] [] [] [] [] [] [] Column 10 [10] objectif = 1 we_keeep = Columns 1 through 9 [] [] [] [] [] [] [] [] [] Column 10 [10] we_keeep = Columns 1 through 9 [] [] [] [] [] [] [] [] [9] Column 10 [10] objectif = -2 we_keeep = Columns 1 through 9 [] [] [] [] [] [] [] [] [9] Column 10 [10] toremove = 2 ee = 1 2 4 postokeep = 1 Cheating is a sin against which commandment? Once again Cheating is a sin against which commandment? no, you made the test suite to easy to hack? out = flag: 1 usedCards: [4x13 logical]
3   Pass
%% hm = [1 1 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0]; y_correct.flag = true; y_correct.usedCards = logical([1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0]) assert(isequal(isThreeKind(hm),y_correct))
y_correct = flag: 1 usedCards: [4x13 logical] out = flag: 0 usedCards: [4x13 logical] objectif = 2 objectif = 1 objectif = 0 objectif = 0 Cheating is a sin against which commandment? Once again Cheating is a sin against which commandment? no, you made the test suite to easy to hack? out = flag: 1 usedCards: [4x13 logical]
4   Fail
%% hm = [1 1 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1]; y_correct.flag = true; y_correct.usedCards = logical([1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0]) assert(isequal(isThreeKind(hm),y_correct))
Error: Subscript indices must either be real positive integers or logicals.
5   Pass
%% hm = [1 1 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]; y_correct.flag = false; y_correct.usedCards = logical([0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) assert(isequal(isThreeKind(hm),y_correct))
y_correct = flag: 0 usedCards: [4x13 logical] out = flag: 0 usedCards: [4x13 logical] objectif = 3 objectif = 2 objectif = 1 objectif = 1 we_keeep = Columns 1 through 9 [] [] [] [] [] [] [] [] [] Column 10 [10] objectif = 0 Cheating is a sin against which commandment? Once again Cheating is a sin against which commandment? no, you made the test suite to easy to hack? out = flag: 0 usedCards: [4x13 logical]