1107: 纪念品分组 摘要:解题思路:动态数组:vector<int>p(n)sort 对数组进行降序排序两重遍历,只要两项加起来小于等于w,就分为一组已分配好的纪念品置成-1(价格不会达到的数)第一重遍历会遇到已经分配好的纪念…… 题解列表 2024年11月14日 0 点赞 0 评论 341 浏览 评分:0.0
排列 dfs暴力 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h> using namespace std; // 全局变量声明 int n, a[5], b[5], m = 0; …… 题解列表 2024年11月14日 0 点赞 0 评论 226 浏览 评分:0.0
建立数组用冒泡排序求解(可扩展) 摘要:解题思路:冒泡排序注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a[3]; cin>>a[0]>>a[1]…… 题解列表 2024年11月14日 0 点赞 0 评论 657 浏览 评分:9.9
蓝桥杯2024年第十五届省赛真题-遗迹 摘要:## 知识点 动态规划。 ## 题面 小蓝找到了一个外星文明留下来的遗迹,遗迹大门的屏幕上有一个长度为m 的字符串 t 和一个输入框,下面还有一个键盘,键盘为一个长度为 n 的字符串 s ,由一…… 题解列表 2024年11月14日 8 点赞 2 评论 1464 浏览 评分:2.0
1106: 奖学金 ——sort 摘要:解题思路:注意事项:sort() 函数用于对容器中的元素进行排序,而排序的规则则由一个比较函数来定义。这个比较函数通常会传入两个元素(在我们的例子中是学生对象),并返回一个布尔值定义了一个 compa…… 题解列表 2024年11月13日 5 点赞 0 评论 587 浏览 评分:0.0
代码如下: 摘要:解题思路: 太简单了注意事项:参考代码:#include<iostream>#include<string>using namespace std;int main() { string s; int…… 题解列表 2024年11月13日 0 点赞 0 评论 246 浏览 评分:0.0
加工生产调度 摘要: //这类生产加工题型记住了 #include using namespace std; const int N=10001; struct node{ …… 题解列表 2024年11月13日 0 点赞 0 评论 304 浏览 评分:0.0
线段(贪心) 摘要: #include using namespace std; const int N=1e6+10; struct node{ int…… 题解列表 2024年11月13日 0 点赞 0 评论 338 浏览 评分:9.9
小白,看看就行,不动脑袋 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string>using namespace std;int main(){ string s, s2; …… 题解列表 2024年11月13日 0 点赞 0 评论 244 浏览 评分:0.0
[STL训练]百步穿杨........ 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; // 定义结构体aaa,包含两个整数成员c和k struct aaa{ …… 题解列表 2024年11月12日 0 点赞 0 评论 222 浏览 评分:0.0