简单粗暴的结构体数组,结构体数组真的太好用了。简单易懂(c语言代码)
摘要:用结构体数组来存储种树区间,结构体真的太好用了,就是有点废空间
具体思路就是建立一个标志数组,数组大小就是路的长度,然后将这个数组都初始化为1。
接下来就是遍历结构体数组,将每一个区间去出来,然后……
1099: 校门外的树
摘要:解题思路:使用了列表计数器,来对用到的树进行标记注意事项:参考代码:l,m=map(int,input().strip().split())lis = [i for i in range(l+1)]f……
----------------------------------在校门口挖吖挖+++++++++++++++++++++
摘要:解题思路:无注意事项:无参考代码:#include<stdio.h>
/*
用 1 表示树,
用 0 表示是被挖走,即坑。
*/
int main()
……
1099: 校门外的树
摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int L,M; int start,end; scanf("%d %d",&L,&M); ……
1099校门外的树(数组解决)
摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int m;//马路长度 int n;//组数 cin >> m >>……
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;typedef long long ll;const ll N=1e5;//太大会爆ll a……
题解 1099: 校门外的树
摘要:解题思路:e……注意事项:注意事项:注意事项:别抄我的,抄我的人我诅咒他电脑10秒关机参考代码:#include<bits/stdc++.h>using namespace std;int i,j,k……