Some dp questions

dp and 3sum