1099: 校门外的树 摘要:解题思路:运用数组去做标记注意事项:参考代码:#include<iostream> using namespace std; int a[100000]={0}; int main() {…… 题解列表 2022年11月12日 0 点赞 0 评论 158 浏览 评分:9.9
校门外的树-题解(C++代码) 摘要:```cpp #include #include #include #include #include using namespace std; const int MAXN=1e4…… 题解列表 2020年04月05日 0 点赞 0 评论 537 浏览 评分:9.9
1099: 校门外的树 摘要:``` #include using namespace std; const int N=10010; int a[N]; int main() { int n,m; cin>>n…… 题解列表 2023年12月25日 0 点赞 0 评论 131 浏览 评分:9.9
题解 1099: 校门外的树 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;const ll N=1e5+5;int…… 题解列表 2024年04月21日 0 点赞 0 评论 138 浏览 评分:9.9
1099:校门外的树 摘要:``` #include using namespace std; const int N=10010; int a[N]; int main() { int n,m; cin>>n…… 题解列表 2023年12月25日 0 点赞 0 评论 81 浏览 评分:9.9
1099: 校门外的树 摘要:```cpp #include #include using namespace std; int main() { char L[10001]; memset(L,0,…… 题解列表 2022年09月03日 0 点赞 0 评论 199 浏览 评分:9.9
校门外的树 摘要: #include using namespace std; int main() { int L, M, x, y, num = 0; …… 题解列表 2022年10月11日 0 点赞 0 评论 145 浏览 评分:9.9
校门外的树(C++)基本语言 摘要:解题思路:可以将此题看作一个计数问题,共有L棵树,砍去M个区域中的树,还剩下多少树,所以不妨将每棵树赋值为1,砍去是赋值为0,最后累加1的数量,即可得到正解。注意事项:数组的大小要足够大;还有一个小问…… 题解列表 2021年11月22日 0 点赞 0 评论 446 浏览 评分:9.9
【c++】校门外的树 统计数组和的技巧 摘要:解题思路:发现这道题以前在lg上面写过,就把代码放过来,顺便本蒟蒻水一篇题解。其实这道题我将有树的地方赋值为1,反则为0,这样可以通过把数组相加得到树的个数,有点巧妙。注意事项:虽然但是,如果时间要求…… 题解列表 2023年06月21日 0 点赞 0 评论 230 浏览 评分:9.9
1099: 校门外的树(简单c++) 摘要:解题思路:1.#include <bits/stdc++.h> using namespace std; long long a[100000];//创造数组 int main() { …… 题解列表 2023年07月16日 0 点赞 0 评论 112 浏览 评分:9.9