Finished Matrix Region Sum brute force