C++ STL unordered_set 摘要:解题思路:利用STL unordered_set保存集合A和C, list保存集合B, 判断集合B中也在A中但不在C中的元素。注意事项:题意要求按B输入顺序输出,所以需要用有序列表保存B中的元素。参考…… 题解列表 2024年05月04日 0 点赞 0 评论 185 浏览 评分:0.0
1093: 字符逆序 摘要:解题思路:主要用于读取用户输入的字符串,并将其反转后输出。参考代码:#include <stdio.h> int main() { char a[100]; char b[…… 题解列表 2024年05月05日 0 点赞 0 评论 285 浏览 评分:0.0
C++ STL multiset从小到大保存最大的k个数 摘要:解题思路:使用STL multiset从小到大保存最大的k个数,那么第一个数就是第k个最大数注意事项:数字可以重复,所以不能用set参考代码:#include<iostream> #include<…… 题解列表 2024年05月05日 0 点赞 0 评论 267 浏览 评分:0.0
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 评论 182 浏览 评分:0.0
题解 3020: 最大数位置 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;int main(){ int n…… 题解列表 2024年05月05日 0 点赞 0 评论 248 浏览 评分:0.0
3020: 最大数位置 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;typedef long long ll;const ll N=1e7;ll a[N];in…… 题解列表 2024年05月05日 0 点赞 0 评论 422 浏览 评分:0.0
使用STL unordered_map实现 摘要:解题思路:使用unordered_map统计每种颜色气球出现的次数,输出出现次数最多的气球颜色。注意事项:参考代码:#include<iostream> #include<string> #inc…… 题解列表 2024年05月05日 0 点赞 0 评论 171 浏览 评分:0.0
3068: 股票买卖DP 摘要:解题思路:两次买卖, 求最大区间差注意事项:参考代码:#include<iostream> #include<cstring> #include<algorithm> using namesp…… 题解列表 2024年05月05日 0 点赞 0 评论 158 浏览 评分:0.0
题目 1034: 秒杀!!! 摘要:解题思路:直接看成是字符串 ,秒杀注意事项:参考代码:#includeusing namespace std;int main(){ string a; cin >> a; f…… 题解列表 2024年05月05日 0 点赞 0 评论 218 浏览 评分:0.0
3069: 鸣人的影分身 摘要:解题思路:分身数为1, 查克能力0或1只有一种分配方式; f[i][j]表示i查克能力j个分身的分配数注意事项:参考代码:#include<iostream> #include<cstring> …… 题解列表 2024年05月05日 0 点赞 0 评论 216 浏览 评分:0.0