- 弱弱的战壕
- 2010-07-24 23:29:34 @
编译无问题
运行刚输入第一个数就报错
为什么啊
program P1066veryweaktrench;
var i,j,s:longint;
t:array[1..32000,1..32000] of longint;
sum:array[1..15000] of longint;
x,y:integer;
n:integer;
function search(c,d:longint):longint;
var a,b:longint;
begin
search:=0;
for a:=1 to c do
for b:=1 to d do
search:=search+t[a,b];
end;
begin
readln(n);
x:=0;
y:=0;
for i:=1 to 32000 do
for j:=1 to 32000 do
t[x,y]:=0;
for i:=1 to n do
begin
readln(x,y);
t[x,y]:=t[x,y]+1;
end;
for i:=1 to 32000 do
for j:=1 to 32000 do
begin
if t0 then
begin
s:=search(i,j)-t;
sum:=sum+t;
end;
end;
for i:=1 to n-1 do
writeln(sum[i]);
readln;
end.
0 条评论
目前还没有评论...