优质题解 简单易懂 应对多次操作的差分组解法 摘要:这道题我做过很多次了。。。 各种各样的变种,决定总结一下 首先读题,题意很清晰明了,就是把从a到b的树砍光,之后反复重复m次,每次的a,b都会变化 因此第一种朴素的想法诞生了。。。 …… 题解列表 2021年04月13日 0 点赞 4 评论 758 浏览 评分:7.2
优质题解 校门外的树---模拟 摘要:解题思路: 用数组模拟坐标轴上的整数坐标,也代表可以种树的地方。 例如:char L[11] ==> 1 1 1 1 1 1 1 1 1 1 …… 题解列表 2020年11月10日 0 点赞 1 评论 2767 浏览 评分:9.7
校门外的树-题解(C++代码) 摘要:```cpp #include using namespace std; int main() { int L,M; int a,b; int num[10002]; …… 题解列表 2020年04月19日 0 点赞 0 评论 622 浏览 评分:6.5
校门外的树-题解(C++代码) 摘要:```cpp #include #include #include #include #include using namespace std; const int MAXN=1e4…… 题解列表 2020年04月05日 0 点赞 0 评论 537 浏览 评分:9.9
校门外的树 (C++详细代码)思路清晰,容易懂; 摘要:###[1099:校门外的树](https://www.dotcpp.com/oj/problem1099.html "1099:校门外的树") ####题目描述 某校大门外长度为L的马路上有一排…… 题解列表 2020年03月26日 0 点赞 0 评论 2163 浏览 评分:8.9
校门外的树 (C++代码)------两种解法,复杂点的“并查集”和简单的“数组标记” 摘要: 对于这道题有鄙人这里陈述两种解法****** 第一种复杂,第二种简单,没学过并查集的同学可以看第二种。 第一种是“并查集”,这种解法有点复杂,“并查集的思想”是把相互…… 题解列表 2020年02月20日 0 点赞 1 评论 373 浏览 评分:6.0
校门外的树 (C++代码)我的第一次题解 摘要:#### 树是0到L,所以树的数量是:L+1 #### 先建立一个“树”数组,全部赋值成1表示有树 #### 然后再输入M的区域的时候循环,从开始点到结束的赋值成0 #### 最后循环判断“数”…… 题解列表 2019年12月29日 0 点赞 0 评论 434 浏览 评分:8.7
校门外的树-题解(C++代码) 比较高效的做法 摘要:使用map实现有序插入和遍历起点-终点。 参考代码: ```cpp #include #include #include using namespace std; int mai…… 题解列表 2019年10月16日 0 点赞 0 评论 545 浏览 评分:9.0
校门外的树-题解(C++代码) by Zfans. 摘要:```cpp #include using namespace std; struct tree { int start, end; }; int main() { …… 题解列表 2019年10月15日 0 点赞 0 评论 446 浏览 评分:9.3
校门外的树-题解(C++代码) 题虽水,但题解不能水(线段树+懒人标记) 摘要:```cpp #include "iostream" #include "cstdio" #include "cstdlib" #include "cstring" #include "cm…… 题解列表 2019年08月15日 0 点赞 0 评论 851 浏览 评分:8.7