Cody

Solution 98643

Submitted on 14 Jun 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] combienatrouver = 5 backwardistrue = 0 y_correct = usedCards: [4x13 logical] flag: 0 first_part = 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 lastcol = 1 backwardistrue = 1 line2remove = 2 A = Columns 1 through 10 0 1 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 Columns 11 through 13 0 1 1 0 0 0 0 0 0 0 0 0 yy = 2 second_part = 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 y_correct = usedCards: [4x13 logical] flag: 0 y_correct = usedCards: [4x13 logical] flag: 1
2   Fail
%% 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))
Error: Assertion failed.
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] combienatrouver = 2 backwardistrue = 0 y_correct = usedCards: [4x13 logical] flag: 0 first_part = Columns 1 through 10 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 Column 11 0 0 0 0 combienatrouver = 2 lastcol = 1 backwardistrue = 1 yy = 0 second_part = 0 1 1 0 0 0 0 0 y_correct = usedCards: [4x13 logical] flag: 0 y_correct = usedCards: [4x13 logical] flag: 1
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: Assertion failed.
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] combienatrouver = 3 backwardistrue = 0 y_correct = usedCards: [4x13 logical] flag: 0