A very helpful and useful introduction to Integral Images or Summed-Area Tables
The Integral Image
ABC 483
ICPC NA North Central and South Division