2001 ACM Programming Contest Mexico and Central America Region, BST in a matrix