优质题解 蓝桥杯算法训练VIP-青蛙跳杯子看完包会的(BFS) 摘要:**1.看题找算法**:典型BFS题目 **2思路分析:**输入时即输入2个字符串,我们要通过变换让2个字符串相等.即找到空的杯子,以空杯子为原点bfs,交换空杯子与青蛙不断生成新 的字符串,同时要…… 题解列表 2022年03月12日 0 点赞 0 评论 777 浏览 评分:9.9
优质题解 列出最简真分数序列(c及c++) 摘要:解题思路:先求出40的因数,然后再用40以内的数与这些因数一一判断是否可以整除,如果都不能则输出注意事项:注意1和40;参考代码:/*C++参考代码*/ #include<iostream> …… 题解列表 2022年03月12日 0 点赞 0 评论 1372 浏览 评分:9.0
砝码称重(c++dp解法) 摘要:解题思路:动态规划dp解法for循环i不断加入砝码当前状态=不加/右加/左加 :dp[i+1][j]=dp[i][j] || dp[i][j+w[i]] || dp[i][abs(j-w[i])];参…… 题解列表 2022年03月11日 0 点赞 0 评论 1687 浏览 评分:6.9
[C++]用switch case语句 摘要:解题思路:用switch case语句也可以做出来注意事项:没什么要注意的,注意公式计算参考代码:#include<stdio.h>main(){ int m; int i; sca…… 题解列表 2022年03月11日 0 点赞 0 评论 357 浏览 评分:7.3
蓝桥杯2014年第五届真题-排列序数 摘要:```cpp #include using namespace std; const int N = 100000; int k=0,l,vis[N]; char s[N]; char r…… 题解列表 2022年03月11日 0 点赞 0 评论 263 浏览 评分:0.0
蓝桥杯历届试题-回文数字 摘要:参考代码:#include<iostream> #include<algorithm> using namespace std; bool isReverse(int n) { …… 题解列表 2022年03月11日 0 点赞 0 评论 200 浏览 评分:9.9
超短的C++代码(附详细解题思路) 摘要:解题思路:①如果按照对每行每列的数字进行逐一分析,很容易就超限,500可不是个小数哦~~~②那就想怎么能通过加减运算去节省时间,不难想到相邻的行之间相加就可以得到一个子阵,所以,对输入的数据加上前面所…… 题解列表 2022年03月11日 0 点赞 1 评论 574 浏览 评分:7.1
输入输出--A+B 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n; cin >> n; …… 题解列表 2022年03月11日 0 点赞 0 评论 203 浏览 评分:0.0
输入输出--A+B 摘要:解题思路:注意事项:参考代码:#include <iostream>#include <cstring>using namespace std;int main(){int a,b;while(cin…… 题解列表 2022年03月11日 0 点赞 0 评论 210 浏览 评分:0.0
输入输出--A+B 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main (){ int n; while (cin>>n){ i…… 题解列表 2022年03月11日 0 点赞 0 评论 193 浏览 评分:0.0