金明的预算方案(DP) 摘要:解题思路:注意事项:参考代码:#include<iostream>usingnamespacestd;constintN…… 题解列表 2024年10月23日 1 点赞 0 评论 216 浏览 评分:10.0
三角形 (三角形类动态规划模板) 摘要: #include #include using namespace std; int s[101][101]; int main(){ …… 题解列表 2024年10月24日 5 点赞 0 评论 560 浏览 评分:10.0
[编程入门]数组插入处理的一种比较简单的方法 摘要:解题思路1.找到新元素应该插入的位置。2.从该位置开始,将数组中的元素向后移动一个位置,为新元素腾出空间。3.将新元素插入到正确的位置注意事项:键盘第一次录入数组数据时for循环的次数不要搞错。遍历数…… 题解列表 2024年10月25日 1 点赞 0 评论 330 浏览 评分:10.0
母牛的故事c语言 摘要:#include <stdio.h> int fun(int n) { if(n<=3) { return n; } else { return f…… 题解列表 2024年10月25日 1 点赞 0 评论 2733 浏览 评分:10.0
利润计算c语言求解 摘要:解题思路:利用递归思想参考代码:#include <stdio.h> int func(int n); int main() { int n, result; scan…… 题解列表 2024年10月26日 13 点赞 1 评论 1569 浏览 评分:10.0
[编程入门]Sn的公式求和 摘要:解题思路:列举几个数进行观察:2=0*10+2 //易得除了第一项外,其他都是前一项*10+2。因此我们也能得出相应的关系,an=(an-1)*10+2,最后循环即可 …… 题解列表 2024年10月27日 1 点赞 0 评论 453 浏览 评分:10.0
第一个HelloWorld程序 摘要:解题思路:使用输出函数即可注意事项:Hello与World之间有一个空格以及大小写问题*也是输出的一部分,别光打印Hello World!参考代码:#include<stdio.h> int m…… 题解列表 2024年10月27日 18 点赞 0 评论 1758 浏览 评分:10.0
1038: [编程入门]宏定义练习之三角形面积 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>#define F(a,b,c) S=(a+b+c)/2#define P(a,b,c) area=sq…… 题解列表 2024年10月27日 2 点赞 0 评论 1092 浏览 评分:10.0
读懂题目就是一道简单题 摘要:解题思路:n = int(input())arr1 = [0] + list(map(int, input().split()))arr2 = [0] + list(map(int, input().…… 题解列表 2024年10月28日 7 点赞 2 评论 638 浏览 评分:10.0
1986: 鸡兔同笼(c语言) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int i, x, y, z; scanf("%d", &z); for (y = 0; y…… 题解列表 2024年10月28日 1 点赞 0 评论 358 浏览 评分:10.0