Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
AB = [ 2 -2 ; 8 -6 ];
F{1} = [
-4 -4 4 4
-4 -0 -0 -4
];
F{2} = [
-4 -4 4 4
2 6 6 2
];
f = WayfindingPassed(AB,F);
f_correct = [2 1];
assert(isequal(f,f_correct));
|
2 | Pass |
AB = [ 8 -4 ; 8 -8 ];
F{1} = [
-6 2 2 -4 -4 8 8 -6
-6 -6 -4 -4 2 2 4 4
];
F{2} = [
-2 -2 4 4
-0 -2 -2 -0
];
f = WayfindingPassed(AB,F);
f_correct = [ 1 2 1 ];
assert(isequal(f,f_correct));
|
3 | Pass |
AB = [ -8 8 ; 8 -8 ];
F{1} = [
-2 -2 0 0
-0 2 2 -0
];
F{2} = [
2 4 4 -6 -6 -4 2 4 4 2 2 -4 -4 2
-0 -0 -6 -6 4 6 6 4 2 2 4 4 -4 -4
];
F{3} = [
-3 -3 1 0
-1 -3 -3 -1
];
F{4} = [
5 9 9 5
-3 -3 -9 -9
];
F{5} = [
-9 -10 -10 -9
9 9 10 10
];
f = WayfindingPassed(AB,F);
f_correct = [ 2 1 2 4 ];
assert(isequal(f,f_correct));
AB = [ 0 0 ; -8 8 ];
F{1} = [
-4 -2 -2 -4
8 8 4 4
];
F{2} = [
2 4 4 2
-0 -0 -6 -6
];
F{3} = [
-4 -2 -2 -6 -6
-4 -4 -6 -6 -4
];
f = WayfindingPassed(AB,F);
assert(isempty(f));
|
4 | Pass |
AB = [ 7 -8 ; 0 0 ];
F{1} = [
8 9 9 8
3 3 -2 -2
];
F{2} = [
-9 -7 -7 -4 -4 -3 -3 0 0 1 1 4 4 5 5 -2 -8 -9
-2 -2 2 2 -2 -2 2 2 -2 -2 2 2 -2 -2 3 4 3 2
];
F{3} = [
-2 -1 -1 -2
1 1 -4 -4
];
F{4} = [
-6 -5 -5 -3 1 2 2 3 3 1 -4 -6
1 1 -3 -5 -5 -4 1 1 -5 -8 -7 -4
];
f = WayfindingPassed(AB,F);
f_correct = [ 2 4 2 3 2 4 2 ];
assert(isequal(f,f_correct));
|
5 | Pass |
AB = [ 0 -2 ; 0 -4 ];
F{1} = [
-3 3 3 2 2 -2 -2 2 2 -3
-5 -5 3 3 -3 -3 2 2 3 3
];
F{2} = [
-1 1 1 -1
1 1 -1 -1
];
F{3} = [
-4 4 4 5 5 -5 -5 -4
4 4 -7 -7 5 5 -1 -1
];
F{4} = [
-5 -4 -4 4 4 -5
-1 -1 -6 -6 -7 -7
];
f = WayfindingPassed(AB,F);
f_correct = [ 2 1 ];
assert(isequal(f,f_correct));
|
6 | Pass |
AB = [ -2 0 ; 6 -6 ];
F{1} = [
2 -4 -4 2 2 -2 0 -2 2
-4 -4 4 4 2 2 -0 -2 -2
];
f = WayfindingPassed(AB,F);
f_correct = [ 1 1 1 ];
assert(isequal(f,f_correct));
|
246 Solvers
How many trades represent all the profit?
520 Solvers
73 Solvers
2455 Solvers
52 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!