题解 1099: 校门外的树 摘要: #include using namespace std; int a[100000],c,b,sum,d,e,f; int main(){ cin…… 题解列表 2023年12月01日 0 点赞 0 评论 182 浏览 评分:0.0
校门外的树(c++) 摘要:解题思路:树是连续的可以用数组来存储,根据区间来遍历,更改数组状态。注意事项:用来存储树的数组需要比极限略微大一点的空间,否则会有段错误。参考代码:#include<bits/stdc++.h> #…… 题解列表 2023年12月10日 0 点赞 0 评论 128 浏览 评分: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 评论 126 浏览 评分:0.0
校门外的树 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdlib.h>void sortTwoArray(int* pArrayA,int*pArrayB,int tot…… 题解列表 2023年12月17日 0 点赞 0 评论 99 浏览 评分:0.0
编写题解 1099: 校门外的树(简单版) 摘要:解题思路:利用布尔数组注意事项:参考代码:package arrLast; //题目 1099: 校门外的树 import java.util.Scanner; public class t_1…… 题解列表 2024年01月31日 0 点赞 0 评论 149 浏览 评分:0.0
校门外的树 摘要:解题思路:把马路的长当作数组长,在数组中全录入1,代表栽了树;在后续输入的数据中,两两为一组,在上一个数组中把一组的值变为0即可,则不需要考虑重复区域的问题,最后计算1的数量即可注意事项:参考代码:#…… 题解列表 2024年03月09日 0 点赞 0 评论 107 浏览 评分:0.0
借助数组实现变化,注意下标 摘要:解题思路:注意事项:参考代码:#include<stdio.h>void main(){ const int l; int m,i,to,wei; int sum=0; scanf("%d",&l);…… 题解列表 2024年03月11日 0 点赞 0 评论 158 浏览 评分:0.0
1099: 校门外的树 摘要:参考代码:L, M = map(int, input().split()) arr = ['t' for _ in range(L + 1)] for _ in range(M):…… 题解列表 2024年03月20日 0 点赞 0 评论 148 浏览 评分:0.0
题解 1099: 校门外的树 摘要:解题思路:注意事项:参考代码:L, M = map(int, input().split()) trees = [1 for x in range(L+1)] for x in range(M):…… 题解列表 2024年03月23日 0 点赞 0 评论 164 浏览 评分:0.0
题解 1099: 校门外的树 摘要:解题思路:注意事项:参考代码:l,m=map(int,input().split())x=[]for i in range(0,m): a,b=map(int,input().split()) …… 题解列表 2024年03月26日 0 点赞 0 评论 171 浏览 评分:0.0