比赛 “Asm.Def战记之拉格朗日点”杯 评测结果 WWWWWWWWWW
题目名称 Asm.Def找燃料 最终得分 0
用户昵称 typhon 运行时间 0.009 s
代码语言 Pascal 内存使用 0.17 MiB
提交时间 2015-11-04 11:10:48
显示代码纯文本
var x,y,m:array[1..100] of longint;
k:array[1..100] of double;
i,j,n,ans,tot:longint;
begin
assign(input,'asm_fuel.in');
reset(input);
assign(output,'asm_fuel.out');
rewrite(output);
 readln(n);
 for i:=1 to n do
  begin
   readln(x[i],y[i]);
   if x[i]=0 then
    begin
     if y[i]=0 then
     k[i]:=-100000
     else
     k[i]:=100000;
    end
    else
    k[i]:=y[i]/x[i];
  end;
 for i:=1 to n do
  if k[i]<>-100000 then
   for j:=1 to n do
    if k[i]=k[j] then m[i]:=m[i]+1;
 for i:=1 to n do
  if m[i]>ans then ans:=m[i];
 for i:=1 to n do
  if k[i]=-100000 then ans:=ans+1;
 for i:=1 to n do
 begin
  tot:=0;
  for j:=1 to n do
   if (i<>j)and(x[i]=x[j]) then tot:=tot+1;
   if tot>ans then ans:=tot;
 end;
 tot:=0;
  for i:=1 to n do
 begin
  tot:=0;
  for j:=1 to n do
   if (i<>j)and(y[i]=y[j]) then tot:=tot+1;
   if tot>ans then ans:=tot;
 end;
 writeln(ans);
close(input);
close(output);
end.