Another CUDA implementations of a DP problem