topic:
1828. Statistics the number of a circle mid -point
Thought:
Today’s question is very simple,I wonder if it is against yesterday’s question bidding。
Askqueries
There are a few in the circlepoints
Points in an array。
To be honest, I was scared,I think this question is the question of the picture again。不过仔细读题了后发现只是一道简单的math题,
We can use European -style distance to solve(Time complexity isOn^2,I thought I had a better solution,At first glance everyone is like this())
The formula of the European -style distance is as follows:
$\sqrt{(x_1 - x_2)^2 + (y_1 - y_2)^2}$
We look at the code for specific operations:
Code
1 | class Solution: |
Take a look at someone who can’t understandpythonCode:
1 | class Solution: |