A solution in C++ to the BIO 2008 problem "Shirts"