题意
P2195 codeforces 455c,两道一样的题
给出一个由 n n n 个点, m m m 条边组成的森林,有 q q q 组询问,每次询问有以下两种情况
输入 o p 1 op 1 op1 时:给出点 x x x,输出点 x x x 所在的树的直径。 输…
## 8. Greedy
### 8.1 introduction 核心:通过局部最优达到全局最优。
### 8.2 455. Assign Cookies Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a …
删除有序数组中的重复项 II
今天的题目是力扣面试经典150题中的数组的中等难度题: 删除有序数组中的重复项 II
题目链接:https://leetcode.cn/problems/remove-duplicates-from-sorted-array-ii/description/?envTypestudy-plan-v2&envIdtop-interview-150
…