• + 0 comments

    This problem is unfair. The problem description explicitly says to add the value to all the specified array indices, and the example re-enforces this. While the solution is clever, it does not derive from the problem description.

    Although the program framework does not require the final array -- which could be a bit of a hint -- it seems like the written description went out of its way to be misleading.