- -智商低的第一次来的孩子伤不起- -求大神指导

var

r,s,n,i,j,k:longint;
sr,m:array [1..11] of longint;
py:array [1..11] of longint;
a,man:array [1..11] of string;
name:array [1..5,1..5] of string;
{f:text;}
begin
fillchar(sr,sizeof(sr),0);
fillchar(m,sizeof(m),0);
fillchar(py,sizeof(py),0);
{ assign(f,'f:\ai.in');}
{reset(f);}
readln({f,}n);
r:=1;
for i:=1 to n do readln({f,}a[i]);
for i:=1 to n do
begin
readln({f,}man[i]);
read({f,}m[i]);
readln({f,}py[i]);
for j:=1 to py[i] do
begin
readln({f,}name[r,j]);

end;
inc(r);
end;

for r:=1 to n do
for k:=1 to n do
for j:=1 to n do

begin
while m[r]<>0 do
if name[r,k]=man[j] then
begin
sr[r]:=sr[r]-(m[r] div py[r]);
sr[j]:=sr[j]+(m[r] div py[r]);
break;
end
else
begin
break;
end;

end;

for i:= 1 to n do

writeln(man[i],' ',sr[i]);
end;
end;
end.

为什么会这样- - 过不去是为啥

测试数据 #0: Accepted, time = 0 ms, mem = 836 KiB, score = 10
测试数据 #1: Accepted, time = 0 ms, mem = 836 KiB, score = 10
测试数据 #2: Accepted, time = 0 ms, mem = 836 KiB, score = 10
测试数据 #3: WrongAnswer, time = 15 ms, mem = 836 KiB, score = 0
测试数据 #4: Accepted, time = 0 ms, mem = 832 KiB, score = 10
测试数据 #5: Accepted, time = 0 ms, mem = 836 KiB, score = 10
测试数据 #6: WrongAnswer, time = 0 ms, mem = 836 KiB, score = 0
测试数据 #7: WrongAnswer, time = 0 ms, mem = 836 KiB, score = 0
测试数据 #8: WrongAnswer, time = 0 ms, mem = 832 KiB, score = 0
测试数据 #9: WrongAnswer, time = 0 ms, mem = 836 KiB, score = 0

2 条评论

  • @ 2013-11-22 17:20:40

    前面说错了,零头是处理了的,问题出在name:array [1..5,1..5] of string; --->name:array [1..10,1..10] of string;

  • @ 2013-11-22 14:47:12

    平分后剩余的零头没有处理。

  • 1

信息

ID
1035
难度
2
分类
模拟 点击显示
标签
(无)
递交数
5222
已通过
2901
通过率
56%
被复制
19
上传者