1099: 校门外的树 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int L,M; int start,end; scanf("%d %d",&L,&M); …… 题解列表 2024年07月17日 0 点赞 0 评论 213 浏览 评分:0.0
1099: 校门外的树 摘要:解题思路:使用了列表计数器,来对用到的树进行标记注意事项:参考代码:l,m=map(int,input().strip().split())lis = [i for i in range(l+1)]f…… 题解列表 2024年07月31日 0 点赞 0 评论 430 浏览 评分:0.0
校门外的树 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#define SIZE 10001 void cal(int start, int end, int length_tree[SIZ…… 题解列表 2024年10月09日 0 点赞 0 评论 346 浏览 评分:0.0
1099: 校门外的树 摘要:解题思路:不要重复区域就行了注意事项:参考代码:#include<stdio.h>int main(){ int m,l,i; scanf("%d",&l); int arr[l+1…… 题解列表 2024年10月25日 1 点赞 0 评论 510 浏览 评分:0.0
1099: 校门外的树 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int L,M; cin>>L>>M; …… 题解列表 2024年11月07日 1 点赞 0 评论 406 浏览 评分:0.0
编写题解 1099: 校门外的树(C语言) 摘要:解题思路:把路设为有路长+1的元素的数组,初始化为0代表有树,把后续的坐标当做数组的序号,坐标范围内的赋值1代表没树,最后统计0的数目即可。注意事项:参考代码:#include <stdio.h> …… 题解列表 2024年11月17日 0 点赞 0 评论 815 浏览 评分:0.0
很简单的笨办法 摘要:解题思路:定义数组来存L+1棵树,初始化为1。读取地铁区域数值,把数组中的地铁区域的数修改为0,这样就不用考虑区域的重合问题了。最后把数组中的数都加起来就是剩余树的值。注意事项:无参考代码:#incl…… 题解列表 2025年01月24日 4 点赞 0 评论 575 浏览 评分:0.0
2025/8/8刷题记录 摘要:解题思路:只标记不消除只有重复的部分也不会对结果有影响注意事项:参考代码:#include<stdio.h>#include<stdbool.h>int main(){&nbs…… 题解列表 2025年08月08日 0 点赞 0 评论 197 浏览 评分:0.0
c语言数组解法 摘要:参考代码:#include<stdio.h>int main(){ int L,M; int a,b; int arr[10000]={0}; int count=0; scanf(&qu…… 题解列表 2025年09月10日 2 点赞 0 评论 557 浏览 评分:0.0
通俗易懂解法 摘要:解题思路:这里要注意到500,其实一共有501棵树,总数等于a+1(L+1)参考代码:#include<iostream>#include<algorithm>…… 题解列表 2025年10月08日 1 点赞 0 评论 263 浏览 评分:0.0