Cody

# Problem 1074. Property dispute!

Solution 1553821

Submitted on 8 Jun 2018
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   Fail
a = [0 0 5 10]; b = [3 2 6 6]; c = [3 2 2 6]; assert(isequal(disputed_region(a,b),c))

[Warning: Polyshape has duplicate vertices, intersections, or other inconsistencies that may produce inaccurate or unexpected results. Input data has been modified to create a well-defined polyshape.] [> In polyshape/checkAndSimplify (line 421) In polyshape (line 155) In disputed_region (line 2) In ScoringEngineTestPoint1 (line 4) In solutionTest (line 3)] [Warning: Polyshape has duplicate vertices, intersections, or other inconsistencies that may produce inaccurate or unexpected results. Input data has been modified to create a well-defined polyshape.] [> In polyshape/checkAndSimplify (line 421) In polyshape (line 155) In disputed_region (line 2) In ScoringEngineTestPoint1 (line 4) In solutionTest (line 3)] ans = 3.6667 2.6667 3.0000 4.0000 3.0000 6.0000 3.6667 7.3333 5.0000 6.0000 5.0000 4.0000

Assertion failed.

2   Fail
a = [0 1 2 3]; b = [-1 2 4 5]; c = [0 2 2 2]; assert(isequal(disputed_region(a,b),c))

[Warning: Polyshape has duplicate vertices, intersections, or other inconsistencies that may produce inaccurate or unexpected results. Input data has been modified to create a well-defined polyshape.] [> In polyshape/checkAndSimplify (line 421) In polyshape (line 155) In disputed_region (line 2) In ScoringEngineTestPoint2 (line 4) In solutionTest (line 5)] [Warning: Polyshape has duplicate vertices, intersections, or other inconsistencies that may produce inaccurate or unexpected results. Input data has been modified to create a well-defined polyshape.] [> In polyshape/checkAndSimplify (line 421) In polyshape (line 155) In disputed_region (line 2) In ScoringEngineTestPoint2 (line 4) In solutionTest (line 5)] ans = 0 4.0000 0.2727 3.5909 0 3.2500 NaN NaN 2.0000 4.0000 2.0000 3.2500 1.7273 3.5909

Assertion failed.

3   Fail
a = [3 4 6 1]; b = [2 1 2 2]; c = []; assert(isequal(disputed_region(a,b),c))

[Warning: Polyshape has duplicate vertices, intersections, or other inconsistencies that may produce inaccurate or unexpected results. Input data has been modified to create a well-defined polyshape.] [> In polyshape/checkAndSimplify (line 421) In polyshape (line 155) In disputed_region (line 2) In ScoringEngineTestPoint3 (line 4) In solutionTest (line 7)] [Warning: Polyshape has duplicate vertices, intersections, or other inconsistencies that may produce inaccurate or unexpected results. Input data has been modified to create a well-defined polyshape.] [> In polyshape/checkAndSimplify (line 421) In polyshape (line 155) In disputed_region (line 2) In ScoringEngineTestPoint3 (line 4) In solutionTest (line 7)] ans = 0×2 empty double matrix

Assertion failed.

4   Fail
a = [5 18 14 6]; b = [11 23 17 18]; c = [11 23 8 1]; assert(isequal(disputed_region(a,b),c))

[Warning: Polyshape has duplicate vertices, intersections, or other inconsistencies that may produce inaccurate or unexpected results. Input data has been modified to create a well-defined polyshape.] [> In polyshape/checkAndSimplify (line 421) In polyshape (line 155) In disputed_region (line 2) In ScoringEngineTestPoint4 (line 4) In solutionTest (line 9)] [Warning: Polyshape has duplicate vertices, intersections, or other inconsistencies that may produce inaccurate or unexpected results. Input data has been modified to create a well-defined polyshape.] [> In polyshape/checkAndSimplify (line 421) In polyshape (line 155) In disputed_region (line 2) In ScoringEngineTestPoint4 (line 4) In solutionTest (line 9)] ans = 0×2 empty double matrix

Assertion failed.

5   Fail
a = [100 97 3 2]; b = [99 93 12 12]; c = [100 97 3 2]; assert(isequal(disputed_region(a,b),c))

[Warning: Polyshape has duplicate vertices, intersections, or other inconsistencies that may produce inaccurate or unexpected results. Input data has been modified to create a well-defined polyshape.] [> In polyshape/checkAndSimplify (line 421) In polyshape (line 155) In disputed_region (line 2) In ScoringEngineTestPoint5 (line 4) In solutionTest (line 11)] [Warning: Polyshape has duplicate vertices, intersections, or other inconsistencies that may produce inaccurate or unexpected results. Input data has been modified to create a well-defined polyshape.] [> In polyshape/checkAndSimplify (line 421) In polyshape (line 155) In disputed_region (line 2) In ScoringEngineTestPoint5 (line 4) In solutionTest (line 11)] ans = 100.0000 97.0000 100.0000 99.0000 101.5000 98.0000 NaN NaN 103.0000 97.0000 101.5000 98.0000 103.0000 99.0000

Assertion failed.

6   Fail
delta = 0.5; a = [0 0 5 10]+delta; b = [3 2 6 6]+delta; c = [3 2 2 6]+delta; assert(isequal(disputed_region(a,b),c))

[Warning: Polyshape has duplicate vertices, intersections, or other inconsistencies that may produce inaccurate or unexpected results. Input data has been modified to create a well-defined polyshape.] [> In polyshape/checkAndSimplify (line 421) In polyshape (line 155) In disputed_region (line 2) In ScoringEngineTestPoint6 (line 5) In solutionTest (line 13)] [Warning: Polyshape has duplicate vertices, intersections, or other inconsistencies that may produce inaccurate or unexpected results. Input data has been modified to create a well-defined polyshape.] [> In polyshape/checkAndSimplify (line 421) In polyshape (line 155) In disputed_region (line 2) In ScoringEngineTestPoint6 (line 5) In solutionTest (line 13)] ans = 4.4531 3.4531 3.5000 5.2727 3.5000 6.2273 4.4531 8.0469 6.0000 6.5000 6.0000 5.0000

Assertion failed.

7   Fail
a = [0 0 1 1]; b = [2 2 1 1]; c = []; assert(isequal(disputed_region(a,b),c))

[Warning: Polyshape has duplicate vertices, intersections, or other inconsistencies that may produce inaccurate or unexpected results. Input data has been modified to create a well-defined polyshape.] [> In polyshape/checkAndSimplify (line 421) In polyshape (line 155) In disputed_region (line 2) In ScoringEngineTestPoint7 (line 4) In solutionTest (line 15)] [Warning: Polyshape has duplicate vertices, intersections, or other inconsistencies that may produce inaccurate or unexpected results. Input data has been modified to create a well-defined polyshape.] [> In polyshape/checkAndSimplify (line 421) In polyshape (line 155) In disputed_region (line 2) In ScoringEngineTestPoint7 (line 4) In solutionTest (line 15)] ans = 0×2 empty double matrix

Assertion failed.