Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
hm = [0 0 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 0
0 0 0 0 0 0 0 0 1 0 0 1 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(isFullHouse(hm),y_correct))
y_correct =
struct with fields:
flag: 1
usedCards: [4×13 logical]
a =
9
b =
12
ans =
1
ans =
2
ans =
3
i =
6
ans =
1
ans =
2
i =
6
|
2 | Pass |
hm = [0 0 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 1 0 0 0 0];
y_correct.flag = true;
y_correct.usedCards = logical([0 0 0 0 0 0 0 0 1 0 0 1 0
0 0 0 0 0 0 0 0 1 0 0 1 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(isFullHouse(hm),y_correct))
y_correct =
struct with fields:
flag: 1
usedCards: [4×13 logical]
a =
9
b =
12
ans =
1
ans =
2
ans =
3
i =
6
ans =
1
ans =
2
i =
6
|
3 | Pass |
hm = [0 0 0 0 1 0 0 0 1 1 0 1 1
0 1 0 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 1 0 0 0 0 0 0 0 0];
y_correct.flag = true;
y_correct.usedCards = logical([0 0 0 0 1 0 0 0 0 0 0 1 0
0 0 0 0 1 0 0 0 0 0 0 1 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])
assert(isequal(isFullHouse(hm),y_correct))
y_correct =
struct with fields:
flag: 1
usedCards: [4×13 logical]
a =
5
b =
9
b =
12
ans =
1
ans =
2
ans =
2
ans =
3
i =
6
ans =
1
ans =
2
i =
6
|
4 | Pass |
hm = [0 0 0 0 1 0 0 0 1 1 0 1 1
1 1 0 0 1 0 0 0 0 0 0 0 0
1 0 0 1 1 0 0 0 0 0 0 0 0
1 1 0 0 1 0 0 0 0 0 0 0 0];
y_correct.flag = true;
y_correct.usedCards = logical([0 0 0 0 1 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 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0 0 0])
assert(isequal(isFullHouse(hm),y_correct))
y_correct =
struct with fields:
flag: 1
usedCards: [4×13 logical]
a =
5
b =
2
b =
5
ans =
0
ans =
1
ans =
2
ans =
3
i =
6
ans =
1
ans =
2
i =
6
|
5 | Pass |
hm = [0 0 0 0 0 0 0 0 1 1 0 1 1
0 1 0 0 0 0 0 0 1 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 1 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(isFullHouse(hm),y_correct))
y_correct =
struct with fields:
flag: 0
usedCards: [4×13 logical]
a =
9
|
6 | Pass |
hm = [0 0 0 0 0 0 0 0 1 1 0 1 1
1 1 0 0 0 1 0 0 0 0 0 1 0
0 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];
y_correct.flag = true;
y_correct.usedCards = logical([0 0 0 0 0 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 1 0 0 0 0 0 0 0
1 0 0 0 0 1 0 0 0 0 0 0 0])
assert(isequal(isFullHouse(hm),y_correct))
y_correct =
struct with fields:
flag: 1
usedCards: [4×13 logical]
a =
6
b =
9
b =
12
ans =
0
ans =
1
ans =
2
ans =
3
i =
6
ans =
0
ans =
1
ans =
1
ans =
2
i =
6
|
Find the two most distant points
1235 Solvers
134 Solvers
263 Solvers
47 Solvers
Check if number exists in vector
2313 Solvers