为什么??

编译通过...

├ 测试数据 01:运行时错误...| 错误号: 216 | 存取非法

├ 测试数据 02:运行时错误...| 错误号: 216 | 存取非法

├ 测试数据 03:运行时错误...| 错误号: 216 | 存取非法

├ 测试数据 04:运行时错误...| 错误号: 216 | 存取非法

├ 测试数据 05:运行时错误...|错误号: -1073741819

├ 测试数据 06:运行时错误...|错误号: -1073741819

├ 测试数据 07:运行时错误...|错误号: -1073741819

├ 测试数据 08:运行时错误...| 错误号: 216 | 存取非法

├ 测试数据 09:运行时错误...| 错误号: 216 | 存取非法

├ 测试数据 10:运行时错误...| 错误号: 216 | 存取非法

---|---|---|---|---|---|---|---|-

Unaccepted 有效得分:0 有效耗时:0ms

每次都是存取非法。

程序如下:

program fds;

var

n,i,j,k:longint;

s,x,min:real;

a:array[0..100000,0..100000] of real;

mc:array[1..100000] of real;

cl:array[1..100000] of longint;

begin

read(s);

read(n);

for i:=1 to n do

for j:=1 to n do

a:=maxlongint;

while not eof do

begin

read(j,k);

readln(x);

a[j,k]:=x; a[k,j]:=x;

end;

for i:=1 to n do

begin

mc[i]:=a[1,i];

cl[i]:=1;

end;

for i:=2 to n do

begin

min:=100000000;

for j:=2 to n do

if (mc[j]0) and (mc[j]a[j,k]) then

begin

mc[j]:=a[j,k];

cl[j]:=k;

end;

end;

x:=0;

for i:=2 to n do

x:=x+a;

if x>s then

writeln('Impossible')

else writeln('Need ',x:0:2,' miles of cable');

end.

2 条评论

  • @ 2022-01-29 19:09:09

    考古,我当年可还是哇哇哭的出生一年都不到的婴儿

  • @ 2009-05-30 13:53:54

    大牛帮忙

    wo我的都是这样的

    测试数据 01:运行时错误...|错误号: -1073741571

    ├ 测试数据 02:运行时错误...|错误号: -1073741571

    ├ 测试数据 03:运行时错误...|错误号: -1073741571

    什么意思???

  • 1

信息

ID
1045
难度
7
分类
树结构 点击显示
标签
(无)
递交数
4932
已通过
1000
通过率
20%
被复制
10
上传者