HackerRank Structs in C++ problem solution - TheCScience