优先队列100%易理解 摘要:解题思路:优先队列有自动排序功能,这里用最小优先队列(即卡牌数越少,在队列中排名越靠前),每次都从优先队列中拿出队头,使用一张万能牌,每次都判断该类牌的万能牌可使用量是否已经为零,如果为零,循环提前结…… 题解列表 2023年05月25日 0 点赞 3 评论 938 浏览 评分:7.3
2916: 谁考了第k名 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;long long xh[10001],temp1;int m[10001];float sc…… 题解列表 2023年05月24日 0 点赞 0 评论 410 浏览 评分:9.9
2914: 铺地毯 摘要:解题思路:逆序查找注意事项:第一个遇到的就是最上层的参考代码:#include<iostream>using namespace std;int a[10001],b[10001],g[10001],…… 题解列表 2023年05月24日 0 点赞 0 评论 313 浏览 评分:6.0
2916: 谁考了第k名 (结构体+sort函数) 摘要:解题思路: 1.定义结构体 2.循环输入数据 3.sort排序 4.输出第k名注意事项:参考代码:#include <bits/stdc++.h> using namespace std; …… 题解列表 2023年05月23日 0 点赞 0 评论 326 浏览 评分:0.0
题目 1216: 成绩转换题解 摘要:参考代码:#include<iostream> using namespace std; int main(){ int score; while(cin>>score){ …… 题解列表 2023年05月23日 0 点赞 0 评论 264 浏览 评分:0.0
题目 1213: 幸运儿题解 摘要:参考代码:#include<iostream> using namespace std; int n; bool flag[100]; bool f(){ int num=0; …… 题解列表 2023年05月23日 0 点赞 0 评论 249 浏览 评分:0.0
优质题解 蓝桥杯2016年第七届真题-密码脱落(区间DP) 摘要:### 题目大意 给定一个字符串,最少插入多少的字符可以使得字符串变成`回文串` ### 解题思路 思想:区间DP 状态定义:$$f[l][r]$$ 表示把从$$l$$ 到$$r$$的…… 题解列表 2023年05月22日 0 点赞 1 评论 780 浏览 评分:9.9
利用map的有序性来计数 摘要:```c++ #include #include using namespace std; int main(){ map mmap; string s; cin >> s…… 题解列表 2023年05月22日 1 点赞 0 评论 389 浏览 评分:9.9
2001看似很简单的三角形判断,其实很简单 摘要:解题思路:正常if判断a*a=b*b+c*c就行,但是有一点问题就是,要是顺序不对就会出错。比如 3 4 5 就是3*3+4*4==5*5 答案是正确的,但如果输入的是 5 3 4 就会5*5+…… 题解列表 2023年05月21日 0 点赞 2 评论 458 浏览 评分:9.9
[编程入门]电报加密 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ string s; getline(cin,s)…… 题解列表 2023年05月21日 0 点赞 0 评论 322 浏览 评分:0.0