Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:哪里错了啊?????????????

Posted by ACong at 2009-03-23 18:06:35 on Problem 1862
In Reply To:哪里错了啊????????????? Posted by:yanzhu at 2009-03-21 16:50:34
1.for(int y=x;y<n-1-x;y++)这里应该改成for(int y=x;y<n-2;y++)
2.s=sqrt(double(a[0])*double(a[1]));你这句放在循环体外面,所以只执行了一次
3.其实你不用判断n是否等于1的,题目已经说了至少是2个
4.自己写的冒泡排序太慢了,直接调用qsort或者sort排序函数就行了。
还得多加努力啊,幸亏我刚AC了99,一高兴才有精神来看你的代码的。。。

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator