c++ solution for dna