In this problem, you are forced to use structure to record imformation and use afterward.
You will be given several points' locations on 2D plane(x, y), and you should compute the Euclidean distance of specific two points.

(Hint: you can use sqrt() to calculate the square root)

You should implement funcion.c below and submit it. (Due to Partial judge)
#include <stdio.h>
#include <math.h>
#include "function.h"
Point * ones_vec_1(int length)
{
/// Please implement
/// 1. Malloc memory for point array
/// 2. Read values into point array
/// 3. Return the address of the first element in the array
}
float compute_distance(Point* a, int first_id, int second_id)
{
float ans;
Point first_p, second_p;
/// Please implement
/// 1. Get two point from function argument
/// 2. Compute 2D distance and return ans
return ans;
}
You should see .c and .h file below to know how the function and the whole program works
Input may have several lines.
The first line contains an integer M, indicating how many points' locations you should read.
(Notice that the first point is indexed 0, and the second point is indexed 1, and so on...)
And the next M lines , each line has two integers, indicating point's location x and y.
The next line contains an integer N, indicating the number of the pairs of chosen two points.
And the next N lines, each line contains two integers, which are two indices representing two specific points needed to be calculated for Euclidean distance.
Ouput has N lines.
Each line contains a floating number, indicating the Euclidan distance of two specific points.