摘要:
题目描述 max min 思路 思维本质上就是一个优化的双指针,所以这里只分析双指针。 我们可以把原数组看作由被不在[minx,maxn]范围内的数分隔的多个子数组,那么问题就转换成了如何在一个子数组中不重不漏的找出所有满足要求的字数组。 方法很简单,枚举右断点就可以了。然后,如果我们希望我们的子数 阅读全文
摘要:
题目描述 4706. 最短路程 思路 dfs代码 #include <iostream> #include <cstring> #include <algorithm> #include <vector> using namespace std; const int N = 100010, M = 阅读全文