uva 10908 Largest Square
Dynamic programming: precalculate the size of squares with lower right
corner of A[i][j] and use this to quickly answer the queries