ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1001. Reverse Root

Plz check what is wrong ?
Posted by Abhishek 19 Oct 2008 00:01
#include<string>
#include<iostream>
#include<math.h>
#include<iomanip>
using namespace std;
int main()
  {
    long double inp[128*1024];
    int i=0;
    while (cin>>inp[i])
        {
        i++;
        }
        i--;
        while ( i >= 0)
        {
        cout<<setprecision(4)<<fixed<<sqrt(inp[i])<<endl;
        i--;
        }
   return 0;
  }

PS - for 876652098643267843 the range of long double is exceeded
Re: Plz check what is wrong ?
Posted by figael 21 Oct 2008 12:40
long double inp[128*1024];
run out of Memory!:-)Maybe u can try another way to store the data.