Test Instructions:
The half-circle radar coverage with the center of the radar core can be rotated by multiple point radars, and the idea of the maximum coverage number (including the boundary) is obtained :
Calculates the difference between the geometry of the test center and the distance to point. In order to solve this problem, we only use the highlight distance formula to remove the must not hit, and then use the difference product
(P1,P2) m>0 P1 in the clockwise direction of the P2
(P1,P2) m<0 P1 in the counterclockwise direction of the P2
(P1,P2) m=0 P1 and P2 the same line
Relative point formula: m= (x1-x0) * (y2-y0)-(x2-x0) * (Y1-Y0) There is no need to subtract the program from the origin.
const maxn=3000; var x,y:array[0..maxn] of Real;
Max,p,q,s,sum,i,j:longint;
R,m,xi,yi:real;
Procedure main;
var i,j:longint;
Begin for I:=1 to sum do begin p:=0;q:=0;s:=0;
For j:=1 to sum do begin m:= (X[I]-XI) * (Y[j]-yi)-(X[J]-XI) * (Y[i]-yi);
If M=0 then Inc (s);
If M>0 then Inc (P);
If M<0 then Inc (Q);
End
If S+p>max then max:=s+p;
If S+q>max then max:=s+q;
End
End
Begin READLN (XI,YI,R);
While not (EOF (input)) does begin max:=0;
sum:=0;
Readln (j);
For I:=1 to J do begin READLN (P,Q);
If sqrt (Sqr (p-xi) +SQR (q-yi)) <=r THEN BEGIN Inc (SUM);
X[sum]:=p;
y[sum]:=q;
End
End
Main
Writeln (max);
READLN (XI,YI,R);
End End.