← 返回 amazon 的题目列表Find Matrix Centers with Local Maximum in Defined Squares
类型:online_judge
amazon
Given a matrix, find all the locations of the values that meet the following condition: Each value, called the center value, must ensure that in a square matrix of size value * 2 + 1 centered around it, all positions except the four corners do not have a number greater than itself. Output the coordinates of all eligible center values.
Example
Input
[[3, 1, 4], [1, 5, 9], [2, 6, 5]]