#C++3151—— 蓝桥杯2023年第十四届省赛真题-飞机降落 摘要:解题思路已经标注在代码旁边了,就是用深搜的思想去模拟每一架飞机降落的过程,为了方便处理,采用了 vector 容器和结构体(类)。祝大家快乐学习每一天,开开心心打比赛!AC代码:#include<bi…… 题解列表 2024年03月30日 0 点赞 0 评论 429 浏览 评分:0.0
子串简写的两种解题思路:1:前缀和O(n);2:双指针O(n) 摘要:解题思路:对于前缀和,我们用L和R表示字符串的左端点和右端点;我们用一个前缀和数组s[N]来维护a出现的次数,表示在第i位之前有多少个a。处理完后直接将字符串从后往前枚举,如果找到一个b,则可以匹配前…… 题解列表 2024年03月30日 0 点赞 0 评论 436 浏览 评分:0.0
2604: 蓝桥杯2021年真题-砝码称重(unordered_set) 摘要:##unordered_set **又学到了一个重要的数据结构!! unordered_set:用于存放无序、不重复的数据(重复数据会被自动过滤) set:用于存放有序、不重复的数据 unor…… 题解列表 2024年03月30日 4 点赞 0 评论 653 浏览 评分:9.9
c++暴力枚举时间统计 摘要:解题思路:枚举1000秒内所有情况,再利用map记录x y的最大情况注意事项:参考代码:#include<bits/stdc++.h>#define int long longusing namesp…… 题解列表 2024年03月30日 0 点赞 0 评论 194 浏览 评分:0.0
题解 2219: 蓝桥杯算法训练-大等于n的最小完全平方数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n; cin>>n; while(1) { if(…… 题解列表 2024年03月30日 0 点赞 0 评论 135 浏览 评分:0.0
1234: 检查一个数是否为质数(改进速度版) 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ long long n; cin>>n; …… 题解列表 2024年03月30日 0 点赞 0 评论 187 浏览 评分:9.9
1234: 检查一个数是否为质数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ long long n; cin>>n; …… 题解列表 2024年03月30日 0 点赞 0 评论 204 浏览 评分:0.0
题解 1234: 检查一个数是否为质数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n; cin>>n; for(in…… 题解列表 2024年03月30日 0 点赞 0 评论 239 浏览 评分:9.9
2829: 数1的个数 摘要:解题思路:注意事项:致 别吃张博维giegie参考代码:#include <bits/stdc++.h>using namespace std;int main(){ long long n,s…… 题解列表 2024年03月30日 0 点赞 0 评论 270 浏览 评分:9.9
题解 2813: 药房管理 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int m,n,sum=0; cin>>m>>n; for(…… 题解列表 2024年03月30日 0 点赞 0 评论 213 浏览 评分:0.0