菜鸡暴力解法,直接遍历出所有坐标 摘要:解题思路:遍历出需要挪树的具体坐标,再删除列表中重复的坐标,其值去减去其树的总数,就等于剩下的树注意事项:参考代码:# a表示这段路一共有多少棵树,b表示这段路一共有多少个区域a,b = map(in…… 题解列表 2024年10月20日 0 点赞 0 评论 386 浏览 评分:9.9
校门外的树 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#define SIZE 10001 void cal(int start, int end, int length_tree[SIZ…… 题解列表 2024年10月09日 0 点赞 0 评论 214 浏览 评分:0.0
对题1099:数组的使用以及数组的置零 摘要:解题思路:首先建立一个arr[10001]的空数组,在输入L之后将arr[r + 1]里面的元素置为1.至于为什么数组下标要加1,是因为给出的区间左右均是闭区间,所以数组下标的范围应该为0~r,共包括…… 题解列表 2024年09月10日 0 点赞 0 评论 322 浏览 评分:9.9
校门外的树 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int L,M; scanf("%d%d",&L,&M); int n=L+1,sum=0; //n:树量 …… 题解列表 2024年08月28日 2 点赞 0 评论 237 浏览 评分:10.0
简单粗暴的结构体数组,结构体数组真的太好用了。简单易懂(c语言代码) 摘要:用结构体数组来存储种树区间,结构体真的太好用了,就是有点废空间 具体思路就是建立一个标志数组,数组大小就是路的长度,然后将这个数组都初始化为1。 接下来就是遍历结构体数组,将每一个区间去出来,然后…… 题解列表 2024年08月16日 0 点赞 0 评论 229 浏览 评分:9.9
1099: 校门外的树 摘要:解题思路:使用了列表计数器,来对用到的树进行标记注意事项:参考代码:l,m=map(int,input().strip().split())lis = [i for i in range(l+1)]f…… 题解列表 2024年07月31日 0 点赞 0 评论 292 浏览 评分:0.0
----------------------------------在校门口挖吖挖+++++++++++++++++++++ 摘要:解题思路:无注意事项:无参考代码:#include<stdio.h> /* 用 1 表示树, 用 0 表示是被挖走,即坑。 */ int main() …… 题解列表 2024年07月29日 0 点赞 0 评论 119 浏览 评分:9.9
1099: 校门外的树 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int L,M; int start,end; scanf("%d %d",&L,&M); …… 题解列表 2024年07月17日 0 点赞 0 评论 143 浏览 评分:0.0
1099校门外的树(数组解决) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int m;//马路长度 int n;//组数 cin >> m >>…… 题解列表 2024年05月31日 0 点赞 0 评论 225 浏览 评分:0.0
1099: 校门外的树 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>typedef long long ll;const int N=1e7;using namespace std;int …… 题解列表 2024年05月04日 1 点赞 0 评论 215 浏览 评分:10.0