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

Why crash?
Posted by Newton 20 Dec 2008 18:01
#include <cstdio>
#include <cmath>

#define MAX 100

int main(){
    long double a[MAX];
    int i;
    for(i = 0; scanf("%Lf",&a[i]) == 1; i++);
    for(i = i-1; i >= 0; i--){
        printf("%.4Lf\n",sqrtl(a[i]));
    }
    return 0;
}
Re: Why crash?
Posted by partisan 24 Feb 2009 19:18
Because number of elements can be larger than 100 (the size of input is up to 256KB)