Cody

# Problem 2264. GJam 2011 Africa Qualifier C: House, maximum area rectangle

Solution 2957035

Submitted on 17 Sep 2020 by Rafael S.T. Vieira
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
nc=1; str='G'; Aexp=1; A=House(reshape(str,nc,[])'); assert(isequal(Aexp,A))

2   Pass
nc=2; str='GSSG'; Aexp=4; A=House(reshape(str,nc,[])'); assert(isequal(Aexp,A))

3   Pass
nc=2; str='GTGG'; Aexp=2; A=House(reshape(str,nc,[])'); assert(isequal(Aexp,A))

4   Pass
nc=5; str='GGTGGTGGGGGSSGTGGGGGRWTRTRTWWTWTWRR'; Aexp=9; A=House(reshape(str,nc,[])'); assert(isequal(Aexp,A))

5   Pass
nc=48; str='SSGSGSSGGGWSSSGSGGGGGGSGGSGSSGGSGGGSSSSGSSSSSSGSGSSSSGSGGSGSSSGGGGGGSGSGSGSSSSSSSSGGGGGSGGGSGSSSSGGSGSSGSGSSGSSSGSGGGSGSSSGSSGGGGSGSSSSSSGGGSGGGGGGSGSGSSSSGGGSSSGGGGGSGSSSGSGSSGSGGSSSSSSGGSSGGGSGSGGGGSSGGGGSSSSSSGGSGGSGGSGSGGSSGGGGSRGSGGSGSSSSSGSGGSSSSGSGGSSSSGSSSGSGGSSGGGGSSGSSGSSGGSGGSSGSSGSGSGGSGSGGSGGGGGGGGGSGGSGSSSSSGSSSGGGSSSGSSGSGSSGGSGSSGGSGGSGSSSGSGGGSGSSSSSGGSGGGGGGGSSGGSSSSSGGGGSGSSSGGGSSGSGSGGGGGSSSGGSGGGGSSSGGGGGSGSSSSSGGSGSSSTGGSSSSSSSSSGSGRGGSSSGSGGSSGSSGGGSSGGGGGGSGGGSGGSGGGGSGSSSGSGGSSSGGGSGSGSGGGGSSSGGGSSSGSSSGGGGGGGSGSGSSSSSGSSGGSGGSGSGGSGSSGGGSGSSGSSGSSSSGSGGGGGSGGGSGSGSSSSGGSSGGSSGGSSGGGGSSGGGGGG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