Right Triangles

Authentic source cited by revision 3: Codeforces 52B "Right Triangles" (https://codeforces.com/problemset/problem/52/B).

You are given an n x m field consisting only of '.' and '*'. Count all right triangles whose vertices are centers of '*' cells and whose two legs are parallel to the grid sides. For each '*' cell, it can be the right-angle vertex with any other '*' in the same row and any other '*' in the same column, contributing (rowStars - 1) * (colStars - 1) triangles. Sum over all '*' cells.

Repository source-association / ABI blocker (central): this slug has repository id 100699 and read-only fixtures currently use an incompatible legacy ABI (arg1: number[3] -> 0/1) that does not match CF52B grid I/O. This revision restores CF52B as the authentic source contract named by rev3 and removes guessed 3-side/threshold contracts; it does not claim the legacy fixtures are CF52B fixtures. Central must verify slug/id association and migrate schema/fixtures/transport separately. Do not install guessed contracts to match legacy fixtures.

Examples
Input: [1,2,3]
Output: 0
Hints
Related Problems

Right Triangles

Authentic source cited by revision 3: Codeforces 52B "Right Triangles" (https://codeforces.com/problemset/problem/52/B).