Fixed the code for problem 1

It's a good thing i revisited non-STL arrays...