I was testing my code against some 10001 values, but it did not print any output value.
I found out it was not even printing out anything even when I am merely taking inputs using cin and printing using cout when the value is large(some thousands).
When I ran the same thing in www.ideone.com it worked, but in my own machine it is not printing anything.
The program is:
int main() {
    int N, x;
    cin >> N;
    int ar[N];
    for (int i = 0; i < N; ++i) {
        cin >> x;
        ar[i] = x;
    }
    for (int i = 0; i < N; ++i) {
        cout << ar[i] << " ";
    }
    cout << endl;
}
and the sample input can be downloaded in http://ideone.com/S3EneQ using copy.
I am using Ubuntu 14.04 and g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2 (2013).
 
    