信息学奥赛一本通T1457-Power Strings(KMP算法的最基础,背背背!!!) 摘要:解题思路:char s[N];* 声明一个字符数组 `s`,用于存储输入的字符串。* **main 函数:** * 进入一个循环,不断读取字符串 `s`,直到遇到字符串 `.` 为止。 *…… 题解列表 2024年03月31日 0 点赞 0 评论 486 浏览 评分:9.9
2219: 蓝桥杯算法训练-大等于n的最小完全平方数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ long long n; cin>>n; …… 题解列表 2024年03月31日 0 点赞 0 评论 295 浏览 评分:0.0
检查一个数是否为质数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int n; cin>>n;//判断n是不是质…… 题解列表 2024年03月31日 0 点赞 0 评论 316 浏览 评分:0.0
完全背包问题(C++) 摘要:解题思路:设dp[i][j]的含义是:在背包承重为j的前提下,从前i种物品中选能够得到的最大价值。 如何计算dp[i][j]呢?我们可以将它划分为以下若干部分: 选0个第i种物品:相当于不选第i种…… 题解列表 2024年03月31日 0 点赞 0 评论 272 浏览 评分:0.0
2219: 蓝桥杯算法训练-大等于n的最小完全平方数 摘要:解题思路:bitch 张博维giegie 我爱你注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a; …… 题解列表 2024年03月31日 0 点赞 0 评论 272 浏览 评分:0.0
2666: 蓝桥杯2022年真题-爬树的甲壳虫(逆元及递推公式) 摘要:**这是一个数学问题** **大佬的递推公式推导过程:**https://blog.csdn.net/weixin_42430021/article/details/124397529 ```…… 题解列表 2024年03月31日 0 点赞 0 评论 759 浏览 评分:0.0
题解 2814: 正常血压 摘要:解题思路:(jinitaimei)注意事项:题目说的是连续的正常次数,还要写个判断参考代码:#include<bits/stdc++.h>using namespace std;int main(){…… 题解列表 2024年03月31日 0 点赞 0 评论 273 浏览 评分: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 评论 571 浏览 评分:0.0
信息学奥赛一本通T1456-图书管理 摘要:解题思路:注意事项:参考代码:以下是 C++ 代码的详细解析:#include<iostream>#include<map>#include<string>using namespace std;* …… 题解列表 2024年03月31日 1 点赞 0 评论 745 浏览 评分:10.0
1825: 蓝桥杯2015年第六届真题-穿越雷区-bfs 摘要: #include #include #include using namespace std; int n; char maze[105][1…… 题解列表 2024年03月31日 0 点赞 0 评论 387 浏览 评分:0.0