797f专题

CF 797F Mice and Holes(单调队列优化dp)

F. Mice and Holes 先给老鼠和洞排序,然后dp解之dp[i][j]表示前i个洞进了j个老鼠的最小cost,很容易想到 O(n∗n∗m)