Add cpp files for this repo

Add heads and tails.cpp without comment on it.