This code gives runtime error.
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll maxc = 1e6+10;
ll bit[maxc];
ll n;
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
ll a[maxc] , u[maxc] , q[maxc];
//some stuff with the arrays
return 0;
}
And this works fine.
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll maxc = 1e6+10;
ll bit[maxc];
ll a[maxc] , u[maxc] , q[maxc];
ll n;
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
//some stuff with the arrays
return 0;
}
Can anyone tell me why??