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 Access Violation?(C++)
Posted by John smith 23 Mar 2011 08:38
#include <iostream>
#include <math.h>
#include <iomanip>
using namespace std;

typedef double dataType;
const int max_length = 300000;

dataType array[max_length];

int main()
{
    __int64 input;
    int i = -1;

    while(scanf("%I64d",&input))
        array[++i] = sqrt((double)input);

    cout << fixed << setprecision(4);//Set Output's format

    for(i--;i>=0;i--)
        cout<<array[i]<<endl;

    return 0;
}

/*
This program can run in my own computer,but when I submit I got the Error Message -- Access Violation.
Who can tell me why?
*/

Edited by author 23.03.2011 08:42