Cody

# Problem 1074. Property dispute!

Solution 195524

Submitted on 23 Jan 2013 by Aurelien Queffurust
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
%% a = [0 0 5 10]; b = [3 2 6 6]; c = [3 2 2 6]; assert(isequal(disputed_region(a,b),c))

C = 3 C = 3 2 C = 3 2 2 C = 3 2 2 6

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

C = 0 C = 0 2 C = 0 2 2 C = 0 2 2 2

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

C = []

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

C = 11 C = 11 23 C = 11 23 8 C = 11 23 8 1

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

C = 100 C = 100 97 C = 100 97 3 C = 100 97 3 2

6   Pass
%% 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))

C = 3.500000000000000 C = 3.500000000000000 2.500000000000000 C = 3.500000000000000 2.500000000000000 2.500000000000000 C = 3.500000000000000 2.500000000000000 2.500000000000000 6.500000000000000

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

C = []

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!