难以理解的错误

编译无问题

运行刚输入第一个数就报错

为什么啊

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 条评论

目前还没有评论...

信息

ID
1066
难度
4
分类
数据结构 | 树状数组数据结构 | 线段树 点击显示
标签
(无)
递交数
4662
已通过
2017
通过率
43%
被复制
9
上传者