Star Map
From Codeforces. Geometry. Solve the geometry problem "Star Map".
Examples
Input: [1,2,3]
Output: 0
Input: [2,3,4]
Output: 0
Hints
Cross constellation: central star at (i,j) with stars at (i-r,j), (i+r,j), (i,j-r), (i,j+r) — all 5 inside grid and all cells must contain '*'. Radius r ≥ 1; central star itself must be '*'.
Brute force: for each cell as potential center, try r = 1..min(i-1,n-i,j-1,m-j). Check 4 arm cells. n,m ≤ 300, worst-case O(n*m*min(n,m)) ≈ 27M — fine in 2s.
Order: radius asc → center row asc → center col asc. Generate list, sort, pick k-th (1-indexed). If fewer than k crosses, output -1.
Star Map
**From Codeforces.** Geometry. Solve the geometry problem "Star Map".