2D int bool (A [i] [j] == 1, ijth , 0 ), 2D- .
:
// get your polygons, each represented by a 2D array as described above
// create a "bounding" array B that can contain all polygons (watch out for
// sparsely spaced polygons in which case B could be large)
// populate B s.t. B[i][j] == 1 if ijth slot is contained in
// the union of all polygons
// count all slots in B where B[i][j] == 1 (this will be the "common" area)
: . B. - (, , ). , ... , , "" - .