You are given a two-dimensional integer array items of length k.
Each item items[i] = [profit_i, category_i] indicates that the item at index i has a profit of profit_i and belongs to category category_i.
Define the elegance of a chosen subsequence of items as:
You are given a two-dimensional integer array items of length k.
Each item items[i] = [profit_i, category_i] indicates that the item at index i has a profit of profit_i and belongs to category category_i.
Define the elegance of a chosen subsequence of items as: