对题1099:数组的使用以及数组的置零 摘要:解题思路:首先建立一个arr[10001]的空数组,在输入L之后将arr[r + 1]里面的元素置为1.至于为什么数组下标要加1,是因为给出的区间左右均是闭区间,所以数组下标的范围应该为0~r,共包括…… 题解列表 2024年09月10日 0 点赞 0 评论 279 浏览 评分: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 评论 204 浏览 评分:10.0
简单粗暴的结构体数组,结构体数组真的太好用了。简单易懂(c语言代码) 摘要:用结构体数组来存储种树区间,结构体真的太好用了,就是有点废空间 具体思路就是建立一个标志数组,数组大小就是路的长度,然后将这个数组都初始化为1。 接下来就是遍历结构体数组,将每一个区间去出来,然后…… 题解列表 2024年08月16日 0 点赞 0 评论 194 浏览 评分:9.9
1099: 校门外的树 摘要:解题思路:使用了列表计数器,来对用到的树进行标记注意事项:参考代码:l,m=map(int,input().strip().split())lis = [i for i in range(l+1)]f…… 题解列表 2024年07月31日 0 点赞 0 评论 258 浏览 评分:0.0
----------------------------------在校门口挖吖挖+++++++++++++++++++++ 摘要:解题思路:无注意事项:无参考代码:#include<stdio.h> /* 用 1 表示树, 用 0 表示是被挖走,即坑。 */ int main() …… 题解列表 2024年07月29日 0 点赞 0 评论 94 浏览 评分:9.9
1099: 校门外的树 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int L,M; int start,end; scanf("%d %d",&L,&M); …… 题解列表 2024年07月17日 0 点赞 0 评论 123 浏览 评分:0.0
1099校门外的树(数组解决) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int m;//马路长度 int n;//组数 cin >> m >>…… 题解列表 2024年05月31日 0 点赞 0 评论 190 浏览 评分:0.0
1099: 校门外的树 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>typedef long long ll;const int N=1e7;using namespace std;int …… 题解列表 2024年05月04日 1 点赞 0 评论 175 浏览 评分:10.0
1099: 校门外的树 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>typedef long long ll;const int N=1e7;using namespace std;int …… 题解列表 2024年04月27日 0 点赞 0 评论 168 浏览 评分:2.0
1099: 校门外的树 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;typedef long long ll;const ll N=1e5;//太大会爆ll a…… 题解列表 2024年04月22日 0 点赞 0 评论 183 浏览 评分:0.0