add dp problem:matrix multiplication