how to write the program code in java/c language?

The input begins with the integer t, the number of test cases. Then t test cases follow.
The first line of each test case contains two integers n m, denoting the number of vertices of the polygon forming the fence, and the number of sheep in the whole herd (3<=n<=100000, 0<=m<=100000). The next n lines contain two integers each, the i-th being xi yi - the x and y coordinates of the i-th vertex of the fence (given in anti-clockwise order, -32000<=xi,yi<=32000). The next m lines contain two integers each, the j-th being xj yj - the x and y coordinates of the j-th sheep (arranged in decreasing order of seniority, -32000<=xj,yj<=32000). The shepherd’s observation point is within the pen and has coordinates (0,0).

@srinivasgoud you can look at a variety of answer in the practice section.