C++ STL unordered_set 解题思路:利用STLunordered_set保存集合A和C,list保存集合B,判断集合B中也在A中但不在C中的元素。注意事项:题意要求按B输入顺序输出,所以需要用有序列表保存B中的元素。参考代码:#include#include#include 题解列表 2024年05月04日 0 点赞 0 评论 651 浏览 评分:0.0 1093: 字符逆序 摘要:解题思路:主要用于读取用户输入的字符串,并将其反转后输出。参考代码:#include <stdio.h> int main() { char a[100]; char b[…… 题解列表 2024年05月05日 0 点赞 0 评论 697 浏览 评分:0.0 信息学奥赛一本通T1280-滑雪 摘要:解题思路:从任何一点出发寻找最长路径注意事项:参考代码:#include<iostream> using namespace std; const int N = 1e2 + 10; int g…… 题解列表 2024年05月05日 0 点赞 0 评论 454 浏览 评分:9.9 3061: 公共子序列 摘要:解题思路:f[i][j] 表示a字符串前i字符与b字符串前j字符的最大公共子序列长度注意事项:参考代码:#include<iostream> #include<cstring> using nam…… 题解列表 2024年05月05日 0 点赞 0 评论 433 浏览 评分:9.9 3062: 计算字符串距离 摘要:解题思路:f[i][j]表示a字符串前i字符与b字符串前j字符最短距离注意事项:参考代码:#include<iostream> #include<cstring> using namespace …… 题解列表 2024年05月05日 0 点赞 0 评论 469 浏览 评分:9.9 C++ STL multiset从小到大保存最大的k个数 摘要:解题思路:使用STL multiset从小到大保存最大的k个数,那么第一个数就是第k个最大数注意事项:数字可以重复,所以不能用set参考代码:#include<iostream> #include<…… 题解列表 2024年05月05日 0 点赞 0 评论 688 浏览 评分: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 评论 447 浏览 评分:0.0 3063: 糖果 DP动态规划 摘要:解题思路:f[i][j]表示i堆,余数为j 的糖果最大数量注意事项:初始化f最大负值参考代码:#include<iostream> #include<cstring> #include<algor…… 题解列表 2024年05月05日 0 点赞 0 评论 412 浏览 评分:9.9 题解 3020: 最大数位置 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;int main(){ int n…… 题解列表 2024年05月05日 0 点赞 0 评论 531 浏览 评分: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 评论 717 浏览 评分:0.0 « 12...5359536053615362536353645365...59115912 »
1093: 字符逆序 摘要:解题思路:主要用于读取用户输入的字符串,并将其反转后输出。参考代码:#include <stdio.h> int main() { char a[100]; char b[…… 题解列表 2024年05月05日 0 点赞 0 评论 697 浏览 评分:0.0
信息学奥赛一本通T1280-滑雪 摘要:解题思路:从任何一点出发寻找最长路径注意事项:参考代码:#include<iostream> using namespace std; const int N = 1e2 + 10; int g…… 题解列表 2024年05月05日 0 点赞 0 评论 454 浏览 评分:9.9
3061: 公共子序列 摘要:解题思路:f[i][j] 表示a字符串前i字符与b字符串前j字符的最大公共子序列长度注意事项:参考代码:#include<iostream> #include<cstring> using nam…… 题解列表 2024年05月05日 0 点赞 0 评论 433 浏览 评分:9.9
3062: 计算字符串距离 摘要:解题思路:f[i][j]表示a字符串前i字符与b字符串前j字符最短距离注意事项:参考代码:#include<iostream> #include<cstring> using namespace …… 题解列表 2024年05月05日 0 点赞 0 评论 469 浏览 评分:9.9
C++ STL multiset从小到大保存最大的k个数 摘要:解题思路:使用STL multiset从小到大保存最大的k个数,那么第一个数就是第k个最大数注意事项:数字可以重复,所以不能用set参考代码:#include<iostream> #include<…… 题解列表 2024年05月05日 0 点赞 0 评论 688 浏览 评分: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 评论 447 浏览 评分:0.0
3063: 糖果 DP动态规划 摘要:解题思路:f[i][j]表示i堆,余数为j 的糖果最大数量注意事项:初始化f最大负值参考代码:#include<iostream> #include<cstring> #include<algor…… 题解列表 2024年05月05日 0 点赞 0 评论 412 浏览 评分:9.9
题解 3020: 最大数位置 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;int main(){ int n…… 题解列表 2024年05月05日 0 点赞 0 评论 531 浏览 评分: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 评论 717 浏览 评分:0.0