讨论 / 哇咔咔,冒泡就过了,哈哈哈哈...
wysb3252 2012-10-23 23:02:00
点我顶贴 收藏 删除
题目:飞翔

状态: Accepted

测评机: Xeond[6]

得分: 100分 [我要评价一下题目~]

提交日期: 2012-10-24 13:53:00

有效耗时: 1765毫秒

RQNOJ近期在线比赛列表

RQNOJ2012年十月月赛 时间:2012-10-27 18:30:00 [报名]

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

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

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

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

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

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

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

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

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

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

提交代码:

view sourceprint?

01.

var x,y,opt:array[1..1000]of longint;

02.

n,m,max,i,j,k,xx,yy:longint;

03.

begin

04.

readln(n,m);

05.

readln(k);

06.

for i:=1 to k do

07.

begin

08.

readln(x[i],y[i]);

09.

opt[i]:=1;

10.

end;

11.

for i:=1 to k-1 do

12.

for j:=i+1 to k do

13.

if(x[i]>x[j])or((x[i]=x[j])and(y[i]>y[j]))then

14.

begin

15.

xx:=x[i];x[i]:=x[j];x[j]:=xx;

16.

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

17.

end;

18.

for i:=2 to k do

19.

for j:=1 to i-1 do

20.

if(opt[j]+1>opt[i])and(x[j]<x[i])and(y[j]<y[i])then opt[i]:=opt[j]+1;

21.

max:=0;

22.

for i:=1 to k do if max<opt[i] then max:=opt[i];

23.

writeln(round((max*sqrt(2)+n+m-max*2)*100));

24.

end.

#1 wysb3252@2012-10-23 23:02:00
回复 删除
超级短的!!

怎样?

查看更多回复
提交回复