检查一个数是否为质数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int n; cin>>n;//判断n是不是质…… 题解列表 2024年03月31日 0 点赞 0 评论 196 浏览 评分:0.0
完全背包问题(C++) 摘要:解题思路:设dp[i][j]的含义是:在背包承重为j的前提下,从前i种物品中选能够得到的最大价值。 如何计算dp[i][j]呢?我们可以将它划分为以下若干部分: 选0个第i种物品:相当于不选第i种…… 题解列表 2024年03月31日 0 点赞 0 评论 162 浏览 评分:0.0
2219: 蓝桥杯算法训练-大等于n的最小完全平方数 摘要:解题思路:bitch 张博维giegie 我爱你注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a; …… 题解列表 2024年03月31日 0 点赞 0 评论 189 浏览 评分:0.0
2666: 蓝桥杯2022年真题-爬树的甲壳虫(逆元及递推公式) 摘要:**这是一个数学问题** **大佬的递推公式推导过程:**https://blog.csdn.net/weixin_42430021/article/details/124397529 ```…… 题解列表 2024年03月31日 0 点赞 0 评论 630 浏览 评分:0.0
题解 2814: 正常血压 摘要:解题思路:(jinitaimei)注意事项:题目说的是连续的正常次数,还要写个判断参考代码:#include<bits/stdc++.h>using namespace std;int main(){…… 题解列表 2024年03月31日 0 点赞 0 评论 173 浏览 评分:9.9
2659: 蓝桥杯2022年真题-统计子矩阵(前缀和二维变一维) 摘要:```cpp #include using namespace std; const int N = 510 , M = 510; int s[N][M]; long long n ,…… 题解列表 2024年03月31日 1 点赞 0 评论 457 浏览 评分:0.0
信息学奥赛一本通T1456-图书管理 摘要:解题思路:注意事项:参考代码:以下是 C++ 代码的详细解析:#include<iostream>#include<map>#include<string>using namespace std;* …… 题解列表 2024年03月31日 1 点赞 0 评论 607 浏览 评分:10.0
1825: 蓝桥杯2015年第六届真题-穿越雷区-bfs 摘要: #include #include #include using namespace std; int n; char maze[105][1…… 题解列表 2024年03月31日 0 点赞 0 评论 280 浏览 评分:0.0
信息学奥赛一本通T1454-山峰和山谷(广度搜索) 摘要:解题思路:根据题目描述1、没有比它高的叫山峰2、没有比它矮的叫山谷3、还存在又比它高,又比它矮的不算山峰也不算山谷步骤:找到高度一致的连通块,若该连通块周围 没有存在比它高的则该连通块叫…… 题解列表 2024年03月31日 1 点赞 0 评论 419 浏览 评分:10.0
信息学奥赛一本通T1453-移动玩具(广度搜索) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cmath>#include<algorithm>#include<queue>using namespace st…… 题解列表 2024年03月30日 0 点赞 0 评论 333 浏览 评分:9.9