Maximum Score Using Exactly K Pairs
Choose k matched index pairs that increase in both arrays, using a layered table over prefixes of the two arrays.
Choose k matched index pairs that increase in both arrays, using a layered table over prefixes of the two arrays.