cpp implementation of Count And Say