Problem 2264. GJam 2011 Africa Qualifier C: House, maximum area rectangle
This Challenge is derived from GJam 2011 Africa: Building a House. Google Code Jam 2014 Kicks Off its Qualifier round April 11. GJam Registration. The Test Suite, at the bottom, contains a full GJam file input read (fgetl, string), process, and Output example.
Determine maximum area rectangular House that can be placed on a plot given a text terrain map of G-Grass,S-Shrubs,R-Rock,W-Water, and T-Tree. The house can not be placed over Water, Trees, or Rocks. Square is a special rectangle.
Input: M, Text Array of GWRST
Output: A, maximum House area that can be placed
Example:
GGTGG A=9 TGGGG GSSGT GGGGT GWGGG RGTRT RTGWT WTWGR
Additional GJam solutions can be found at Example GJam Matlab solutions. Select Find Solutions, change Language to Matlab. There were only 50 Qualifier Matlab entrants in 2013 and a mere 2 Matlab users achieved round 2.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers19
Suggested Problems
-
Project Euler: Problem 10, Sum of Primes
1788 Solvers
-
Square Digits Number Chain Terminal Value (Inspired by Project Euler Problem 92)
222 Solvers
-
Reverse the elements of an array
1025 Solvers
-
Vector of numbers divisible by 3
147 Solvers
-
07 - Common functions and indexing 6
451 Solvers
More from this Author308
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!