题解 1099: 校门外的树

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

筛选

题解 1099: 校门外的树

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;const ll N=1e5+5;int……

题解 1099: 校门外的树

摘要:解题思路:e……注意事项:注意事项:注意事项:别抄我的,抄我的人我诅咒他电脑10秒关机参考代码:#include<bits/stdc++.h>using namespace std;int i,j,k……

1099: 校门外的树

摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;typedef long long ll;const ll N=1e5;//太大会爆ll a……

1099: 校门外的树

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>typedef long long ll;const int N=1e7;using namespace std;int ……

1099: 校门外的树

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>typedef long long ll;const int N=1e7;using namespace std;int ……

1099校门外的树(数组解决)

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int m;//马路长度 int n;//组数 cin >> m >>……

1099: 校门外的树

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int L,M;    int start,end;    scanf("%d %d",&L,&M);  ……

1099: 校门外的树

解题思路:使用了列表计数器,来对用到的树进行标记注意事项:参考代码:l,m=map(int,input().strip().split())lis=[iforiinrange(l+1)]foriinrange(m):a,b=map(int,input().strip().split())foriinr

简单粗暴的结构体数组,结构体数组真的太好用了。简单易懂(c语言代码)

用结构体数组来存储种树区间,结构体真的太好用了,就是有点废空间具体思路就是建立一个标志数组,数组大小就是路的长度,然后将这个数组都初始化为1。接下来就是遍历结构体数组,将每一个区间去出来,然后将对应的标志数组置为0,之后统计标志数组中1的数量就行。