使用STL unordered_map实现 摘要:解题思路:使用unordered_map统计每种颜色气球出现的次数,输出出现次数最多的气球颜色。注意事项:参考代码:#include<iostream> #include<string> #inc…… 题解列表 2024年05月05日 0 点赞 0 评论 142 浏览 评分:0.0
3064: 鸡蛋的硬度 DP 摘要:解题思路:f[i][j]表示i层楼j个鸡蛋最小扔鸡蛋次数注意事项:参考代码:#include<iostream> #include<cstring> #include<algorithm> us…… 题解列表 2024年05月05日 0 点赞 0 评论 180 浏览 评分:9.9
3020: 最大数位置 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;typedef long long ll;const ll N=1e7;ll a[N];in…… 题解列表 2024年05月05日 0 点赞 0 评论 381 浏览 评分:0.0
题解 3020: 最大数位置 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;int main(){ int n…… 题解列表 2024年05月05日 0 点赞 0 评论 212 浏览 评分:0.0
3063: 糖果 DP动态规划 摘要:解题思路:f[i][j]表示i堆,余数为j 的糖果最大数量注意事项:初始化f最大负值参考代码:#include<iostream> #include<cstring> #include<algor…… 题解列表 2024年05月05日 0 点赞 0 评论 171 浏览 评分:9.9
2784: 收集瓶盖赢大奖 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a,b; cin>>a>>b; if(a/10>=1…… 题解列表 2024年05月05日 0 点赞 0 评论 152 浏览 评分:0.0
C++ STL multiset从小到大保存最大的k个数 摘要:解题思路:使用STL multiset从小到大保存最大的k个数,那么第一个数就是第k个最大数注意事项:数字可以重复,所以不能用set参考代码:#include<iostream> #include<…… 题解列表 2024年05月05日 0 点赞 0 评论 235 浏览 评分:0.0
3062: 计算字符串距离 摘要:解题思路:f[i][j]表示a字符串前i字符与b字符串前j字符最短距离注意事项:参考代码:#include<iostream> #include<cstring> using namespace …… 题解列表 2024年05月05日 0 点赞 0 评论 191 浏览 评分:9.9
3061: 公共子序列 摘要:解题思路:f[i][j] 表示a字符串前i字符与b字符串前j字符的最大公共子序列长度注意事项:参考代码:#include<iostream> #include<cstring> using nam…… 题解列表 2024年05月05日 0 点赞 0 评论 163 浏览 评分:9.9
信息学奥赛一本通T1280-滑雪 摘要:解题思路:从任何一点出发寻找最长路径注意事项:参考代码:#include<iostream> using namespace std; const int N = 1e2 + 10; int g…… 题解列表 2024年05月05日 0 点赞 0 评论 105 浏览 评分:9.9