|
|
вернуться в форумWrong answer 3 Help pls: ) Послано Tom 4 авг 2011 00:20 what s test 3 ? #include <iostream> #include <cmath> #include <iomanip> using namespace std; int main(){
long double x; int i=0; long double tab[32768];
cout << setprecision(4) << fixed; cin >> x; while(!cin.eof()){ tab[i]=sqrt(x); i+=1; cin >> x; } for(int k=0;k<i;k++){ cout << tab[i-1-k] << endl; } getchar();getchar(); } Re: Wrong answer 3 Help pls: ) Don't use "cout" or "cin",because they're not fast. Re: Wrong answer 3 Help pls: ) Послано hatred 4 авг 2011 16:20 may be array tab is too small Re: Wrong answer 3 Help pls: ) Послано Tom 5 авг 2011 14:21 WA is not about speed mate, besides my guess is they r fast enough here: ) thx anyway, will remember it WA is not about array size either. is would be memory crash than or smh like that thx again any other suggestions ? Edited by author 05.08.2011 14:24 Edited by author 05.08.2011 14:24 |
|
|