完全背包问题,动态规划!! 摘要:其实和01背包问题差别不大,01背包每件物品只能选一个,多重背包每件物品在不超过背包体积的条件下可以选择无限个! ```cpp #include using namespace std; …… 题解列表 2022年03月16日 0 点赞 0 评论 435 浏览 评分:9.9
多重背包 动态规划 摘要:```cpp #include using namespace std; const int L = 5000 + 50; int n, m; int v[L], w[L], q[L]; …… 题解列表 2022年03月16日 0 点赞 0 评论 403 浏览 评分:0.0
蓝桥杯2020年第十一届省赛真题-单词分析 摘要:水题 ```cpp #include #include #include using namespace std; string s; int a[26] = { 0 }; int m…… 题解列表 2022年03月16日 0 点赞 0 评论 647 浏览 评分:9.9
蓝桥杯基础练习VIP-报时助手(JAVA题解) 摘要:解题思路:把m分成两种情况的数据:第一种m>=0&&m<=20把该块数字的英文用一个字符串数组存储;第二种m>20&&m<60使用switch(m/10)判断十位,再用strs[m%10]输出各位把h…… 题解列表 2022年03月16日 0 点赞 0 评论 440 浏览 评分:9.9
动态规划 线性dp 摘要:```cpp #include using namespace std; int INT = 1e9; const int L = 1000; int n; int dp[L][L], a…… 题解列表 2022年03月16日 0 点赞 0 评论 507 浏览 评分:9.9
树状数组(注意身高为0) 摘要:```cpp #include using namespace std; typedef long long ll; #define lowbit(x) ((x)&-(x)) const i…… 题解列表 2022年03月16日 0 点赞 0 评论 370 浏览 评分:9.9
题解 2309: 蓝桥杯2019年第十届省赛真题-人物相关性分析-滑动窗口算法 摘要:解题思路: 常规思想:两个不定长数组,j下标从0开始Alice找Bob,时间超限55Bob运用数组方法:数组下标差的到的中间那段,找Bob为1的index有几个,然后相加,时间超限82滑动窗口算法思想…… 题解列表 2022年03月16日 0 点赞 0 评论 1029 浏览 评分:9.9
发工资了 贪心思路 摘要:解题思路:贪心算法 抓大张的拿注意事项:输出时换行参考代码:#include<stdio.h>int b[6]={100,50,10,5,2,1},a[1000];int main(){ int…… 题解列表 2022年03月16日 0 点赞 0 评论 586 浏览 评分:9.9
蛇行矩阵题解 摘要:解题思路:注意事项:参考代码:'''思路:先求出第一行后面就是a[i][j] = a[i-1][j+1]-1'''def dyh(n): a = …… 题解列表 2022年03月16日 0 点赞 0 评论 379 浏览 评分:9.9
最长子序列 摘要:```cpp #include using namespace std; string s1; int ans = 0; const int L = 1000010; int arr[L]…… 题解列表 2022年03月16日 0 点赞 0 评论 436 浏览 评分:0.0