| ||||||||||
| 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:hmilyxuy at 2008-05-30 22:15:33 > #include<iostream>
> #include<math.h>
> using namespace std;
> const int MAX=100;
> int main()
> {
> int N;
> float a[MAX]; //用float是因为int编译器会说sqrt函数有二义性导致编译错误
> cin>>N;
> for(int i=0;i<N;i++)
> cin>>a[i];
>
> for(int j=0;j<N;j++)
> {
> cout<<int(sqrt(a[j]))<<endl;
> }
> return 0;
> }
超时?RE吧?测试数据量不一定是小于100
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator