摘要:
1.题目基本信息 1.1.题目描述 给定长度为 n 的数组 prices 和 profits (下标从 0 开始)。一个商店有 n 个商品,第 i 个商品的价格为 prices[i],利润为 profits[i]。 需要选择三个商品,满足以下条件: prices[i] < prices[j] < p 阅读全文
posted @ 2025-05-29 11:04
Geek0070
阅读(26)
评论(0)
推荐(0)
并查集模板 # # ==> 并查集模板(附优化) # author: Geek0070@blog.geek007.top class UnionFind(): def __init__(self): self.roots = {} self.setCnt = 0 # 连通分量的个数 # Union优 阅读全文