lyc 2011-10-29 00:10:00
点我顶贴
收藏
删除
var
o,n,i,j,kk:longint;
x,y:extended;
cx,cy,k,b:array[0..10000] of extended;
begin
readln(n);
for i:=1 to n do
begin
readln(k[i],b[i]);
end;
o:=0;
for i:=1 to n-1 do
for j:=i+1 to n do
if (k[i]<>k[j]) then
begin
x:=(b[j]-b[i])/(k[i]-k[j]);
y:=k[i]*(b[j]-b[i])/(k[i]-k[j])+b[i];
o:=o+1;
cx[o]:=x;
cx[o]:=y;
for kk:=1 to o-1 do
if (cx[kk]=x) and (cy[kk]=y) then
begin
o:=o-1;
break;
end;
end;
if o=0 then
writeln('No Fire Point.')
else
writeln(o);
end.
#1 zhouyi@2011-10-29 00:10:00
23307
回复
删除
自己做,别看别人的,别指望别人。要是这是考试咋办?自己做,不然就没意义了,那做它干吗?看别人,指望别人有啥好处?不就是个排名吗?我排名不高,但我诚实守信!!!!