两次01背包-砝码称重 ```cpp#include#defineintlonglongusingnamespacestd;constintN=100010;intdp[N],a[105];signedmain(){intn;cin>>n;for(inti=1;i>a[i];}memset(dp, 题解列表 2022年02月18日 0 点赞 0 评论 1209 浏览 评分:9.6
1021: [编程入门]迭代法求平方根 解题思路:首先要输入一个值,这道题是运用迭代法来进行计算,有3个未知数,x(n+1),x(n),a可以自己用m,n来表示不断变化的x(n+1),x(n)这是迭代需要用到循环,可以先计算一次,再运用while循环判断之后就是输出注意事项:1.输出是需要保留3位小数, 题解列表 2022年02月18日 0 点赞 0 评论 554 浏览 评分:0.0
1593: 蓝桥杯算法训练VIP-Hankson的趣味题 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<cstdio> #include<math.h> #include<algorithm> using na…… 题解列表 2022年02月18日 0 点赞 0 评论 560 浏览 评分:0.0
1501: 蓝桥杯算法提高VIP-分苹果(c++版)运用差分数组降低时间复杂度 :tw-2600:**解题思路:**题目中mn数据量达是1e5限时1sec显然暴力枚举会超时,因此我们就需要使用到**差分数组**,这样可以**降低时间复杂度****关于差分数组,如果你想对第i位到j位进行加一操作,你只需要将差分数组第i位+1, 题解列表 2022年02月18日 0 点赞 0 评论 882 浏览 评分:10.0
1181: 不容易系列2 摘要:解题思路:两种方法 :一种用数学组合,一种用递归注意事项:参考代码:数学方法:def f(x): s=1 for i in range(1,x): s *=i …… 题解列表 2022年02月18日 0 点赞 0 评论 636 浏览 评分:0.0
编写题解 1676: 数据结构-链表的基本操作 摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include <stdlib.h> #include <string.h> //结构体定义 typedef str…… 题解列表 2022年02月18日 0 点赞 0 评论 558 浏览 评分:8.0
编写题解 1182: 人民币问题 摘要:解题思路:注意事项:参考代码:n=int(input()) a=((n-3)//5) b=((n-6)//2) s=0 for i in range(1,a+1): for j in…… 题解列表 2022年02月18日 0 点赞 0 评论 481 浏览 评分:0.0
1000:简单的a+b 摘要:解题思路:简单的a+b注意事项:注意多项输入参考代码:#include<stdio.h>int main(){ int a,b; while(~scanf("%d%d", &a, &b))…… 题解列表 2022年02月18日 0 点赞 0 评论 530 浏览 评分:0.0
打字练习c++ 摘要:解题思路:记得换行注意事项:记得换行参考代码:#include<stdio.h>#include<iostream>using namespace std;int main (){ cout<<…… 题解列表 2022年02月18日 0 点赞 0 评论 863 浏览 评分:0.0
编写题解 1002: [编程入门]三个数最大值--解题 摘要:解题思路:相互比较注意事项:参考代码:#include<stdio.h>#include<iostream>using namespace std;int main (){ int a,b,c;…… 题解列表 2022年02月18日 0 点赞 0 评论 440 浏览 评分:0.0