HackerRank Bit Array in C++ problem solution - TheCScience