add dp problem: barcode problem