讨论 / 求教 第5点 不出解怎么cheat
wsxtyrdd 2012-08-01 18:07:00
点我顶贴 收藏 删除
查看状态 Show Status

题目:Mato完整版学体育

状态: Unaccepted

测评机: Xeost[5]

得分: 80分

提交日期: 2012-8-1 10:58:00

有效耗时: 719毫秒

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

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

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

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

测试结果5: 运行错误|未定义错误编号|错误编号:106

提交代码: view sourceprint?01.var w,s,i,h,j,t,x,k,n,m:longint;

02.

ans:int64;

03.

g,q,d,a,b,c:array[0..200000]of longint;

04.

f:array[0..200000]of boolean;

05.procedure qsort(l,r:longint);

06.var mid,tt,ll,rr:longint;

07.begin

08.ll:=l;

09.rr:=r;

10.mid:=a[(ll+rr) div 2];

11.repeat

12.while a[ll]<mid do inc(ll);

13.while a[rr]>mid do dec(rr);

14.if rr>=ll then

15.begin

16.tt:=a[ll];a[ll]:=a[rr];a[rr]:=tt;

17.tt:=b[ll];b[ll]:=b[rr];b[rr]:=tt;

18.tt:=c[ll];c[ll]:=c[rr];c[rr]:=tt;

19.inc(ll);

20.dec(rr);

21.end;

22.until ll>rr;

23.if ll<r then qsort(ll,r);

24.if rr>l then qsort(l,rr);

25.end;

26.begin

27.read(n,m,w);

28.for i:=1 to m do

29.begin

30.read(a[i],b[i],c[i]);

31.c[m+i]:=c[i];

32.b[m+i]:=a[i];

33.a[m+i]:=b[i];

34.end;

35.m:=m*2;

36.qsort(1,m);

37.g[n+1]:=m+1;

38.for i:=1 to m do

39.if g[a[i]]=0 then g[a[i]]:=i;

40.for i:=n downto 1 do

41.if g[i]=0 then g[i]:=g[i+1];

42.s:=1;t:=1;

43.f[s]:=true;

44.q[t]:=s;

45.fillchar(d,sizeof(d),127);

46.d[s]:=0;

47.while t<>h do

48.begin

49.h:=(h mod n)+1;

50.f[q[h]]:=false;

51.x:=q[h];

52.for i:=g[x] to g[x+1]-1 do

53.begin

54.if d[x]+c[i]<d[b[i]] then

55.begin

56.d[b[i]]:=d[x]+c[i];

57.if not(f[b[i]]) then

58.begin

59.t:=(t mod n)+1;

60.q[t]:=b[i];

61.f[b[i]]:=true;

62.end;

63.end;

64.end;

65.end;

66.for i:=1 to n do

67.ans:=ans+d[i];

68.writeln(ans*2);

69.if ans*2>W then write('escape')

70.else write('run');

71.end.

牛啊 谁知道这样怎么CHEAT???????

#1 wsxtyrdd@2012-07-31 20:03:00
回复 删除
搞什么RQ...............算了 积分如粪土 不就110分吗》。。。。
#2 henry1129@2012-07-31 22:18:00
回复 删除
很简单

下面那个贴我已经发了过程了

#3 wsxtyrdd@2012-08-01 18:07:00
回复 删除
都给你了....
查看更多回复
提交回复