PROGRAMMING:Realization of K-means clustering
Given a batch of data, there are two variables: sales volume and profit
![ QQ screenshot 202101011161600. PNG] (~ / ac953804-84cf-4c92-8190-d11547d3d8c2. PNG)
K-means clustering algorithm is used to cluster the samples, judge the class of company a, and output the center coordinates of the class.
###Input format:
In the first line, enter all variable values (separated by spaces), for example: 174 54 90 28 54 15 161 133 86 9 24 19 37 7 33 86;
In the second line, enter the number of samples and variables (separated by spaces), for example: 8 2.
In the third line, enter the number of clusters, for example: 3.
###Output format:
Output the final judgment result (retain two decimal places). For example, the centers of company a are 167.50 and 93.50.
###Input example:
```in
174 54 90 28 54 15 161 133 86 9 24 19 37 7 33 86
8 2
three
```
```in
174 54 90 28 54 15 161 133 86 9 24 19 37 7 33 86
8 2
four
```
```in
174 54 90 28 54 15 161 133 86 9 24 19 37 7 33 86
8 2
two
```
###Output example:
```out
The category centers of company a are 167.50 and 93.50.
```
```out
The category centers of company a are 174.00 and 54.00.
```
```out
The category centers of company a are 167.50 and 93.50.
```
answer:If there is no answer, please comment
![ QQ screenshot 202101011161600. PNG] (~ / ac953804-84cf-4c92-8190-d11547d3d8c2. PNG)
K-means clustering algorithm is used to cluster the samples, judge the class of company a, and output the center coordinates of the class.
###Input format:
In the first line, enter all variable values (separated by spaces), for example: 174 54 90 28 54 15 161 133 86 9 24 19 37 7 33 86;
In the second line, enter the number of samples and variables (separated by spaces), for example: 8 2.
In the third line, enter the number of clusters, for example: 3.
###Output format:
Output the final judgment result (retain two decimal places). For example, the centers of company a are 167.50 and 93.50.
###Input example:
```in
174 54 90 28 54 15 161 133 86 9 24 19 37 7 33 86
8 2
three
```
```in
174 54 90 28 54 15 161 133 86 9 24 19 37 7 33 86
8 2
four
```
```in
174 54 90 28 54 15 161 133 86 9 24 19 37 7 33 86
8 2
two
```
###Output example:
```out
The category centers of company a are 167.50 and 93.50.
```
```out
The category centers of company a are 174.00 and 54.00.
```
```out
The category centers of company a are 167.50 and 93.50.
```
answer:If there is no answer, please comment