Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
list = [5 2
3 7
4 9
2 3
8 2
3 5
8 2
7 8
4 2
8 2];
y_correct = [0 0 1 1 1 1 1 1 0 1];
assert(isequal(findBestDominoeOrientation(list),y_correct))
ans =
0 0 0 0 0 0 0 0 0 0
ans =
0 0 0 0 0 0 0 0 0 1
ans =
0 0 0 0 0 0 1 0 0 1
ans =
0 0 0 0 0 0 1 1 0 1
ans =
0 0 0 0 1 1 1 0 0 1
ans =
0 0 0 0 1 1 1 1 0 1
ans =
0 0 0 1 1 1 1 1 0 1
ans =
0 0 1 0 1 1 1 0 0 1
ans =
0 0 1 0 1 1 1 1 0 1
ans =
0 0 1 1 1 1 1 1 0 1
|
2 | Pass |
%%
list = [0 8
4 8
2 0
8 0
5 7
7 2
1 6
2 6
2 7
0 2];
y_correct = [0 1 0 1 1 1 1 0 1 1];
assert(isequal(findBestDominoeOrientation(list),y_correct))
ans =
0 0 0 0 0 0 0 0 0 0
ans =
0 0 0 0 0 0 0 0 0 1
ans =
0 0 0 0 0 0 0 0 1 0
ans =
0 0 0 0 0 0 0 0 1 1
ans =
0 0 0 1 0 0 0 0 0 1
ans =
0 0 0 1 0 0 0 0 1 0
ans =
0 0 0 1 0 0 0 0 1 1
ans =
0 0 0 1 1 1 1 0 1 1
ans =
0 1 0 1 0 0 0 0 1 0
ans =
0 1 0 1 0 0 0 0 1 1
ans =
0 1 0 1 1 1 1 0 1 1
|
3 | Pass |
%%
list = [7 5
3 1
5 1
6 5
4 8
2 6
5 1
1 3
5 9
9 2
0 7
1 7];
y_correct = [0 0 1 1 1 0 0 0 0 0 0 1];
assert(isequal(findBestDominoeOrientation(list),y_correct))
ans =
0 0 0 0 0 0 0 0 0 0 0 0
ans =
0 0 0 0 0 0 0 0 0 0 0 1
ans =
0 0 0 0 0 1 0 0 0 0 0 1
ans =
0 0 0 1 1 0 0 0 0 0 0 1
ans =
0 0 1 0 0 0 0 0 0 0 0 1
ans =
0 0 1 0 0 1 0 0 0 0 0 1
ans =
0 0 1 1 1 0 0 0 0 0 0 1
|
4 | Pass |
%%
list = [0 4
0 3
8 2
2 5];
y_correct = [1 0 1 1];
assert(isequal(findBestDominoeOrientation(list),y_correct))
ans =
0 0 0 0
ans =
0 0 1 1
ans =
0 1 1 1
ans =
1 0 0 0
ans =
1 0 1 1
|
Project Euler: Problem 7, Nth prime
521 Solvers
Back to basics 20 - singleton dimensions
254 Solvers
Return elements unique to either input
550 Solvers
206 Solvers
2314 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!