校门外的树 (C++代码) 简单的dp 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int dp[10000];int main(){ int n,c; cin>>n>…… 题解列表 2018年09月21日 0 点赞 0 评论 599 浏览 评分:0.0
校门外的树 (C++代码)用数组的方式解决 摘要:解题思路:先定义一个一维数组,将其全部赋值为1,数组模拟出马路中有多少课树(1为有树),然后每修建铁路的时候需要铲除掉的树设置为0,注意两端问题,这里的循环要用i<=结束,来表示。不多说直接上代码参考…… 题解列表 2018年11月06日 0 点赞 0 评论 830 浏览 评分:0.0
校门外的树 (C语言代码) 摘要:解题思路:将区域分段解决改为字符标记,输入地铁区域,将其标记,可重复标记,这样就不必考虑区域重复注意事项:将区域分段解决改为字符标记参考代码:#include<stdio.h>int main(){ …… 题解列表 2018年11月27日 0 点赞 0 评论 490 浏览 评分:0.0
校门外的树 (C语言代码) 摘要:解题思路:很简单,有树的为1,没有树的地方为0,废话不多说,看代码!!!注意事项:参考代码:#include <stdio.h>int main() { int M, N, i, j; i…… 题解列表 2019年01月01日 1 点赞 0 评论 599 浏览 评分:0.0
校门外的树 (C语言代码) 摘要:解题思路:设置一组坐标 长为L 内部L+1课树 设置为1在输入首尾坐标 将坐标内的数目标记为0 最后统计 1 的标记数目注意事项:难度不大 ,注意该设置为0 的一些数据定义好就行了参考代码:#inc…… 题解列表 2019年03月04日 1 点赞 0 评论 656 浏览 评分:0.0
校门外的树 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int a[10001];int main(){int n,i=0,j=0,m=0,sum=0,p=0,q=0;scanf("%d %…… 题解列表 2019年03月07日 0 点赞 0 评论 400 浏览 评分:0.0
校门外的树 (C++代码) 摘要:解题思路:注意事项:参考代码:#include "iostream"#include "cstring"using namespace std;int main(){ int l,m,sum; sum…… 题解列表 2019年03月15日 0 点赞 0 评论 573 浏览 评分:0.0
校门外的树 (C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string.h>using namespace std;int visited[10001];int main()…… 题解列表 2019年03月23日 0 点赞 0 评论 658 浏览 评分:0.0
番2 校门外的树 (运用信号值来避免重复区域)(C语言代码) 摘要:解题思路: 建立一个数组来保存数轴上的树的状态,另一个二维数组来保存每次输入的区域,在输入输入的区域的同时,改变信号值的状态,最终遍历数组来统计所有的未改变的值的个数.注意事项: …… 题解列表 2019年04月03日 0 点赞 0 评论 864 浏览 评分:0.0
校门外的树 (C语言代码) 摘要:参考代码:#include<stdio.h>int main(void){ int a[100][2],count=0, l, j,m; //a[100][2]用来存储m个区域的起始位…… 题解列表 2019年05月02日 1 点赞 0 评论 1384 浏览 评分:0.0