题解 2212: 蓝桥杯算法训练-景点游览 摘要:解题思路:把小的数慢慢往后面放就可以啦。注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){&nbs…… 题解列表 2025年04月08日 0 点赞 0 评论 432 浏览 评分:0.0
蓝桥杯2018年第九届真题-迷宫与陷阱 BFS 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h"usingnamespacestd;#definell&nb…… 题解列表 2025年04月09日 0 点赞 0 评论 464 浏览 评分:0.0
C++个人写法(非二分) 解题思路:注意事项:参考代码:#includeusingnamespacestd;#definelllonglongintmain(){intn;llk=1E18,m,q=0;cin>>n>>m;vectorp(n), 题解列表 2025年04月09日 0 点赞 0 评论 579 浏览 评分:0.0
哈哈哈哈哈 解题思路:注意事项:参考代码:#include#includeusingnamespacestd;constintN=1e6+10;constintM=100000;intn,m,k,sum, 题解列表 2025年04月09日 0 点赞 0 评论 434 浏览 评分:0.0
1736: 二叉排序树:相同的值只插入一次 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>usingnamespacestd;structbstT…… 题解列表 2025年04月09日 0 点赞 0 评论 485 浏览 评分:0.0
宏定义交换两个变量的值 解题思路:直接自定义编写交换函数注意事项:注意格式参考代码:#includeusingnamespacestd;//定义交换两个变量的宏//使用临时变量实现交换,注意参数要加括号确保运算优先级#defineSWAP(a,b){autotemp=a;a=b;b=temp;}intma 题解列表 2025年04月09日 0 点赞 0 评论 813 浏览 评分:0.0
c++加工生产调度 摘要:```cpp/*方法思路分组处理:将产品分为两组,第一组是A车间加工时间小于B车间加工时间的产品,第二组是A车间加工时间大于或等于B车间加工时间的产品。排序规则:第一组产品按A车间…… 题解列表 2025年04月09日 0 点赞 0 评论 516 浏览 评分:0.0
传送阵-并查集 解题思路:题目输入的是一个排列,也就是从i点只能去一个点,且也只有一个点能到i点,那么每个点最终只会属于一个集合,则可以理解为找最大的两个集合,输出两个集合的元素个数参考代码:#includeusingnamespacestd;typedeflonglongll;type 题解列表 2025年04月09日 2 点赞 0 评论 1097 浏览 评分:0.0
完数的判断,开始看看了 摘要:解题思路:注意事项:参考代码:import math#完数n=int(input())for i in range(2,n+1):#1到N之间的完数,1的因数是本身,完数的因数不包含本身 …… 题解列表 2025年04月09日 0 点赞 0 评论 1031 浏览 评分:0.0
简单状态机模型 importsysinput=lambda:sys.stdin.readline().strip()N=int(1e6+5)f=[[0]*2foriinrange(N)]s='0'+input()foriinrange(1,len(s)+1):f[i][0]+=max(f[i-1][0 题解列表 2025年04月09日 0 点赞 0 评论 454 浏览 评分:0.0