Count Right Triangles Leetcode