题解 1099: 校门外的树

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

校门外的树 (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 %……

校门外的树 (C++代码)

摘要:解题思路:注意事项:参考代码:#include "iostream"#include "cstring"using namespace std;int main(){ int l,m,sum; sum……

校门外的树 (C++代码)

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string.h>using namespace std;int visited[10001];int main()……

校门外的树 (C语言代码)

摘要:参考代码:#include<stdio.h>int main(void){     int a[100][2],count=0, l, j,m;     //a[100][2]用来存储m个区域的起始位……

校门外的树 (C语言代码)

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int L, M, m, n, i, j, a[10001] = {0}, s = 0;    scanf……

校门外的树-题解(C语言代码)

摘要:思想: 使用一个大数组表示学校外树木的状态,存在写0,被占用写1,每次占用的模块,直接从数组中遍历,写1即可, 最后遍历大数组,读取其中的0个数即可 第一次错误64%: 原因:建立的状态数……

校门外的树-题解(C语言代码)

摘要:要注意题目中的说法,包含端点中的树 详解见注释 #include int main() { int L,m,i,k,b,t,j,d=0;//L是树的总数,m是区域个数,k,b用来表……

校门外的树-题解(C语言代码)

摘要://其实吧,此题可以用一个一位数组模拟树,然后此题就变得简单了,但要看请题目 //给定的条件,千万要记住不要忽视任何条件。 //记住是从0开始计数 //还有L的范围是1————10000 //……