Initialize dp before using it