Sorting 2x10^5 entries
This is my submission to the problem 557B.
The only computation intensive thing I do is sort an array which can have atmost 10^5 entries. This is supposed to take < 1s. But I get TLE error if the array size is 10^5. Why does this happen?
int a[n]; for (int i = 0; i < 2*n; i++) { cin >> a[i]; }
Looks like you have problems with array size :)
Oh! That was a foolish mistake
Why does the use of a wrongly-sized array cause TLE and not runtime error?
It once happened to me as well. 7833244
the right question is "why not?" in cases with UB like this.
Looks like you have problems with array size :)
Oh! That was a foolish mistake
Why does the use of a wrongly-sized array cause TLE and not runtime error?
It once happened to me as well. 7833244
the right question is "why not?" in cases with UB like this.