Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:哪里错了啊?????????????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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator