《华为机试》刷题之HJ24 合唱队一、题目二、示例三、代码四、算法说明
一、题目二、示例三、代码import bisectdef fun(N, s): temp = [s[0]] dp = [1] * N for i in range(1, N): if s[i] > temp[-1]: temp.append(s[i]) dp[i] = len(temp) else: item = bisect.bisect_left(temp,