Row array and column array to store the lengths of differences between consecutive rows / columns
List < int > conrow = new List < int > ( ) ; List < int > concol = new List < int > ( ) ; int K = ( int ) Math . Sqrt ( Z ) ;