标签:array 分享 ssi read alt 技术分享 begin color bubuko
题面:
思路:
模拟,几种情况依次判断
代码:
var i,j,n,ans,x1,x2,y1,y2:longint; x,y,r:array[1..100] of longint; f1,f2:array[1..100] of boolean; begin assign(input,‘circle.in‘); reset(input); assign(output,‘circle.out‘); rewrite(output); read(n); for i:=1 to n do read(x[i]); for i:=1 to n do read(y[i]); for i:=1 to n do read(r[i]); readln(x1,y1,x2,y2); for i:=1 to n do begin if sqr(x[i]-x1)+sqr(y[i]-y1)<sqr(r[i]) then f1[i]:=true; if sqr(x[i]-x2)+sqr(y[i]-y2)<sqr(r[i]) then f2[i]:=true; end; for i:=1 to n do if f1[i]<>f2[i] then inc(ans); write(ans); close(input);close(output); end.
标签:array 分享 ssi read alt 技术分享 begin color bubuko
原文地址:https://www.cnblogs.com/godrose/p/9742140.html