Solved 836.cpp -- Yay integral images