Distance aware dp