讨论 / 为什么老是70分?
dashabu 2008-10-25 03:48:00
点我顶贴 收藏 删除
状态: Unaccepted

测评机: Xeond[6]

得分: 70分

提交日期: 2008-10-25 15:03:00

有效耗时: 733毫秒

测试结果1: 通过本测试点|有效耗时172:ms

测试结果2: 通过本测试点|有效耗时62:ms

测试结果3: 通过本测试点|有效耗时62:ms

测试结果4: 通过本测试点|有效耗时63:ms

测试结果5: 输出过长|用户输出数据超过标准输出两倍[标准输出39位|选手输出882位]

测试结果6: 输出过长|用户输出数据超过标准输出两倍[标准输出38位|选手输出1152位]

测试结果7: 输出过长|用户输出数据超过标准输出两倍[标准输出41位|选手输出1511位]

测试结果8: 通过本测试点|有效耗时156:ms

测试结果9: 通过本测试点|有效耗时172:ms

测试结果10: 通过本测试点|有效耗时46:ms

type dd=record

id:longint;

cj:longint;

end;

var

chi:array[1..999] of longint;

mat:array[1..999] of longint;

enl:array[1..999] of longint;

a:array[1..999] of dd;

i,j,k,x,y,z,n:longint;

Begin

readln(n);

for i:=1 to n do

begin

read(chi[i],mat[i],enl[i]);

a[i].cj:=chi[i]+mat[i]+enl[i];

a[i].id:=i;

end;

for i:=1 to n-1 do

for j:=i+1 to n do

begin

if a[i].cj<a[j].cj then

begin

x:=a[i].cj;a[i].cj:=a[j].cj;a[j].cj:=x;

k:=a[i].id;a[i].id:=a[j].id;a[j].id:=k;

end;

if a[i].cj=a[j].cj then

begin

if chi[i]<chi[j] then

begin

y:=chi[i];chi[i]:=chi[j];chi[j]:=y;

end;

if chi[i]=chi[j] then

begin

z:=a[j].id;a[j].id:=a[i].id;a[i].id:=z;

end;

end;

end;

a[i].cj:=chi[i]+mat[i]+enl[i];

for i:=1 to n do

writeln(a[i].id,’ ’,a[i].cj);

end.

#1 LIFE@2008-10-25 02:06:00
回复 删除
题目让输出1~5名,而不是1~N!
#2 DarkMaster@2008-10-25 03:48:00
回复 删除
有道理。。
查看更多回复
提交回复