1099: 校门外的树 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int l,m,tree[10000000],s,e,sum=0;int main…… 题解列表 2023年07月19日 0 点赞 0 评论 471 浏览 评分:0.0
校门外的坤 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>int l,m,tree[10000000];using namespace std;int main(){ int…… 题解列表 2023年07月19日 0 点赞 0 评论 315 浏览 评分:0.0
利用区间合并的思想求解 摘要:解题思路: 将区间合并之后即可解决区间重合问题注意事项: 注意数据类型参考代码:#include<iostream>#include<algorithm>#include<vector>using n…… 题解列表 2023年09月23日 0 点赞 0 评论 276 浏览 评分:0.0
校门外的树(设一数组,长度为L,数组元素值全为1,表示树在,为0时树被移走了,统计元素值为1的元素数,就为剩下的树) 摘要:解题思路:把数组元0素序看作数轴,变化其上的元素,判断树是否在注意事项:参考代码:#include<stdio.h> int main() { int l,m; scanf("%d%d",…… 题解列表 2023年10月11日 0 点赞 0 评论 170 浏览 评分:0.0
题解 1099: 校门外的树 摘要: #include using namespace std; int a[100000],c,b,sum,d,e,f; int main(){ cin…… 题解列表 2023年12月01日 0 点赞 0 评论 319 浏览 评分:0.0
校门外的树(c++) 摘要:解题思路:树是连续的可以用数组来存储,根据区间来遍历,更改数组状态。注意事项:用来存储树的数组需要比极限略微大一点的空间,否则会有段错误。参考代码:#include<bits/stdc++.h> #…… 题解列表 2023年12月10日 0 点赞 0 评论 271 浏览 评分:0.0
c代码记录之校门外的树--C 摘要: #include int main() { int num[10000],i,j,n,m,k,t,sum=0; scanf("%d%d"…… 题解列表 2023年12月11日 0 点赞 0 评论 265 浏览 评分:0.0
校门外的树 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdlib.h>void sortTwoArray(int* pArrayA,int*pArrayB,int tot…… 题解列表 2023年12月17日 0 点赞 0 评论 238 浏览 评分:0.0
编写题解 1099: 校门外的树(简单版) 摘要:解题思路:利用布尔数组注意事项:参考代码:package arrLast; //题目 1099: 校门外的树 import java.util.Scanner; public class t_1…… 题解列表 2024年01月31日 0 点赞 0 评论 300 浏览 评分:0.0
校门外的树 摘要:解题思路:把马路的长当作数组长,在数组中全录入1,代表栽了树;在后续输入的数据中,两两为一组,在上一个数组中把一组的值变为0即可,则不需要考虑重复区域的问题,最后计算1的数量即可注意事项:参考代码:#…… 题解列表 2024年03月09日 0 点赞 0 评论 234 浏览 评分:0.0