循环(就是一个01背包问题,大一上学期看了好久,2023蓝桥杯的那个炼铁一样的题型) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;const int T=101,M=1001;int cost[T],value[T],dp[…… 题解列表 2023年06月24日 0 点赞 0 评论 817 浏览 评分:4.0
报数问题(本来想用递归来写的,没写出来,水平真的有限【苦涩】,链表实战也不行【哭】) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,i,a[100],ko=0,num=0; scanf("%d",&n); for(…… 题解列表 2023年06月24日 0 点赞 0 评论 406 浏览 评分:9.9
1013-Sn的公式求和 摘要:解题思路:采用高精度加法解决本题。注意事项:参考代码:int arr[1000]={0}; int main(){ int n; int i,len,j; len=0; scanf(…… 题解列表 2023年06月23日 0 点赞 0 评论 267 浏览 评分:0.0
c语言代码解决问题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n, category[3] = { 0 }; scanf("%d", &n); wh…… 题解列表 2023年06月23日 0 点赞 0 评论 393 浏览 评分:0.0
STL& set[STL训练]{A} + {B} 摘要:# 使用STL库的`set`容器 > 自带去重和排序的功能,就不需要调用排序函数了 ```c++ #include #include #include #include usi…… 题解列表 2023年06月23日 0 点赞 0 评论 366 浏览 评分:0.0
2977: 日历问题 摘要:```cpp #include #include using namespace std; int Isrun(int a) { if(a%4!=0||a%100==0&&a%400!=…… 题解列表 2023年06月23日 0 点赞 0 评论 602 浏览 评分:9.9
题目 1400: 教学楼的楼梯题解 摘要:1.解题思路第n层楼可以从第n-1层楼迈一步或从第n-2层楼迈两步,所以有f(n)=f(n-1)+f(n-2)种走法,用数组f表示,也可以用递推,但是时间超限了。2.参考代码2.1.数组法#inclu…… 题解列表 2023年06月23日 0 点赞 0 评论 612 浏览 评分:0.0
c语言代码解决问题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a[20][20], n, i, j, sum[40] = {0}, k = 0,l=0; …… 题解列表 2023年06月23日 0 点赞 0 评论 484 浏览 评分:0.0
[递归实现]利润计算 摘要:解题思路: 思路较为简单,读者简单阅读即可理解注意事项: 注意递归的结束条件参考代码:#include <stdio.h> #define N 100000 double getBonus…… 题解列表 2023年06月22日 0 点赞 0 评论 376 浏览 评分:9.9
选择排序----- 摘要:解题思路:1.定义数组2.输入数据并判断输入了的元素个数3.调用选择排序函数注意事项:元素最多输入十个参考代码:…… 题解列表 2023年06月22日 0 点赞 0 评论 419 浏览 评分:0.0