校门外的树 (C语言代码) 用一个数组储存常数 摘要:解题思路:冥思苦想不知道怎么把几个输入合并,没办法就用了笨笨的方法,合并法之后再想一下注意事项:标记进数组千万不要else 再标记,我刚掉了坑参考代码:#include<stdio.h>int mai…… 题解列表 2017年12月20日 0 点赞 0 评论 1147 浏览 评分:7.3
校门外的树 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int L,M,i,a,b,s[10001],count=0; scanf("%d %d",&L,&M); fo…… 题解列表 2017年12月16日 1 点赞 0 评论 1116 浏览 评分:0.0
校门外的树 (C语言代码) 摘要:解题思路:设一个长度为L+1的数组,将每个元素赋值为1,将要毁掉的区域(对应数组的区域)赋值为0,然后统计还剩下几个1即可注意事项:参考代码:#include <stdlib.h>#include <…… 题解列表 2017年12月15日 0 点赞 0 评论 1248 浏览 评分:0.0
校门外的树 (C语言代码) 摘要:解题思路:定义数组表示树,初始化为0,若被挖去,则赋值为1,最后统计数组中1的个数。注意事项:参考代码:#include<stdio.h>int main(){ int *a; int l…… 题解列表 2017年11月30日 0 点赞 0 评论 713 浏览 评分:0.0
优质题解 Manchester- 校门外的树 摘要:解题思路:定义一个数组;数组下标代表数轴上的每个整数点即0,1,2,……,n(长度为500的公路有501颗树);把这个数组初始化全为1(为1代表有树,0代表被移除);输入移除区域(x,y),把这个区域…… 题解列表 2017年11月29日 26 点赞 18 评论 3550 浏览 评分:9.1
校门外的树 (C语言代码) 摘要:解题思路:我们只需要用数组模拟一下即可。参考代码:#include <stdio.h> #include <string.h> int main() { int l, m; …… 题解列表 2017年11月25日 1 点赞 0 评论 792 浏览 评分:0.0
校门外的树 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int L,M; cin>>L>>M; int qishi[100],…… 题解列表 2017年10月05日 0 点赞 0 评论 912 浏览 评分:0.0
校门外的树 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { … 题解列表 2017年09月22日 3 点赞 0 评论 1260 浏览 评分:0.0
校门外的树 (C语言代码) 摘要:解题思路:删去所以车段的交集,每个车段需要“砍树”为:(末-起+1),原本可以植树总共为 :(l+1),结果是:(总-砍)注意事项:参考代码:#include<stdio.h>#define M 10…… 题解列表 2017年08月17日 3 点赞 0 评论 1367 浏览 评分:0.0
校门外的树 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include "stdio.h"int main(int argc, char* argv[]){ int a[100][2],b[10000],L,M,i,j,k,…… 题解列表 2017年08月14日 0 点赞 1 评论 1083 浏览 评分:0.0