校门外的树(c++) 摘要:解题思路:树是连续的可以用数组来存储,根据区间来遍历,更改数组状态。注意事项:用来存储树的数组需要比极限略微大一点的空间,否则会有段错误。参考代码:#include<bits/stdc++.h> #…… 题解列表 2023年12月10日 0 点赞 0 评论 132 浏览 评分:0.0
[递归]母牛的故事(c++) 摘要:解题思路:题目告诉递归,那就找规律:1,2,3,4,6,9明显看出f(n)=f(n-1)+f(n-3);(n>4)注意事项:找对规律对递归很重要。参考代码:#include<bits/stdc++.h…… 题解列表 2023年12月10日 0 点赞 0 评论 173 浏览 评分:0.0
分数求和(python) 摘要:解题思路:注意事项:参考代码:'''Python标准库中的fractions模块是用于处理有理数(Rational Numbers)的一个强大的工具。有理数是可以表示为两个整数…… 题解列表 2023年12月10日 0 点赞 0 评论 223 浏览 评分:0.0
数的计数(python) 摘要:解题思路:注意事项:参考代码:def count_numbers(n): # 创建一个长度为 n+1 的数组,用于存储中间结果 dp = [0] * (n + 1) # 初始化基本情…… 题解列表 2023年12月10日 0 点赞 0 评论 301 浏览 评分:0.0
题解 2780: 奇偶数判断 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a; cin>>a; if(a!=0) …… 题解列表 2023年12月10日 0 点赞 0 评论 134 浏览 评分:0.0
题解 2782: 整数大小比较 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a,b; cin>>a>>b; if(a>b…… 题解列表 2023年12月10日 0 点赞 0 评论 188 浏览 评分:0.0
蛇行矩阵清楚明了 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int a[111][111];int main(){ int n,sum=1,sum1,sum2=0; scanf("…… 题解列表 2023年12月10日 0 点赞 0 评论 175 浏览 评分:0.0
DNA 清楚明了 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,m,t; scanf("%d",&t); while(t--){ …… 题解列表 2023年12月10日 0 点赞 0 评论 163 浏览 评分:0.0
分享查找字符串内字符类型代码 摘要:解题思路:发现这道题简单,但是写起来麻烦,分享给大家帮助大家快速通过。注意事项:若有看不懂的地方,及时评论哦!参考代码:#include<stdio.h>int main(){ char tex…… 题解列表 2023年12月10日 0 点赞 0 评论 174 浏览 评分:0.0
二级c语言-求等差数列前n项和 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,n,sum=0,a; scanf("%d",&n); for(i=1;i<=n;i++) { a…… 题解列表 2023年12月10日 0 点赞 0 评论 102 浏览 评分:0.0