首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
ryuki
2026年2月9日 11:24
校门外的树 题解:用一维数组数组,默认全有树,遍历所有的区域拔树
P1085
回复 0
|
赞 0
|
浏览 50
#include <iostream> #include <vector> using namespace std; int main() { int length, n, cnt = 0; cin >> length >> n; vector<int> flag(length+1,1); while(n--) { &nb...
曾不会
2026年2月2日 09:31
校门外的树 题解:
P1085
回复 0
|
赞 1
|
浏览 83
#include<stdio.h> int main() { int l,m; scanf("%d %d",&l,&m); int a[l+1]; for(int i=0;i<=l;i++) { a[i]=1;//表示有树 &nbs...
xsw
2026年1月31日 10:08
校门外的树 题解:
P1085
回复 0
|
赞 0
|
浏览 66
#include<iostream> using namespace std; int s[10010]; int main() { int n, m; cin >> n >> m; for (int i = 0; i <= n; i ++) s[i] = 1; while (m -- ) { int l, r; cin >> l >> r; for (int i = l; i <= r; i ++ ) s[i] = 0; } i...
无名1
2025年6月23日 17:54
校门外的树 题解:C++
P1085
回复 0
|
赞 5
|
浏览 953
#include<bits/stdc++.h> using namespace std; int main(){ int n,m,a[100][2],num[10001]={0}; cin>>n>>m; for(int i=0;i<m;i++){ cin>>a[i][0]>>a[i][1]; } for(int i=0;i<m;i++){ for(int j=a[i][0];j<=a[i][1];j++){ num[j]=1; } } int r...
josieisjose
2025年5月14日 22:17
校门外的树 题解:C语言求助
P1085
回复 0
|
赞 0
|
浏览 807
#include <stdio.h> #include <stdlib.h> int compar(const void* a,const void* b) { return ((int**)a)[0]>((int**)b)[0]; } int main() { int L,M; scanf("%d %d",&L,&M); L++; int** district=(int**)malloc(sizeof(int*)M); for(int i=0;i<M;i++) { district[i]...
sheep276
2025年3月13日 15:07
校门外的树 题解
P1085
回复 0
|
赞 1
|
浏览 1.1k
#include <bits/stdc++.h> using namespace std; int main() { int l,m; while(cin>>l>>m) { vector<int>n(l+2,0); while(m--) ...
myhy001
2019年12月31日 11:28
校门外的树
P1085
回复 0
|
赞 11
|
浏览 9.5k
#include<stdio.h> int main() { int n,m; while(scanf("%d%d",&n,&m)!=EOF) { int a[n],b[m],c[m],i,j,x=0;  ...
题目
校门外的树
题解数量
7
发布题解
在线答疑
热门题解
1
校门外的树
2
校门外的树 题解:C++
3
校门外的树 题解:
4
校门外的树 题解
5
校门外的树 题解:用一维数组数组,默认全有树,遍历所有的区域拔树
6
校门外的树 题解:C语言求助
7
校门外的树 题解: