动态规划+背包问题参考:https://blog.csdn.net/sinat_32403451/article/details/84899820背包问题及变形:https://blog.csdn.net/qq_22526061/article/details/83504116 #coding:utf-8 n,m = map(int,input().split()) L=[] R=[] for i in range(n): li,ri = map(int,input().split()) L.append(li) R.append(ri) dp = [[0 for i...