Broken in Javascript?


#1

This input works in C++, but in Javascript, the array is full of NaN values. I console log the elements right away and get NaN. I am pretty sure this is a bug.

6 2
1 18
18 23
15 29
4 15
2 11
5 13