【c++】校门外的树 统计数组和的技巧 摘要:解题思路:发现这道题以前在lg上面写过,就把代码放过来,顺便本蒟蒻水一篇题解。其实这道题我将有树的地方赋值为1,反则为0,这样可以通过把数组相加得到树的个数,有点巧妙。注意事项:虽然但是,如果时间要求…… 题解列表 2023年06月21日 0 点赞 0 评论 314 浏览 评分:9.9
(java)小白的思路,简明易懂 摘要:解题思路:把路上的所有存在的树当做一个全为1的数组,若挖去,1改为0,最终统计1的个数(还有一个思路是把每个要挖的数数量计算,最后用总数减去,但是计算答案得分总是27,不知道问题在哪)注意事项:L长的…… 题解列表 2023年05月10日 0 点赞 0 评论 334 浏览 评分:9.9
校门外的数 摘要:```cpp #include #include using namespace std; int main() { int n,m; cin>>n>>m; int c[1000…… 题解列表 2023年05月01日 0 点赞 0 评论 204 浏览 评分:0.0
校门外的树java 摘要:解题思路:与前面开关灯同样的思想来解这道题注意事项:参考代码:public class Main { public static void main(String[] args) { …… 题解列表 2023年04月18日 0 点赞 0 评论 363 浏览 评分:9.9
校门外的树(C++简单代码) 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ long long L,M,sum=0,a[1000…… 题解列表 2023年03月16日 1 点赞 0 评论 210 浏览 评分:0.0
编写题解 1099: 校门外的树 摘要: #include #include #include #include #include #include using namesp…… 题解列表 2023年03月05日 0 点赞 0 评论 168 浏览 评分:0.0
1099: 校门外的树 摘要:解题思路:注意事项:参考代码:L,M=map(int,input().split(" "))T=[1 for i in range(L+1)]for i in range(M): x=input(…… 题解列表 2023年01月05日 1 点赞 0 评论 242 浏览 评分:7.3
每一次都认真分享自己的想法!1099: 校门外的树 摘要:##1099: 校门外的树 ####我们先分析一下题目  ####具体我想的…… 题解列表 2022年12月27日 0 点赞 0 评论 316 浏览 评分:9.9
编写题解 1099: 校门外的树 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int M,L; int a[100]={0}; int b[…… 题解列表 2022年12月21日 0 点赞 0 评论 175 浏览 评分:0.0
c语言:校门外的数 摘要:参考代码:#include<stdio.h>int main(){ int l,n,z,i,j=0; scanf("%d",&l); scanf("%d",&n); int a[l+1],x[n],y…… 题解列表 2022年12月14日 0 点赞 0 评论 239 浏览 评分:0.0